Bewerken

Delen via


SceneInfoDrawer Class

Definition

Draws the scene info struct and populates its hidden fields.

public ref class SceneInfoDrawer : UnityEditor::PropertyDrawer
[UnityEditor.CustomPropertyDrawer(typeof(Microsoft.MixedReality.Toolkit.SceneSystem.SceneInfo))]
public class SceneInfoDrawer : UnityEditor.PropertyDrawer
[<UnityEditor.CustomPropertyDrawer(typeof(Microsoft.MixedReality.Toolkit.SceneSystem.SceneInfo))>]
type SceneInfoDrawer = class
    inherit PropertyDrawer
Public Class SceneInfoDrawer
Inherits PropertyDrawer
Inheritance
UnityEditor.PropertyDrawer
SceneInfoDrawer
Attributes
UnityEditor.CustomPropertyDrawerAttribute

Constructors

SceneInfoDrawer()

Properties

DrawTagProperty

Used to control whether to draw the tag property. All scenes can have tags, but they're not always relevant based on how the scene is being used. Not sure how much I like this method of controlling property drawing since it could result in unpredictable behavior in inspectors. We could add an enum or bool to the SceneInfo struct to control this, but that seemed like unnecessary clutter.

Methods

DrawProperty(Rect, SerializedProperty, GUIContent, Boolean, Boolean)
GetPropertyHeight(Boolean)
GetPropertyHeight(SerializedProperty, GUIContent)
OnGUI(Rect, SerializedProperty, GUIContent)

Applies to