Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetStateObject(Type, int)

Get a state object from a controlID.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.IMGUIModule
public static object GetStateObject(Type t, int controlID)

Parameters


controlID

Returns

Type

Description

Object

Remarks

This will return a recycled state object that is unique for controlID. If there is no state object then a new one will be created and hooked up to the controlID.
On the first call into GUIUtility.GetStateObject a new state object will be created. The controlID uniquely refers to this object. On subsequent calls the stored object will be returned.
Additional Resources: GUIUtility.QueryStateObject.