add kcp
This commit is contained in:
@@ -20,25 +20,25 @@ namespace BITKit
|
||||
public ReferenceSO so;
|
||||
public override string Get() => so.value.IsNullOrEmpty() ? so.name : so.value;
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
[CustomPropertyDrawer(typeof(ReferenceScriptableObject))]
|
||||
public class ReferenceScriptableObjectDrawer : BITProperty
|
||||
{
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
VisualElement root = new();
|
||||
root.Add(base.CreatePropertyGUI(property));
|
||||
|
||||
Button button = new();
|
||||
root.Add(button);
|
||||
return root;
|
||||
}
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
base.OnGUI(position, property, label);
|
||||
EditorGUI.PropertyField(position, property);
|
||||
EditorGUI.LinkButton(position, "New Button");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// #if UNITY_EDITOR
|
||||
// [CustomPropertyDrawer(typeof(ReferenceScriptableObject))]
|
||||
// public class ReferenceScriptableObjectDrawer : BITProperty
|
||||
// {
|
||||
// public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
// {
|
||||
// VisualElement root = new();
|
||||
// root.Add(base.CreatePropertyGUI(property));
|
||||
//
|
||||
// Button button = new();
|
||||
// root.Add(button);
|
||||
// return root;
|
||||
// }
|
||||
// public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
// {
|
||||
// base.OnGUI(position, property, label);
|
||||
// EditorGUI.PropertyField(position, property);
|
||||
// EditorGUI.LinkButton(position, "New Button");
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
}
|
Reference in New Issue
Block a user