Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Selectable.spriteState

Switch to Manual
public var spriteState: UI.SpriteState;

Description

The SpriteState for this selectable object.

Modifications will not be visible if transition is not SpriteSwap.

#pragma strict
// Required when Using UI elements.
public var sprState = new SpriteState();
public var btnMain;
function Start() {
	//Assigns the new sprite states to the button.
	btnMain.spriteState = sprState;
}