コード例 #1
0
        void ActiveStateChanged(RealtimeAvatarModel model, uint activeState)
        {
            if (model != _model)
            {
                return;
            }

            //   if (_head != null)      _head.gameObject.SetActive(model.headActive); // I deprecated this because it will cause RealtimeAvatarVoice to not run when the head isn't tracking...
            if (_leftHand != null)
            {
                _leftHand.gameObject.SetActive(model.leftHandActive);
            }
            if (_rightHand != null)
            {
                _rightHand.gameObject.SetActive(model.rightHandActive);
            }
        }
コード例 #2
0
        void SetModel(RealtimeAvatarModel model)
        {
            if (model == _model)
            {
                return;
            }

            if (_model != null)
            {
                _model.activeStateChanged -= ActiveStateChanged;
            }

            _model = model;

            if (_model != null)
            {
                _model.activeStateChanged += ActiveStateChanged;
            }
        }