void Awake() { m_controller = new AnimatorOverrideController(); if (m_sharedAnimatorController == null) { // Lazy load the shared animator controller m_sharedAnimatorController = Resources.Load <RuntimeAnimatorController>(CONTROLLER_PATH); } m_controller.runtimeAnimatorController = m_sharedAnimatorController; m_animator = GetComponent <Animator>(); m_animator.runtimeAnimatorController = m_controller; #if UNITY_5_6_OR_NEWER m_controller.GetOverrides(m_clipPairList); #else m_clipPairArray = m_controller.clips; #endif m_animator.enabled = false; // PowerQuest tweak to disable animator if there's no animation Play(m_defaultAnim); m_nodes = GetComponent <SpriteAnimNodes>(); }
public void RegisterSpriteAnimNodesComponent(SpriteAnimNodes nodes) { m_nodes = nodes; }