Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

Event.GetTypeForControl

public EventType GetTypeForControl(int controlID);

Parameters

controlIDThe ID of the control you are querying from.

Description

Get a filtered event type for a given control ID.

This function is used to implement mouse locking and keyboard focus. The controlID can be obtained from GUIUtility.GetControlID().

See Also: EventType for the list of possible values.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答