private void Awake() { if (Instance == null) { Instance = this; } }
public void SubscribeToGlobalErrorEvent(Action <VKRequest> handler) { if (GlobalErrorHandler != null) { var globalHandlers = GlobalErrorHandler.GetInvocationList(); //Remove all handler must be only one Global foreach (var d in globalHandlers) { GlobalErrorHandler -= (d as Action <VKRequest>); } } GlobalErrorHandler += handler; }