Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

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

HandleUtility.AddControl

public static void AddControl(int controlId, float distance);

Description

Record a distance measurement from a handle.

All handles call this with their controlID during layout, then use nearestControl to check if they got the mouseDown.