文档

Unity Engine

Unity Engine

GetTypeForControl(int)

Get a filtered event type for a given control ID.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.UICommonModule
public EventType GetTypeForControl(int controlID)

Parameters

controlID

The ID of the control you are querying from.

Returns

Type

Description

EventType

Remarks

This function is used to implement mouse locking and keyboard focus. The controlID can be obtained from GUIUtility.GetControlID.
Additional Resources: EventType