A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.AnimationTriggers.html below:

Class AnimationTriggers

Structure that stores the state of an animation transition on a Selectable.

Inheritance

AnimationTriggers

Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntax
[Serializable]
public class AnimationTriggers
Properties disabledTrigger

Trigger to send to animator when entering disabled state.

Declaration
public 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.

Declaration
public 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.

Declaration
public 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.

Declaration
public 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.

Declaration
public 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