docs.unity3d.com
    Show / Hide Table of Contents

    Class XROriginEditor

    Custom editor for an XROrigin.

    Inheritance
    Object
    Object
    ScriptableObject
    Editor
    XROriginEditor
    Inherited Members
    Editor.CreateEditorWithContext(Object[], Object, Type)
    Editor.CreateEditorWithContext(Object[], Object)
    Editor.CreateCachedEditorWithContext(Object, Object, Type, Editor)
    Editor.CreateCachedEditorWithContext(Object[], Object, Type, Editor)
    Editor.CreateCachedEditor(Object, Type, Editor)
    Editor.CreateCachedEditor(Object[], Type, Editor)
    Editor.CreateEditor(Object)
    Editor.CreateEditor(Object, Type)
    Editor.CreateEditor(Object[])
    Editor.CreateEditor(Object[], Type)
    Editor.DrawPropertiesExcluding(SerializedObject, String[])
    Editor.DrawDefaultInspector()
    Editor.Repaint()
    Editor.CreateInspectorGUI()
    Editor.RequiresConstantRepaint()
    Editor.DrawHeader()
    Editor.OnHeaderGUI()
    Editor.ShouldHideOpenButton()
    Editor.DrawFoldoutInspector(Object, Editor)
    Editor.HasPreviewGUI()
    Editor.GetPreviewTitle()
    Editor.RenderStaticPreview(String, Object[], Int32, Int32)
    Editor.OnPreviewGUI(Rect, GUIStyle)
    Editor.OnInteractivePreviewGUI(Rect, GUIStyle)
    Editor.OnPreviewSettings()
    Editor.GetInfoString()
    Editor.DrawPreview(Rect)
    Editor.ReloadPreviewInstances()
    Editor.UseDefaultMargins()
    Editor.Initialize(Object[])
    UnityEditor.Editor.MoveNextTarget()
    Editor.ResetTarget()
    Editor.target
    Editor.targets
    Editor.serializedObject
    Editor.finishedDefaultHeaderGUI
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    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
    InitializeKnownSerializedPropertyNames()

    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
    CurrentTrackingOriginMode

    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
    InitializeKnownSerializedPropertyNames()

    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
    DrawBeforeProperties()
    DrawProperties()
    DrawDerivedProperties()

    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
    DrawDerivedProperties()

    OnEnable()

    This function is called when the object becomes enabled and active.

    Declaration
    protected virtual void OnEnable()
    See Also
    MonoBehaviour

    OnInspectorGUI()

    Declaration
    public override void OnInspectorGUI()
    Overrides
    Editor.OnInspectorGUI()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023