public SpecificStateHandler State (int nameHash) { if (StateInfos.ContainsKey (nameHash)) { StateInfo info = StateInfos [nameHash]; // reuse handler if possible to maximise performance in FixedUdpate; // drawback: we have to create a handler first to get the hash ID SpecificStateHandler handler = new SpecificStateHandler (info.Layer, nameHash); int id = handler.GetHashCode (); if (!StateHandlers.ContainsKey (id)) { StateHandlers [id] = handler; } else { } return (SpecificStateHandler)StateHandlers [id]; } else { Debug.LogWarning ("There seem to be no animator state with nameHash [" + nameHash + "]. Maybe you need to update the corresonding AnimatorAccess component."); } return null; }
public SpecificStateHandler State(int nameHash) { if (StateInfos.ContainsKey(nameHash)) { StateInfo info = StateInfos [nameHash]; // reuse handler if possible to maximise performance in FixedUdpate; // drawback: we have to create a handler first to get the hash ID SpecificStateHandler handler = new SpecificStateHandler(info.Layer, nameHash); int id = handler.GetHashCode(); if (!StateHandlers.ContainsKey(id)) { StateHandlers [id] = handler; } else { } return((SpecificStateHandler)StateHandlers [id]); } else { Debug.LogWarning("There seem to be no animator state with nameHash [" + nameHash + "]. Maybe you need to update the corresonding AnimatorAccess component."); } return(null); }