This commit is contained in:
2026-04-25 23:37:10 +02:00
commit 19d6bd934a
476 changed files with 9198 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b922caefac514b5ea200716720d102ee
timeCreated: 1773354906
@@ -0,0 +1,47 @@
using System.Linq;
using RPGCore.StatusEffect.ObjectModules.StatusObjectModule;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
namespace RPGCore.StatusEffect.Editor.Drawers
{
[CustomPropertyDrawer(typeof(StatusModule))]
public class StatusModuleDrawer : PropertyDrawer
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
var root = new VisualElement();
if (Application.isPlaying) root.Add(CreateDebugBox(property));
root.Add(new PropertyField(property));
return root;
}
private HelpBox CreateDebugBox(SerializedProperty property)
{
var debugBox = new HelpBox();
debugBox.style.flexDirection = FlexDirection.Column;
debugBox.style.alignItems = Align.Stretch;
debugBox.SetEnabled(false);
debugBox.Add(new Label("RUNTIME DEBUG:"));
var statusList = new VisualElement();
debugBox.Add(statusList);
debugBox.schedule.Execute(() =>
{
var module = property.boxedValue as StatusModule;
statusList.Clear();
foreach (var status in module.statuses)
statusList.Add(new Label(status.definition.name));
}).Every(100);
return debugBox;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cc1db66de924411e8d07dea47af563c3
timeCreated: 1773354908
@@ -0,0 +1,20 @@
{
"name": "RPGCore.StatusEffect.Editor",
"rootNamespace": "RPGCore.StatusEffect.Editor",
"references": [
"RPGCore",
"RPGCore.StatusEffect",
"RPGCoreCommon.Helpers"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 67ce347e38e048b4922477b1733406e3
timeCreated: 1772973849