In Javascript, simply put this on the top of the script:
@script ExecuteInEditMode()
And for C#:
[ExecuteInEditMode()]
Unity: Have scripts run while the game doesn’t
There’s a way to force scripts to run even if the game is not running in the Editor:In Javascript, simply put this on the top of the script:
@script ExecuteInEditMode()
And for C#:
[ExecuteInEditMode()]
Thanks to @col000r for this tip! Source: http://col000r.blogspot.com/2010/08/unity-have-scripts-run-while-game.html
Categories
Submit a Comment