public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorState destinationState) { AnimatorTransition newTransition = AddStateMachineTransition(sourceStateMachine); newTransition.destinationState = destinationState; return(newTransition); }
public AnimatorTransition AddStateMachineExitTransition(AnimatorStateMachine sourceStateMachine) { AnimatorTransition newTransition = AddStateMachineTransition(sourceStateMachine); newTransition.isExit = true; return(newTransition); }
/// <summary> /// <para>Utility function to remove an entry transition from the state machine.</para> /// </summary> /// <param name="transition">The transition to remove.</param> public bool RemoveEntryTransition(AnimatorTransition transition) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type AnimatorStateMachine.\u003CRemoveEntryTransition\u003Ec__AnonStorey19 transitionCAnonStorey19 = new AnimatorStateMachine.\u003CRemoveEntryTransition\u003Ec__AnonStorey19(); // ISSUE: reference to a compiler-generated field transitionCAnonStorey19.transition = transition; // ISSUE: reference to a compiler-generated method if (!new List <AnimatorTransition>((IEnumerable <AnimatorTransition>) this.entryTransitions).Any <AnimatorTransition>(new Func <AnimatorTransition, bool>(transitionCAnonStorey19.\u003C\u003Em__21))) { return(false); } this.undoHandler.DoUndo((UnityEngine.Object) this, "Entry Transition Removed"); AnimatorTransition[] entryTransitions = this.entryTransitions; // ISSUE: reference to a compiler-generated field ArrayUtility.Remove <AnimatorTransition>(ref entryTransitions, transitionCAnonStorey19.transition); this.entryTransitions = entryTransitions; // ISSUE: reference to a compiler-generated field if (MecanimUtilities.AreSameAsset((UnityEngine.Object) this, (UnityEngine.Object)transitionCAnonStorey19.transition)) { // ISSUE: reference to a compiler-generated field Undo.DestroyObjectImmediate((UnityEngine.Object)transitionCAnonStorey19.transition); } return(true); }
public AnimatorTransition AddEntryTransition(AnimatorStateMachine destinationStateMachine) { AnimatorTransition animatorTransition = this.AddEntryTransition(); animatorTransition.destinationStateMachine = destinationStateMachine; return(animatorTransition); }
public AnimatorTransition AddEntryTransition(AnimatorState destinationState) { AnimatorTransition transition = this.AddEntryTransition(); transition.destinationState = destinationState; return(transition); }
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorState destinationState) { AnimatorTransition animatorTransition = this.AddStateMachineTransition(sourceStateMachine); animatorTransition.destinationState = destinationState; return(animatorTransition); }
public AnimatorTransition AddStateMachineExitTransition(AnimatorStateMachine sourceStateMachine) { AnimatorTransition animatorTransition = this.AddStateMachineTransition(sourceStateMachine); animatorTransition.isExit = true; return(animatorTransition); }
public AnimatorTransition AddEntryTransition(AnimatorStateMachine destinationStateMachine) { AnimatorTransition newTransition = AddEntryTransition(); newTransition.destinationStateMachine = destinationStateMachine; return(newTransition); }
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine) { AnimatorTransition newTransition = new AnimatorTransition(); AddStateMachineTransition(sourceStateMachine, newTransition); return(newTransition); }
private AnimatorTransition AddEntryTransition() { this.undoHandler.DoUndo(this, "Entry Transition Added"); AnimatorTransition[] entryTransitions = this.entryTransitions; AnimatorTransition animatorTransition = new AnimatorTransition(); if (AssetDatabase.GetAssetPath(this) != "") { AssetDatabase.AddObjectToAsset(animatorTransition, AssetDatabase.GetAssetPath(this)); } animatorTransition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add <AnimatorTransition>(ref entryTransitions, animatorTransition); this.entryTransitions = entryTransitions; return(animatorTransition); }
private AnimatorTransition AddEntryTransition() { this.undoHandler.DoUndo(this, "Entry Transition Added"); AnimatorTransition[] entryTransitions = this.entryTransitions; AnimatorTransition objectToAdd = new AnimatorTransition(); if (AssetDatabase.GetAssetPath(this) != string.Empty) { AssetDatabase.AddObjectToAsset(objectToAdd, AssetDatabase.GetAssetPath(this)); } objectToAdd.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add <AnimatorTransition>(ref entryTransitions, objectToAdd); this.entryTransitions = entryTransitions; return(objectToAdd); }
public bool RemoveEntryTransition(AnimatorTransition transition) { if (new List <AnimatorTransition>(this.entryTransitions).Any((AnimatorTransition t) => t == transition)) { this.undoHandler.DoUndo(this, "Entry Transition Removed"); AnimatorTransition[] entryTransitions = this.entryTransitions; ArrayUtility.Remove <AnimatorTransition>(ref entryTransitions, transition); this.entryTransitions = entryTransitions; if (MecanimUtilities.AreSameAsset(this, transition)) { Undo.DestroyObjectImmediate(transition); } return(true); } return(false); }
private AnimatorTransition AddEntryTransition() { undoHandler.DoUndo(this, "Entry Transition Added"); AnimatorTransition[] transitionsVector = entryTransitions; AnimatorTransition newTransition = new AnimatorTransition(); if (AssetDatabase.GetAssetPath(this) != "") { AssetDatabase.AddObjectToAsset(newTransition, AssetDatabase.GetAssetPath(this)); } newTransition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add(ref transitionsVector, newTransition); entryTransitions = transitionsVector; return(newTransition); }
public bool RemoveEntryTransition(AnimatorTransition transition) { if ((new List <AnimatorTransition>(entryTransitions)).Any(t => t == transition)) { undoHandler.DoUndo(this, "Entry Transition Removed"); AnimatorTransition[] transitionsVector = entryTransitions; ArrayUtility.Remove(ref transitionsVector, transition); entryTransitions = transitionsVector; if (MecanimUtilities.AreSameAsset(this, transition)) { Undo.DestroyObjectImmediate(transition); } return(true); } return(false); }
/// <summary> /// <para>Utility function to add an outgoing transition from the source state machine to the destination.</para> /// </summary> /// <param name="sourceStateMachine">The source state machine.</param> /// <param name="destinationStateMachine">The destination state machine.</param> /// <param name="destinationState">The destination state.</param> /// <returns> /// <para>The Animations.AnimatorTransition transition that was created.</para> /// </returns> public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorStateMachine destinationStateMachine) { this.undoHandler.DoUndo((UnityEngine.Object) this, "StateMachine Transition Added"); AnimatorTransition[] machineTransitions = this.GetStateMachineTransitions(sourceStateMachine); AnimatorTransition animatorTransition = new AnimatorTransition(); if ((bool)((UnityEngine.Object)destinationStateMachine)) { animatorTransition.destinationStateMachine = destinationStateMachine; } if (AssetDatabase.GetAssetPath((UnityEngine.Object) this) != string.Empty) { AssetDatabase.AddObjectToAsset((UnityEngine.Object)animatorTransition, AssetDatabase.GetAssetPath((UnityEngine.Object) this)); } animatorTransition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add <AnimatorTransition>(ref machineTransitions, animatorTransition); this.SetStateMachineTransitions(sourceStateMachine, machineTransitions); return(animatorTransition); }
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorStateMachine destinationStateMachine) { this.undoHandler.DoUndo(this, "StateMachine Transition Added"); AnimatorTransition[] stateMachineTransitions = this.GetStateMachineTransitions(sourceStateMachine); AnimatorTransition animatorTransition = new AnimatorTransition(); if (destinationStateMachine) { animatorTransition.destinationStateMachine = destinationStateMachine; } if (AssetDatabase.GetAssetPath(this) != "") { AssetDatabase.AddObjectToAsset(animatorTransition, AssetDatabase.GetAssetPath(this)); } animatorTransition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add <AnimatorTransition>(ref stateMachineTransitions, animatorTransition); this.SetStateMachineTransitions(sourceStateMachine, stateMachineTransitions); return(animatorTransition); }
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorStateMachine destinationStateMachine) { this.undoHandler.DoUndo(this, "StateMachine Transition Added"); AnimatorTransition[] stateMachineTransitions = this.GetStateMachineTransitions(sourceStateMachine); AnimatorTransition objectToAdd = new AnimatorTransition(); if (destinationStateMachine != null) { objectToAdd.destinationStateMachine = destinationStateMachine; } if (AssetDatabase.GetAssetPath(this) != string.Empty) { AssetDatabase.AddObjectToAsset(objectToAdd, AssetDatabase.GetAssetPath(this)); } objectToAdd.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add <AnimatorTransition>(ref stateMachineTransitions, objectToAdd); this.SetStateMachineTransitions(sourceStateMachine, stateMachineTransitions); return(objectToAdd); }
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorStateMachine destinationStateMachine) { undoHandler.DoUndo(this, "StateMachine Transition Added"); AnimatorTransition[] transitionsVector = GetStateMachineTransitions(sourceStateMachine); AnimatorTransition newTransition = new AnimatorTransition(); if (destinationStateMachine) { newTransition.destinationStateMachine = destinationStateMachine; } if (AssetDatabase.GetAssetPath(this) != "") { AssetDatabase.AddObjectToAsset(newTransition, AssetDatabase.GetAssetPath(this)); } newTransition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add(ref transitionsVector, newTransition); SetStateMachineTransitions(sourceStateMachine, transitionsVector); return(newTransition); }
public bool RemoveStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorTransition transition) { this.undoHandler.DoUndo(this, "StateMachine Transition Removed"); AnimatorTransition[] stateMachineTransitions = this.GetStateMachineTransitions(sourceStateMachine); int num = stateMachineTransitions.Length; ArrayUtility.Remove <AnimatorTransition>(ref stateMachineTransitions, transition); this.SetStateMachineTransitions(sourceStateMachine, stateMachineTransitions); if (MecanimUtilities.AreSameAsset(this, transition)) { Undo.DestroyObjectImmediate(transition); } return(num != stateMachineTransitions.Length); }
public void clear() { m_condList.Clear(); m_animatorTransition = null; }
/// <summary> /// <para>Utility function to remove an outgoing transition from source state machine.</para> /// </summary> /// <param name="transition">The transition to remove.</param> /// <param name="sourceStateMachine">The source state machine.</param> public bool RemoveStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorTransition transition) { this.undoHandler.DoUndo((UnityEngine.Object) this, "StateMachine Transition Removed"); AnimatorTransition[] machineTransitions = this.GetStateMachineTransitions(sourceStateMachine); int length = machineTransitions.Length; ArrayUtility.Remove <AnimatorTransition>(ref machineTransitions, transition); this.SetStateMachineTransitions(sourceStateMachine, machineTransitions); if (MecanimUtilities.AreSameAsset((UnityEngine.Object) this, (UnityEngine.Object)transition)) { Undo.DestroyObjectImmediate((UnityEngine.Object)transition); } return(length != machineTransitions.Length); }
public AnimatorTransition() { AnimatorTransition.Internal_CreateAnimatorTransition(this); }
private static extern void Internal_CreateAnimatorTransition([Writable] AnimatorTransition mono);
internal void AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorTransition transition) { undoHandler.DoUndo(this, "StateMachine Transition Added"); AnimatorTransition[] transitionsVector = GetStateMachineTransitions(sourceStateMachine); if (AssetDatabase.GetAssetPath(this) != "") { AssetDatabase.AddObjectToAsset(transition, AssetDatabase.GetAssetPath(this)); } undoHandler.DoUndoCreated(transition, "StateMachine Transition Created"); transition.hideFlags = HideFlags.HideInHierarchy; ArrayUtility.Add(ref transitionsVector, transition); SetStateMachineTransitions(sourceStateMachine, transitionsVector); }
public bool RemoveStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorTransition transition) { undoHandler.DoUndo(this, "StateMachine Transition Removed"); AnimatorTransition[] transitionsVector = GetStateMachineTransitions(sourceStateMachine); int baseSize = transitionsVector.Length; ArrayUtility.Remove(ref transitionsVector, transition); SetStateMachineTransitions(sourceStateMachine, transitionsVector); if (MecanimUtilities.AreSameAsset(this, transition)) { Undo.DestroyObjectImmediate(transition); } return(baseSize != transitionsVector.Length); }
private static extern void Internal_Create(AnimatorTransition mono);
private static extern void Internal_Create(AnimatorTransition mono);