From eb4ccd54b794d4e8d7c986e99bf10751f13676ad Mon Sep 17 00:00:00 2001 From: vis2k Date: Mon, 9 Mar 2020 16:21:36 +0100 Subject: [PATCH] syntax --- Assets/Mirror/Editor/SceneDrawer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Mirror/Editor/SceneDrawer.cs b/Assets/Mirror/Editor/SceneDrawer.cs index b6c04f4de..188a94dcb 100644 --- a/Assets/Mirror/Editor/SceneDrawer.cs +++ b/Assets/Mirror/Editor/SceneDrawer.cs @@ -3,14 +3,11 @@ namespace Mirror { - [CustomPropertyDrawer(typeof(SceneAttribute))] public class SceneDrawer : PropertyDrawer { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { - if (property.propertyType == SerializedPropertyType.String) { SceneAsset sceneObject = GetSceneObject(property.stringValue); @@ -33,8 +30,11 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten } } else + { EditorGUI.LabelField(position, label.text, "Use [Scene] with strings."); + } } + protected SceneAsset GetSceneObject(string sceneObjectName) { if (string.IsNullOrEmpty(sceneObjectName))