예제 #1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            PropertyDrawerHelper.LoadAttributeTooltip(this, label);

            if (property.propertyType == SerializedPropertyType.Integer && !EditorApplication.isPlaying)
            {
                using (PropertyGUI.Do(position, label, property))
                {
                    property.intValue = EditorGUI.LayerField(position, label, property.intValue);
                }
            }
            else
            {
                EditorGUI.PropertyField(position, property, label);
            }
        }
예제 #2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            PropertyDrawerHelper.LoadAttributeTooltip(this, label);

            if (property.propertyType == SerializedPropertyType.String)
            {
                using (PropertyGUI.Do(position, label, property))
                {
                    property.stringValue = EditorGUI.TagField(position, label, property.stringValue);
                }
            }
            else
            {
                EditorGUI.PropertyField(position, property, label);
            }
        }