- Home /
Is there any way to run a class script from visual studio?
I've come across a problem often where I write some helper methods that I don't need to test in the Editor, so I'd like to run the code from visual studio directly to shorten the debugging time. However- since there's no (exposed) Main() method in unity projects, I usually end up having to Write custom code in Start to send debug.log messages to the unity console, and then go into play mode to see them.
Obviously if I'm just doing some vector or string manipulations or somesuch it's extremely tedious to debug small methods this way. I tried adding a Main() method to a Monobehaviour script but it does nothing. also I'm afraid to mess up the logic the editor relies on, since as I understand what's going on in the background is Unity calling Main() behind the scenes
TL;DR- is there any way to run a unity class file (or even just a method paramaters) via the visual studio console, like a "regular" solution?
Your answer
Follow this Question
Related Questions
The name 'transform' does not exist in the current context (Fixed, was my fault) 3 Answers
debugging multiple gameobjects with the same script 0 Answers
Tag in grey margin Visual Studio? 1 Answer
Visual Studio is not recognizing Unity 5 Answers
No Monobehaviour script in the file error Unity 2019.2 2 Answers