private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
예제 #2
0
 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;
 }