API reference
API reference
Select your platform
No SDKs available
No versions available

DebugMember Class

Extends PreserveAttribute
Annotate field, property, functions with this will show in Immersive Debugger panel in runtime.
Without additional parameters specified, by default we're watching fields/properties, and provide a button to call function without parameter.
Supports nested classes: If a field/property has [DebugMember] and its type is a class with its own [DebugMember] members, it will appear as a foldout in the Inspector Panel. When expanded, the nested class's debug members are shown as children. For example: public class MyComponent : MonoBehaviour { [DebugMember] public NestedData data = new NestedData();
[Serializable] public class NestedData { [DebugMember] public float value = 5.0f; } }
For more info about Immersive Debugger, check out the official doc

Constructors

DebugMember ( color )
Constructor of the DebugMember.
Signature
DebugMember(DebugColor color=DebugColor.Gray)
Parameters
color: DebugColor  The DebugColor typed color used for DebugGizmo line drawing and inspector row pill icon, default to Gray
DebugMember ( colorString )
Constructor of the DebugMember.
Signature
DebugMember(string colorString)
Parameters
colorString: string  The string typed color used for DebugGizmo line drawing and inspector row pill icon, default to Gray. Could be Hex code or literal colors from Unity https://docs.unity3d.com/ScriptReference/ColorUtility.TryParseHtmlString.html

Fields

Category : string
Optional category for a specific tab in Inspector Panel.
Signature
string Category
Color : Color
The color used for DebugGizmo line drawing and inspector row pill icon, note it doesn't apply to the Axis typed gizmo as it's drawing R/G/B colors for 3 axis.
Signature
Color Color
Description : string
Description for the attributed field to be used in the Inspector Panel.
Signature
string Description
DisplayName : string
Optional name override to be used in the Inspector Panel.
Signature
string DisplayName
GizmoType : DebugGizmoType
The type of the gizmo to draw in space according to the runtime value of the field/property data.
The gizmoType must match the runtime value's type, check out DebugGizmoType for reference.
Signature
DebugGizmoType GizmoType
Max : float
Maximum value for the tweak slider, only applicable for float/int data when Tweakable is true.
Signature
float Max
Min : float
Minimum value for the tweak slider, only applicable for float/int data when Tweakable is true.
Signature
float Min
ShowGizmoByDefault : bool
Whether the gizmo will be turned on by default at startup.
You can always turn the gizmo off by clicking the "eye" button next to the row of the debug option.
Signature
bool ShowGizmoByDefault
Tweakable : bool
Specify whether this field/property is tweakable, will show control UI in headset panel (inspector).
For now, it only supports two types: 1. boolean with checkboxes shown in headset panel, and
  1. float/int which can be used together with Min, Max param with slider shown in headset panel. By default, to true and can be turned off if no need.
Signature
bool Tweakable

Static Fields

DisplayNameTooltip : const string
Signature
const string DisplayNameTooltip