Ejemplo n.º 1
0
 private void UpdateTargetInTracker()
 {
     if (Target == null)
     {
         return;
     }
     if (loader && loader != tracker)
     {
         loader.UnloadImageTarget(this, (target, status) =>
         {
             if (TargetUnload != null)
             {
                 TargetUnload(target, status);
             }
         });
         loader = null;
     }
     if (tracker && tracker != loader)
     {
         var trackerLoad = tracker;
         tracker.LoadImageTarget(this, (target, status) =>
         {
             if (trackerLoad == tracker && !status)
             {
                 loader = null;
             }
             UpdateScale();
             if (TargetLoad != null)
             {
                 TargetLoad(target, status);
             }
         });
         loader = tracker;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// MonoBehaviour OnDestroy
 /// </summary>
 protected virtual void OnDestroy()
 {
     if (tracker)
     {
         tracker = null;
         UpdateTargetInTracker();
     }
     if (Target != null)
     {
         Target.Dispose();
         Target = null;
     }
 }