/// <summary> /// Returns the AnimatorItemStateData of the given AnimatorItemGroupData. /// </summary> /// <param name="layer">The layer to get the state of.</param> /// <param name="itemStates">The AnimatorItemGroupData to get the state of.</param> /// <returns>The AnimatorItemStateData of the given AnimatorItemGroupData. Can be null.</returns> private AnimatorItemStateData GetState(int layer, AnimatorItemSetData itemStates) { var stateGroup = itemStates.GetStates(); if (stateGroup != null) { var state = stateGroup.GetState(layer); if (state != null) { // Keep a reference to the active state for the NextState and ResetState callbacks. m_ActiveState = itemStates; return(state); } } return(null); }
/// <summary> /// Constructor for AnimatorItemCollectionData. /// </summary> public AnimatorItemCollectionData(string idleName, string movementName, float transitionDuration, bool itemNamePrefix) { m_Idle = new AnimatorItemSetData(idleName, transitionDuration, itemNamePrefix); m_Movement = new AnimatorItemSetData(movementName, transitionDuration, itemNamePrefix); m_Abilities = new AnimatorItemAbilitySetData[] { }; }