mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 18:14:35 +08:00
refactoring / fixes
This commit is contained in:
parent
1517c944a0
commit
e2286a877e
@ -18,11 +18,11 @@
|
||||
|
||||
public class EcsUnityDefines
|
||||
{
|
||||
public const bool DISABLE_SERIALIZE_REFERENCE_RECOVERY =
|
||||
#if DISABLE_SERIALIZE_REFERENCE_RECOVERY
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
// public const bool DISABLE_SERIALIZE_REFERENCE_RECOVERY =
|
||||
//#if DISABLE_SERIALIZE_REFERENCE_RECOVERY
|
||||
// true;
|
||||
//#else
|
||||
// false;
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
optionButton.yMin = optionButton.yMax;
|
||||
optionButton.yMax += HeadIconsRect.height;
|
||||
optionButton.xMin = optionButton.xMax - 64;
|
||||
optionButton.center += Vector2.up * DrawTypeMetaBlockPadding * 1f;
|
||||
optionButton.center += Vector2.up * DrawTypeMetaBlockPadding;
|
||||
|
||||
//Canceling isExpanded
|
||||
bool oldIsExpanded = rootProperty.isExpanded;
|
||||
@ -1083,8 +1083,8 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
{
|
||||
var componentTypeIDs = world.GetComponentTypeIDsFor(entityID);
|
||||
|
||||
GUILayout.BeginVertical(UnityEditorUtility.GetStyle(Color.black, 0.2f));
|
||||
|
||||
using (EcsGUI.Layout.BeginVertical(UnityEditorUtility.GetStyle(Color.black, 0.2f)))
|
||||
{
|
||||
if (isWithFoldout)
|
||||
{
|
||||
IsShowRuntimeComponents = EditorGUILayout.BeginFoldoutHeaderGroup(IsShowRuntimeComponents, "RUNTIME COMPONENTS", EditorStyles.foldout);
|
||||
@ -1109,7 +1109,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
}
|
||||
}
|
||||
}
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
private static void DrawRuntimeComponent(int total, int index, int entityID, IEcsPool pool)
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
{
|
||||
IEnumerable<(IEcsPool, ITypeMeta)> itemMetaPairs = pools.Select(pool =>
|
||||
{
|
||||
return (pool, (ITypeMeta)pool.ComponentType.GetMeta());
|
||||
return (pool, (ITypeMeta)pool.ComponentType.ToMeta());
|
||||
});
|
||||
Setup(itemMetaPairs);
|
||||
}
|
||||
|
@ -1,20 +1,13 @@
|
||||
using DCFApixels.DragonECS.Unity;
|
||||
using DCFApixels.DragonECS.Unity.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
public abstract class ScriptableEntityTemplateBase : ScriptableObject, ITemplate
|
||||
{
|
||||
[SerializeField]
|
||||
private int _saveID;
|
||||
public abstract void Apply(short worldID, int entityID);
|
||||
|
||||
private static IComponentTemplate _fake = null;
|
||||
protected virtual IList<IComponentTemplate> GetToRecover() { return null; }
|
||||
protected virtual ref IComponentTemplate GetToRecoverSingle() { return ref _fake; }
|
||||
}
|
||||
|
||||
[MetaColor(MetaColor.Cyan)]
|
||||
|
Loading…
Reference in New Issue
Block a user