Is editor currently in play mode?
Setting isPlaying delays the result until after all script code has completed for this frame.
See Also: isPaused, isPlayingOrWillChangePlaymode.