void Awake() { if(instance == null) { instance = this; } else { if(instance != this) { DestroyImmediate(gameObject); } } DontDestroyOnLoad(gameObject); ProEventSystem.RegisterHandler(this); }
public static void RegisterHandler(ProEventHandler handler) { eventHandler = handler; eventHandler.ProcessingEvents += OnProccessingEvents; }