I would like to build an editor helper which sets my game to it's first scene when I click play, regardless of which scene was open in the editor.
I thus need to detect when the editor's playmode state changes, but the syntax for registering an editor delegate in C# currently has me stumped.
Many thanks to anyone who can provide sample code for playmodeStateChanged!
results in this error:
As far as I can tell, what you do here is this-
Also, I think you might be mistaken as to what is causing that error- that is usually caused when you try to use a constructor or something with a MonoBehaviour or other special Unity class!