Structure that stores the state of an animation transition on a Selectable.
InheritanceAnimationTriggers
Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntax[Serializable]
public class AnimationTriggers
Properties disabledTrigger
Trigger to send to animator when entering disabled state.
Declarationpublic string disabledTrigger { get; set; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Animator buttonAnimator;
public Button button;
void SomeFunction()
{
//Sets the button to the Disabled state (Useful when making tutorials).
buttonAnimator.SetTrigger(button.animationTriggers.disabledTrigger);
}
}
highlightedTrigger
Trigger to send to animator when entering highlighted state.
Declarationpublic string highlightedTrigger { get; set; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Animator buttonAnimator;
public Button button;
void SomeFunction()
{
//Sets the button to the Highlighted state (Useful when making tutorials).
buttonAnimator.SetTrigger(button.animationTriggers.highlightedTrigger);
}
}
normalTrigger
Trigger to send to animator when entering normal state.
Declarationpublic string normalTrigger { get; set; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Animator buttonAnimator;
public Button button;
void SomeFunction()
{
//Sets the button to the Normal state (Useful when making tutorials).
buttonAnimator.SetTrigger(button.animationTriggers.normalTrigger);
}
}
pressedTrigger
Trigger to send to animator when entering pressed state.
Declarationpublic string pressedTrigger { get; set; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Animator buttonAnimator;
public Button button;
void SomeFunction()
{
//Sets the button to the Pressed state (Useful when making tutorials).
buttonAnimator.SetTrigger(button.animationTriggers.pressedTrigger);
}
}
selectedTrigger
Trigger to send to animator when entering selected state.
Declarationpublic string selectedTrigger { get; set; }
Property Value Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Animator buttonAnimator;
public Button button;
void SomeFunction()
{
//Sets the button to the Selected state (Useful when making tutorials).
buttonAnimator.SetTrigger(button.animationTriggers.selectedTrigger);
}
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4