Hey. I’ve written some script components which I’ve tested out in-game via a GUI interface which edits the setup of the components.
Now I have reached a point of satisfactory functionality, so I wish to move the editing part out of the in-game context and into the editor.
Since my script components need to both function in the editor and in-game (only with different functionality based on the same data), the [ExecuteInEditMode] option looks like what I’d want.
My trouble is I have no way of determining whether the script is running while in editor mode or if it is running in the game from the editor. If I could make this distinction then I could provide the correct functionality.
Does my approach make sense or does anyone have a better alternative? If no then does anyone have any idea how to make the distinction between the two modes?
Also I’ve noticed my GUI is shown in the game window and not the editor even though the script is running in editor mode.
Is there a way to make the GUI render in the editor window or does the editor window use another GUI interface than the run-time window?