First Commit
This commit is contained in:
15
Assets/Attributes/Editor/ReadOnlyEditor.cs
Normal file
15
Assets/Attributes/Editor/ReadOnlyEditor.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Golems.Attributes;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Golems
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ReadOnly))]
|
||||
public class ReadOnlyPropertyDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.LabelField(position, $"{property.displayName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user