Skip to content

Instantly share code, notes, and snippets.

@Moe-Baker
Created December 14, 2017 16:54
Show Gist options
  • Save Moe-Baker/a432c45450b8526d23bc1a6eb8dec398 to your computer and use it in GitHub Desktop.
Save Moe-Baker/a432c45450b8526d23bc1a6eb8dec398 to your computer and use it in GitHub Desktop.
//gets called when the game loads using the argument gets it called before the startup scene is loaded
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void OnGameLoad()
{
if (Current)
Current.Configure();
else
throw new NullReferenceException("No Asset Instance Found, Please Make Sure An Asset Instance Exists Within A Resources Folder");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment