Version: 2017.2

EventSystem.SetSelectedGameObject

切换到手册
public void SetSelectedGameObject (GameObject selected, EventSystems.BaseEventData pointer);

参数

selected 要选择的游戏对象。
pointer 关联的 EventData。

描述

Set the object as selected. Will send an OnDeselect the the old selected object and OnSelect to the new selected object.