private void OnDisable()
 {
     if (mTrackableBehaviour != null)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
 protected virtual void OnDestroy()
 {
     if (mTrackableNuke)
     {
         mTrackableNuke.UnregisterTrackableEventHandler(this);
     }
 }
	void RemoveEventHandler(GameObject target){
		mTrackableBehaviour = target.GetComponent<TrackableBehaviour>();
		if (mTrackableBehaviour)
		{
			mTrackableBehaviour.UnregisterTrackableEventHandler(this);
		}
	}
Example #4
0
 void OnDestroy()
 {
     if (marker)
     {
         marker.UnregisterTrackableEventHandler(this);
     }
 }
 void OnDestroy()
 {
     if (_trackableBehaviour)
     {
         _trackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
Example #6
0
 private void OnDestroy()
 {
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
Example #7
0
 void OnDestroy()
 {
     if (trackable != null)
     {
         trackable.UnregisterTrackableEventHandler(this);
     }
 }
Example #8
0
 protected virtual void OnDestroy()
 {
     if (Track)
     {
         Track.UnregisterTrackableEventHandler(this);
     }
 }
Example #9
0
 protected virtual void OnDestroy()
 {
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
Example #10
0
 public void Unregister()
 {
     if (mTrackableBehaviour)
     {
         Debug.Log(mTrackableBehaviour.name + "is unregistered");
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
	void OnDisable()
	{
		mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.UnregisterTrackableEventHandler(this);
        }
	}
Example #12
0
 protected virtual void OnDestroy()
 {
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
     Debug.Log("Trackable2 " + mTrackableBehaviour.TrackableName + " DESTROYED");
 }
Example #13
0
 protected virtual void OnDestroy()
 {
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
     //Debug.Log("Destroy activé");
 }
Example #14
0
 protected virtual void OnDestroy()
 {
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
     ARCameraManager.TargetDestroy(this);
 }
Example #15
0
 void OnDisable()
 {
     mTrackableBehaviour = GetComponent <TrackableBehaviour>();
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
Example #16
0
 private void OnDestroy()
 {
     //Unsubscribe to the events about the cube if it is destroyed
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     }
 }
Example #17
0
 /// <summary>
 /// 取消订阅当前追踪器
 /// </summary>
 public void Unregisterthistracker()
 {
     if (!trackablebehaviour)
     {
         Debug.LogError(Globallogmsg.TRAKABLEEMPTY);
         return;
     }
     trackablebehaviour.UnregisterTrackableEventHandler(this);
     Globallogmsg.Getregistermsg(Globallogmsg.Registertype.UNREGISTER, trackablebehaviour.TrackableName);
 }
Example #18
0
    void OnDestroy()
    {
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.UnregisterTrackableEventHandler(this);
        }

        for (int i = 0; i < sources.Length; i++)
        {
            sources[i].Deinit();
        }
    }
Example #19
0
 private void OnTrackingFound()
 {
     mTrackableBehaviour.UnregisterTrackableEventHandler(this);
     //if (myModelPrefab != null)
     //{
     //    Transform myModelTrf = GameObject.Instantiate(myModelPrefab) as Transform;
     //    myModelTrf.parent = mTrackableBehaviour.transform;
     //    myModelTrf.localPosition = new Vector3(0f, 0f, 0f);
     //    myModelTrf.localRotation = Quaternion.identity;
     //    myModelTrf.localScale = new Vector3(0.0005f, 0.0005f, 0.0005f);
     //    myModelTrf.gameObject.active = true;
     //}
 }
Example #20
0
 // Start is called before the first frame update
 void Start()
 {
     GPUDest.gameObject.SetActive(false);
     mTrackableBehaviour = GetComponent <TrackableBehaviour>();
     if (mTrackableBehaviour)
     {
         if (mTrackableBehaviour.name == "MB1v2")
         {
             mTrackableBehaviour.UnregisterTrackableEventHandler(this);
         }
         else
         {
             mTrackableBehaviour.RegisterTrackableEventHandler(this);
         }
     }
     //mb2.gameObject.GetComponent<DefaultTrackableEventHandler>().Unregister();
     //mb2.gameObject.SetActive(false);
 }
Example #21
0
        } //END OnTrackableStateChanged
#endif

        //--------------------------------//
        public override void DestroyIfIncompatibleXRTechnology()
        //--------------------------------//
        {

#if VUFORIA
            if( trackableBehaviour != null )
            {
                
                trackableBehaviour.UnregisterTrackableEventHandler( this );
                
                Destroy( trackableBehaviour );

                TrackerManager.Instance.GetStateManager().ReassociateTrackables();
            }
#endif

            base.DestroyIfIncompatibleXRTechnology();

        } //END DestroyIfIncompatibleXRTechnology
Example #22
0
 protected virtual void OnDisable()
 {
     trackableBehaviour.UnregisterTrackableEventHandler(this);
 }
Example #23
0
 void OnDisable()
 {
     track.UnregisterTrackableEventHandler(this);
 }
Example #24
0
 public void RemoveTrackingLogic()
 {
     mTrackableBehaviour.UnregisterTrackableEventHandler(this);
 }
Example #25
0
 public void Unregister()
 {
     mTrackableBehaviour.UnregisterTrackableEventHandler(this);
 }