Class XROriginEditor
Custom editor for an XROrigin.
Inherited Members
Namespace: Unity.XR.CoreUtils.Editor
Syntax
[CustomEditor(typeof(XROrigin), true)]
[CanEditMultipleObjects]
public class XROriginEditor : Editor, IPreviewable, IToolModeOwner
Fields
m_Camera
SerializedProperty of the SerializeField backing Camera.
Declaration
protected SerializedProperty m_Camera
Field Value
Type | Description |
---|---|
SerializedProperty |
m_CameraFloorOffsetObject
SerializedProperty of the SerializeField backing CameraFloorOffsetObject.
Declaration
protected SerializedProperty m_CameraFloorOffsetObject
Field Value
Type | Description |
---|---|
SerializedProperty |
m_CameraYOffset
SerializedProperty of the SerializeField backing CameraYOffset.
Declaration
protected SerializedProperty m_CameraYOffset
Field Value
Type | Description |
---|---|
SerializedProperty |
m_OriginBaseGameObject
SerializedProperty of the SerializeField backing Origin.
Declaration
protected SerializedProperty m_OriginBaseGameObject
Field Value
Type | Description |
---|---|
SerializedProperty |
m_RequestedTrackingOriginMode
SerializedProperty of the SerializeField backing RequestedTrackingOriginMode.
Declaration
protected SerializedProperty m_RequestedTrackingOriginMode
Field Value
Type | Description |
---|---|
SerializedProperty |
m_TrackingOriginMode
m_TrackingOriginMode has been deprecated. Use m_RequestedTrackingOriginMode instead.
Declaration
[Obsolete("m_TrackingOriginMode has been deprecated. Use m_RequestedTrackingOriginMode instead.")]
protected SerializedProperty m_TrackingOriginMode
Field Value
Type | Description |
---|---|
SerializedProperty |
Properties
knownSerializedPropertyNames
The SerializeField names of all SerializedProperty fields defined in the Unity.XR.CoreUtils.Editor (including derived types).
Declaration
protected string[] knownSerializedPropertyNames { get; set; }
Property Value
Type | Description |
---|---|
String[] |
See Also
Methods
DrawBeforeProperties()
This method is automatically called by DrawInspector() to draw the section of the custom inspector before DrawProperties(). By default, this draws the read-only Script property.
Declaration
protected virtual void DrawBeforeProperties()
DrawCurrentTrackingOriginMode()
Draw the current Tracking Origin Mode while the application is playing.
Declaration
protected void DrawCurrentTrackingOriginMode()
See Also
DrawDerivedProperties()
This method is automatically called by DrawInspector() to draw the property fields of derived classes that are not explicitly defined in the Unity.XR.CoreUtils.Editor.
Declaration
protected virtual void DrawDerivedProperties()
Remarks
This method is used to allow users to add a SerializeField to a derived behavior
and have it automatically appear in the Inspector while still having the custom Editor
apply to that derived class.
When a derived Unity.XR.CoreUtils.Editor class adds a SerializedProperty,
it will no longer automatically be drawn by this method. This is to allow users to customize
where the property is drawn in the Inspector window. The derived Unity.XR.CoreUtils.Editor class
does not need to explicitly add the SerializedProperty if the user is fine with
the default location of where it will be drawn.
See Also
DrawInspector()
This method is automatically called by OnInspectorGUI() to draw the custom inspector. Override this method to customize the inspector as a whole.
Declaration
protected virtual void DrawInspector()
See Also
DrawProperties()
This method is automatically called by DrawInspector() to draw the property fields. Override this method to customize the properties shown in the Inspector. This is typically the method overridden when a derived behavior adds additional serialized properties that should be displayed in the Inspector.
Declaration
protected virtual void DrawProperties()
DrawScript()
Draw the standard read-only Script property.
Declaration
protected virtual void DrawScript()
GetDerivedSerializedPropertyNames()
Returns a list containing the SerializeField names of all SerializedProperty fields defined in the Unity.XR.CoreUtils.Editor (including derived types).
Declaration
protected virtual List<string> GetDerivedSerializedPropertyNames()
Returns
Type | Description |
---|---|
List<String> | Returns a list of strings with property names. |
InitializeKnownSerializedPropertyNames()
This method is automatically called by OnInspectorGUI() to initialize knownSerializedPropertyNames if necessary. This is used together with DrawDerivedProperties() to draw all unknown serialized fields from derived classes.
Declaration
protected virtual void InitializeKnownSerializedPropertyNames()
See Also
OnEnable()
This function is called when the object becomes enabled and active.
Declaration
protected virtual void OnEnable()
See Also
OnInspectorGUI()
Any inheriting classes should invoke this method.
Declaration
public override void OnInspectorGUI()