DPVR_TrackedController GetDPVRTrackedController(string controllerName)
        {
            DPVR_TrackedController ret = null;
            Transform transform        = gameObject.transform.Find(controllerName);

            if (transform != null)
            {
                ret = transform.GetComponent <DPVR_TrackedController>();
            }
            return(ret);
        }
Ejemplo n.º 2
0
 protected virtual void Start()
 {
     if (this.GetComponent <DPVR_TrackedController>() == null)
     {
         trackedController = gameObject.AddComponent <DPVR_TrackedController>();
     }
     else
     {
         trackedController = this.GetComponent <DPVR_TrackedController>();
     }
 }