Compare commits

..

3 Commits

Author SHA1 Message Date
DCFApixels
71f1328a59 fix 2025-05-15 13:10:54 +08:00
DCFApixels
7f80f2564c fix 2025-05-15 10:38:04 +08:00
DCFApixels
503b97c1eb fix 2025-05-15 09:50:37 +08:00
4 changed files with 14 additions and 33 deletions

View File

@ -231,8 +231,16 @@ namespace DCFApixels.DragonECS.Unity.Editors.X
{
if (_runtimeComponentsDepth == RuntimeComponentsDepthRoot)
{
try
{
_runtimeComponentsDepth = 0;
_drawers[0].DrawWorldComponents_Internal(world);
}
finally
{
_runtimeComponentsDepth = RuntimeComponentsDepthRoot;
}
}
}
private void DrawWorldComponents_Internal(EcsWorld world)
{
@ -454,7 +462,7 @@ namespace DCFApixels.DragonECS.Unity.Editors.X
bool childElementChanged = false;
var eventType = Event.current.type;
var label2 = UnityEditorUtility.GetLabel2(cache.Type.FullName + " " + type.FullName);
var label2 = "-";
var drawerType = cache.DrawerType;
if (isUnityObjectField)

View File

@ -529,37 +529,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
return result;
}
#endregion
//private static StructList<GUIContent> _stackLabels = new StructList<GUIContent>(4);
//public static StackTempLabelScope GetStackLabel(string text, string tooltip = null)
//{
// StackTempLabelScope result = default;
// if (_stackLabels.Count <= 0)
// {
// result = new StackTempLabelScope(new GUIContent());
// }
// else
// {
// var l = _stackLabels[_stackLabels.Count - 1];
// _stackLabels.RemoveAt(_stackLabels.Count - 1);
// result = new StackTempLabelScope(l);
// }
// result.Label.text = text;
// result.Label.tooltip = tooltip;
// return result;
//}
//private static void ReturnStackLabel(GUIContent label)
//{
// _stackLabels.Add(label);
//}
//public readonly struct StackTempLabelScope : IDisposable
//{
// public readonly GUIContent Label;
// public StackTempLabelScope(GUIContent label) { Label = label; }
// public void Dispose() { ReturnStackLabel(Label); }
// public static implicit operator GUIContent(StackTempLabelScope a) { return a.Label; }
//}
}
internal static class RuntimeComponentsUtility

View File

@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Serialization;
namespace DCFApixels.DragonECS
{
@ -25,6 +26,7 @@ namespace DCFApixels.DragonECS
{
[SerializeReference]
[ReferenceButton(true, typeof(IComponentTemplate))]
[FormerlySerializedAs("_components")]
private IComponentTemplate[] _componentTemplates;
#region Properties

View File

@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Serialization;
namespace DCFApixels.DragonECS
{
@ -26,6 +27,7 @@ namespace DCFApixels.DragonECS
private ScriptableEntityTemplateBase[] _templates;
[SerializeReference]
[ReferenceButton(true, typeof(IComponentTemplate))]
[FormerlySerializedAs("_components")]
private IComponentTemplate[] _componentTemplates;
#region Properties