void Start()
 {
     _fT = GetComponentInParent <vFootStep>();
     if (_fT == null)
     {
         Debug.Log(gameObject.name + " can't find the FootStepFromTexture");
         gameObject.SetActive(false);
     }
 }
示例#2
0
        void Start()
        {
            _fT = GetComponentInParent <vFootStep>();

            var r = gameObject.GetComponent <Rigidbody>();

            if (r == null)
            {
                gameObject.AddComponent <Rigidbody>().isKinematic = true;
            }
            else
            {
                r.isKinematic = true;
            }

            if (_fT == null)
            {
                Debug.Log(gameObject.name + " can't find the FootStepFromTexture");
                gameObject.SetActive(false);
            }
        }