Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

Selectable.FindSelectableOnRight

Switch to Manual
public function FindSelectableOnRight(): UI.Selectable;

Returns

Selectable The Selectable object to the right of current.

Description

Find the selectable object to the right of this one.

#pragma strict
// required when using UI elements in scripts
public var btnMain;
public function Start() {
	//Finds and assigns the selectable to the Right of the main button.
	var newSelectable = btnMain.FindSelectableOnRight();
	Debug.Log(newSelectable.name);
}