- Home /
Make script changes in real time (without being in play mode)?
Just basically, how can I apply script variables to the editor without being in play mode? So I guess I'm looking for something separate from void Start() since that's executed when the editor/game is started. I'm basically just wanting sort of a custom editor, but I don't need that, just how can I make changes of a script real time without being in play mode? Thanks
Answer by MikeNewall · Apr 28, 2014 at 01:04 AM
Add the [ExecuteInEditMode] attribute to the top of your script. Update is then clled in the editor(not every frame though)
If you want a callback every frame take a look at this:
https://docs.unity3d.com/Documentation/Manual/RunningEditorCodeOnLaunch.html
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
[Unity Editor] Emulate Touch Input - Still Asking 12/10 1 Answer
Undo.Record: Recording variables within array elements 0 Answers
How can I create a custom AssetPreview for a prefab 1 Answer
Loading assets in Editor Mode? 1 Answer