コード例 #1
0
    void Awake() {
      _interactionBehaviour = GetComponent<InteractionBehaviourBase>();

      if (_interactionBehaviour != null) {
        _interactionBehaviour.OnGraspBeginEvent += onGraspBegin.Invoke;
        _interactionBehaviour.OnGraspEndEvent += onGraspEnd.Invoke;
      }
    }
コード例 #2
0
        void Awake()
        {
            _interactionBehaviour = GetComponent <InteractionBehaviourBase>();

            if (_interactionBehaviour != null)
            {
                _interactionBehaviour.OnGraspBeginEvent += onGraspBegin.Invoke;
                _interactionBehaviour.OnGraspEndEvent   += onGraspEnd.Invoke;
            }
        }
コード例 #3
0
        void Awake()
        {
            _interactionBehaviour = GetComponent <InteractionBehaviourBase>();

            if (_interactionBehaviour != null)
            {
                _interactionBehaviour.OnHandGraspedEvent  += onHandGrasp.Invoke;
                _interactionBehaviour.OnHandReleasedEvent += onHandRelease.Invoke;
            }
        }
コード例 #4
0
    protected override void OnEnable() {
      base.OnEnable();

      if (targets.Length == 1) {
        _interactionBehaviour = target as InteractionBehaviourBase;
        _manager = _interactionBehaviour.GetComponentInParent<InteractionManager>();
        if (_manager == null) {
          _manager = FindObjectOfType<InteractionManager>();
        }
      } else {
        _interactionBehaviour = null;
      }

      if (PrefabUtility.GetPrefabType((target as Component).gameObject) != PrefabType.Prefab) {
        specifyCustomDecorator("_manager", managerDectorator);
      }
    }
コード例 #5
0
        protected override void OnEnable()
        {
            base.OnEnable();

            if (targets.Length == 1)
            {
                _interactionBehaviour = target as InteractionBehaviourBase;
                _manager = _interactionBehaviour.GetComponentInParent <InteractionManager>();
                if (_manager == null)
                {
                    _manager = FindObjectOfType <InteractionManager>();
                }
            }
            else
            {
                _interactionBehaviour = null;
            }

            if (PrefabUtility.GetPrefabType((target as Component).gameObject) != PrefabType.Prefab)
            {
                specifyCustomDecorator("_manager", managerDectorator);
            }
        }