Last active
February 10, 2018 02:58
-
-
Save lynxelia/635d0953c50653ceeccd98122ff82d7e to your computer and use it in GitHub Desktop.
Example of how to use EditorApplication.isPlayingOrWillChangePlaymode to skip time intensive code you don’t want executed when entering play mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
if (!EditorApplication.isPlayingOrWillChangePlaymode) | |
{ | |
// time intensive code you don’t want executed when entering play mode | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment