- Home /
EditorApplication Awake event?
Hey,
Is there a way to make Unity call a function when the Unity Application loads or exits (like void OnApplicationStart() or something akin to it)?
I want to create a global instance of a JSON / animation data handler class that can be accessed from all Editor objects, MonoBehaviours, and EditorWindows.
I tried doing this by extending EditorApplication, but that class is sealed, and I'm out of ideas.
Thanks in advance!
Answer by nile1988 · Jul 25, 2013 at 03:36 PM
using UnityEngine; using UnityEditor;
[InitializeOnLoad] public class Startup { static Startup() { //Do something } }
Your answer
Follow this Question
Related Questions
How to make a global settings Editor Window for my game 0 Answers
How to open the Animation window from an editor script ? 1 Answer
How to get to the Editor to display a child's World Position? 2 Answers
Create Button without If Statement 2 Answers
EditorApplication.update way more frequent than 100 times per second? 1 Answer