//============================================================================================ /** * @brief Starts pose debugging in editor and creates the playable graph. * *********************************************************************************************/ public void StartPoseDebug(int a_animDataId) { if (m_animData.Length > 0 && a_animDataId < m_animData.Length) { CurrentAnimData = m_animData[a_animDataId]; } if (CurrentAnimData != null) { p_animator = GetComponent <Animator>(); m_animationStates = new MxMPlayableState[1]; if (p_animator) { MxMPlayableGraph = PlayableGraph.Create(); MxMPlayableGraph.SetTimeUpdateMode(DirectorUpdateMode.Manual); var playableOutput = AnimationPlayableOutput.Create(MxMPlayableGraph, "Animation", p_animator); m_animationMixer = AnimationMixerPlayable.Create(MxMPlayableGraph, 1, true); playableOutput.SetSourcePlayable(m_animationMixer); m_animationMixer.SetInputWeight(0, 1f); basePosition = transform.position; baseRotation = transform.rotation; m_debugPosesActive = true; } else { m_debugPoses = false; m_debugPosesActive = false; } } }
public void Setup(ref MxMPlayableState a_state, MxMAnimator m_mxmAnimator) { ref AnimationMixerPlayable mixer = ref m_mxmAnimator.MixerPlayable;