void Awake()
        {
            _cRig = GetComponentInChildren <CamRig>();

            if (_cRig == null)
            {
                throw new Exception("自己 或 子物体必须包含一个 CamRig 组件, @see CamRig");
            }
        }
Exemple #2
0
        void Awake()
        {
            _cRig = GetComponentInChildren <CamRig>();

            _triggerPoint = GetComponent <CamInfluenceTriggerPoint>();

            if (_cRig == null)
            {
                throw new Exception("自己 或 子物体必须包含一个 CamRig 组件, @see CamRig");
            }

            if (_triggerPoint == null)
            {
                throw new Exception("自己必须包含一个 CamInfluenceTriggerPoint 组件, @see CamInfluenceTriggerPoint");
            }
        }