この Selectable オブジェクトのための SpriteState
遷移が SpriteSwap でない場合、変更は表示されません。
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour { //Creates an instance of a sprite state (This includes the highlighted, pressed and disabled sprite. public SpriteState sprState = new SpriteState(); public Button btnMain;
void Start () { //Assigns the new sprite states to the button. btnMain.spriteState = sprState; } }