Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Selectable.FindSelectableOnLeft

マニュアルに切り替える
public UI.Selectable FindSelectableOnLeft();

戻り値

Selectable 現在のオブジェクトの左にある Selectable オブジェクト。

説明

このオブジェクトの左にある Selectable オブジェクトを一つ検索します。

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // required when using UI elements in scripts

public class ExampleClass : MonoBehaviour { public Button btnMain; public void Start () { //Finds and assigns the selectable to the left of the main button. Selectable newSelectable = btnMain.FindSelectableOnLeft ();

Debug.Log (newSelectable.name); } }