WatchVariableDescriptor
WatchVariableDescriptor
class allows you to specify which type members to include or exclude in the generated watch variable, along with custom names and additional parameters.
Reset
Clears all specified data in the descriptor.SetSelfRecursion
Determines whether the type can include members of the same type, useful for types likeTransform
and Vector3
to ignore recursive members.
Self recursion is disabled by default.
SetTypeMask
Defines which member types (Field
, Property
, Method
, or All
) can be included. By default, it includes fields and properties but excludes methods.
SetSortOrder
Assigns a sorting order to a variable's membermemberNameReal
, determined by the specified sortOrder
. Works just like SetSortOrder
in WatchReference
.
SetDecimalPlaces
Sets the number of decimal places for a variable's membermemberNameReal
, determined by the specified decimalPlaces
. Works just like SetDecimalPlaces
in WatchReference
.
SetAlwaysCollapsable
Sets a variable's membermemberNameReal
values as always collapsable.
SetTraceable
Sets a variable's membermemberNameReal
values as traceable.
SetMinMaxModeAsGlobal
Sets a variable's membermemberNameReal
min/max mode as global.
SetMinMaxModeAsCustom
public WatchVariableDescriptor SetMinMaxModeAsCustom(string memberNameReal, double minValue, double maxValue)
memberNameReal
min/max mode as custom.
SetCollectionModeAsKey
Enables collection types (Array, List, etc.) to be displayed as key-value pairs in editor, similar to dictionary types. ThekeyMemberRealName
parameter defines which member of the element will be used as the display key.
UpdateOnceMember
Configures the membermemberNameReal
to update its value only once, after which all future updates will be ignored. Applies to both auto-updated variables during the first UpdateAll()
call and manually-updated variables during the first Push()
.
RevertUpdateOnceMember
Removes theUpdateOnce
modifier from the specified member memberNameReal
, allowing it to update normally again.
SetObjectReferenceTrackable
Enables or disables tracking of Unity types (e.g.,MonoBehaviour
, ScriptableObject
), allowing them to appear in the variable's info area for easy reference in the scene or project.
SetObjectReferenceTrackable
Enables the membermemberNameReal
of any Unity type (like MonoBehaviour
or ScriptableObject
) to appear in the variable's info area, making it easy to locate the related object in the scene or project.
SetObjectReferenceNonTrackable
Disables tracking for the specified membermemberNameReal
, preventing it from appearing in the variable's info area.
IgnoreMember
Excludes a member from the generated variable.RenameMember
Changes a member's displayed name in the variable.IgnoreMember
Excludes a member from the generated variable.IgnoreMembers
Excludes multiple members.AllowMember
Re-includes a member that was ignored in a lower priority descriptor.AllowMembers
Re-includes multiple members.ShowOnlyMember
Excludes all other members except the specified one. CombinesShowOnlyMember
and RenameMember
.
ShowOnlyMembers
Same asShowOnlyMember
, but for multiple members.
IgnoreAllMembersDeclaredInClass
Ignores all members from the target class, useful for base class definitions. Same asIgnoreAllMembersDeclaredInClass
, but for a specified class in the hierarchy.
AllowAllMembersDeclaredInClass
Restores all previously ignored members from the target class. Same asAllowAllMembersDeclaredInClass
, but for a specified class in the hierarchy.