文档

Unity Engine

Unity Engine

QueryStateObject(Type, int)

Get an existing state object from a controlID.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

Parameters


controlID

Returns

Type

Description

Object

Remarks

This will return a recycled state object that is unique for
controlID
. If the state object has not been created by calling GUIUtility.GetStateObject then it cannot be accessed using GUIUtility.QueryStateObject. A call into GUIUtility.QueryStateObject with the state object not created is invalid. A null may be returned, but is not guaranteed. An exception may happen instead.
Additional Resources: GUIUtility.GetStateObject.