|
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! This code: results in this error:
(comments are locked)
|
|
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! Thanks for your clarification! This makes more sense. I realized that I was grossly overthinking my original problem and didn't need anything other than checking if time was 0 in Awake, but I am sure I and others will have uses for editor delegates in the future.
Nov 28 '11 at 06:42 AM
Aubrey Falconer
Shouldn't it be I don't think just using = works, I think you need to use +=.
Apr 28 '12 at 04:27 AM
Excrubulent
(comments are locked)
|
