Class SceneInfoDrawer
Draws the scene info struct and populates its hidden fields.
Inheritance
SceneInfoDrawer
Assembly: cs.temp.dll.dll
public class SceneInfoDrawer : PropertyDrawer
Properties
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.
Declaration
public static bool DrawTagProperty { get; set; }
Property Value
Methods
DrawProperty(Rect, SerializedProperty, GUIContent, Boolean, Boolean)
Declaration
public static void DrawProperty(Rect position, SerializedProperty property, GUIContent label, bool isActive = false, bool isSelected = false)
Parameters
Type |
Name |
Description |
Rect |
position |
|
SerializedProperty |
property |
|
GUIContent |
label |
|
Boolean |
isActive |
|
Boolean |
isSelected |
|
GetPropertyHeight(SerializedProperty, GUIContent)
Declaration
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
Parameters
Type |
Name |
Description |
SerializedProperty |
property |
|
GUIContent |
label |
|
Returns
Declaration
public static float GetPropertyHeight(bool drawTagProperty)
Parameters
Type |
Name |
Description |
Boolean |
drawTagProperty |
|
Returns
OnGUI(Rect, SerializedProperty, GUIContent)
Declaration
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Parameters
Type |
Name |
Description |
Rect |
position |
|
SerializedProperty |
property |
|
GUIContent |
label |
|