/// <summary> /// Generate code to fill transition info dictionary in InitialiseEventManager. /// </summary> void ProcessTransitions() { InternalAPIAccess.ProcessAllTransitions(animator, ProcessTransition); string allIds = ""; foreach (int id in TransitionInfos.Keys) { allIds += ":" + id; } allTransitionsHash = allIds.GetHashCode(); PropertyCodeElement <int> p = new PropertyCodeElement <int> ("AllTransitionsHash"); p.overrideModifier = OverrideType.Override; p.Getter.CodeLines.Add("return " + allTransitionsHash + ";"); classCodeElement.Properties.Add(p); }
/// <summary> /// Adds all Animator parameters as properties to the class code element. NOTE that this method relies on /// classes from namespace UnityEditorInternal which can be subject to changes in future releases. /// </summary> void ProcessAnimatorParameters() { InternalAPIAccess.ProcessAnimatorParameters(animator, ProcessAnimatorParameter); }
/// <summary> /// Adds convenience methods to determine the current Animator state as boolean methods to the class code /// element (e.g. IsIdle ()). NOTE that this method relies on classes from namespace UnityEditorInternal /// which can be subject to changes in future releases. /// </summary> void ProcessAnimatorStates() { InternalAPIAccess.ProcessAllAnimatorStates(animator, ProcessAnimatorState); }