Skip to content

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

public WatchVariableDescriptor Reset()
Clears all specified data in the descriptor.

SetSelfRecursion

public WatchVariableDescriptor SetSelfRecursion(bool allow)
Determines whether the type can include members of the same type, useful for types like Transform and Vector3 to ignore recursive members. Self recursion is disabled by default.

SetTypeMask

public WatchVariableDescriptor SetTypeMask(MemberType mask)
Defines which member types (Field, Property, Method, or All) can be included. By default, it includes fields and properties but excludes methods.

SetSortOrder

public WatchVariableDescriptor SetSortOrder(string memberNameReal, int sortOrder)  
Assigns a sorting order to a variable's member memberNameReal, determined by the specified sortOrder. Works just like SetSortOrder in WatchReference.

SetDecimalPlaces

public WatchVariableDescriptor SetDecimalPlaces(string memberNameReal, int decimalPlaces)  
Sets the number of decimal places for a variable's member memberNameReal, determined by the specified decimalPlaces. Works just like SetDecimalPlaces in WatchReference.

SetAlwaysCollapsable

public WatchVariableDescriptor SetAlwaysCollapsable(string memberNameReal)  
Sets a variable's member memberNameReal values as always collapsable.

SetTraceable

public WatchVariableDescriptor SetTraceable(string memberNameReal)  
Sets a variable's member memberNameReal values as traceable.

SetMinMaxModeAsGlobal

public WatchVariableDescriptor SetMinMaxModeAsGlobal(string memberNameReal)  
Sets a variable's member memberNameReal min/max mode as global.

SetMinMaxModeAsCustom

public WatchVariableDescriptor SetMinMaxModeAsCustom(string memberNameReal, double minValue, double maxValue)
Sets a variable's member memberNameReal min/max mode as custom.

SetCollectionModeAsKey

public WatchVariableDescriptor SetCollectionModeAsKey(string keyMemberRealName)
Enables collection types (Array, List, etc.) to be displayed as key-value pairs in editor, similar to dictionary types. The keyMemberRealName parameter defines which member of the element will be used as the display key.

UpdateOnceMember

public WatchVariableDescriptor UpdateOnceMember(string memberNameReal)
Configures the member memberNameReal 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

public WatchVariableDescriptor RevertUpdateOnceMember(string memberNameReal)
Removes the UpdateOnce modifier from the specified member memberNameReal, allowing it to update normally again.

SetObjectReferenceTrackable

public WatchVariableDescriptor SetObjectReferenceTrackable(bool trackForThisType)
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

public WatchVariableDescriptor SetObjectReferenceTrackable(string memberNameReal)
Enables the member memberNameReal 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

public WatchVariableDescriptor SetObjectReferenceNonTrackable(string memberNameReal)
Disables tracking for the specified member memberNameReal, preventing it from appearing in the variable's info area.

IgnoreMember

public WatchVariableDescriptor IgnoreMember(string memberName)
Excludes a member from the generated variable.

RenameMember

public WatchVariableDescriptor RenameMember(string memberNameReal, string memberNameShown)
Changes a member's displayed name in the variable.

IgnoreMember

public WatchVariableDescriptor IgnoreMember(string memberName)
Excludes a member from the generated variable.

IgnoreMembers

public WatchVariableDescriptor IgnoreMembers(params string[] memberNames)
Excludes multiple members.

AllowMember

public WatchVariableDescriptor AllowMember(string memberName)
Re-includes a member that was ignored in a lower priority descriptor.

AllowMembers

public WatchVariableDescriptor AllowMembers(params string[] memberNames)
Re-includes multiple members.

ShowOnlyMember

public WatchVariableDescriptor ShowOnlyMember(string memberName)
Excludes all other members except the specified one.

public WatchVariableDescriptor ShowOnlyMember(string childNameReal, string childNameShown)
Combines ShowOnlyMember and RenameMember.

ShowOnlyMembers

public WatchVariableDescriptor ShowOnlyMembers(params string[] memberNames)
Same as ShowOnlyMember, but for multiple members.

IgnoreAllMembersDeclaredInClass

public WatchVariableDescriptor IgnoreAllMembersDeclaredInClass()
Ignores all members from the target class, useful for base class definitions.

public WatchVariableDescriptor IgnoreAllMembersDeclaredInClass(Type hierarchyClass)
Same as IgnoreAllMembersDeclaredInClass, but for a specified class in the hierarchy.

AllowAllMembersDeclaredInClass

public WatchVariableDescriptor AllowAllMembersDeclaredInClass()
Restores all previously ignored members from the target class.

public WatchVariableDescriptor AllowAllMembersDeclaredInClass(Type hierarchyClass)
Same as AllowAllMembersDeclaredInClass, but for a specified class in the hierarchy.