This commit is contained in:
2026-04-25 23:37:10 +02:00
commit 19d6bd934a
476 changed files with 9198 additions and 0 deletions
@@ -0,0 +1,21 @@
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace RPGCoreCommon.Helpers.Editor.PropertyAttributeDrawers
{
[CustomPropertyDrawer(typeof(LayerAttribute))]
public class LayerDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
if (property.boxedValue is not int)
return new Label($"Field '{property.displayName}' is not INTEGER. {nameof(LayerAttribute)} can be used only on <b>INTEGER</b> field.");
var layerField = new LayerField(property.displayName);
layerField.BindProperty(property);
return layerField;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3a3af142730740288c3078e34cd62718
timeCreated: 1762713459
@@ -0,0 +1,21 @@
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace RPGCoreCommon.Helpers.Editor.PropertyAttributeDrawers
{
[CustomPropertyDrawer(typeof(LayerMaskAttribute))]
public class LayerMaskDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
if (property.boxedValue is not int)
return new Label($"Field '{property.displayName}' is not INTEGER. {nameof(LayerMaskAttribute)} can be used only on <b>INTEGER</b> field.");
var layerMaskField = new LayerMaskField(property.displayName);
layerMaskField.BindProperty(property);
return layerMaskField;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a1a4f0b89e344d8a9aefc5767fdb860c
timeCreated: 1762714412
@@ -0,0 +1,19 @@
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace RPGCoreCommon.Helpers.Editor.PropertyAttributeDrawers
{
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
public class ReadOnlyDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
var propertyField = new PropertyField(property);
propertyField.name = "ReadOnly";
propertyField.RegisterCallback<GeometryChangedEvent>(_ => propertyField.SetEnabled(false));
return propertyField;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d6de1b490a8549d3a67957f5a2a8a03e
timeCreated: 1764603191
@@ -0,0 +1,17 @@
using System;
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace RPGCoreCommon.Helpers.Editor.PropertyAttributeDrawers
{
[CustomPropertyDrawer(typeof(SerializeReferenceHelperAttribute))]
public class SerializeReferenceHelperDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9ffb1bb18c6d4a7a889c32c17d78a39c
timeCreated: 1773956371