mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2026-04-22 04:35:55 +08:00
fix
This commit is contained in:
parent
fe3163ab3d
commit
8f7b8e0c2f
@ -204,7 +204,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
Type = type;
|
Type = type;
|
||||||
IsUnique = false;
|
IsUnique = false;
|
||||||
|
|
||||||
if(type.TryGetAttribute<DragonMemnberWrapperAttribute>(out var atr))
|
if(type.TryGetAttribute<DragonMemberWrapperAttribute>(out var atr))
|
||||||
{
|
{
|
||||||
WrappedFieldName = atr.WrappedFieldName;
|
WrappedFieldName = atr.WrappedFieldName;
|
||||||
var field = type.GetField(atr.WrappedFieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
var field = type.GetField(atr.WrappedFieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||||
|
|||||||
@ -13,10 +13,10 @@ using UnityEngine;
|
|||||||
namespace DCFApixels.DragonECS.Unity
|
namespace DCFApixels.DragonECS.Unity
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = false)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = false)]
|
||||||
public sealed class DragonMemnberWrapperAttribute : Attribute
|
public sealed class DragonMemberWrapperAttribute : Attribute
|
||||||
{
|
{
|
||||||
public string WrappedFieldName;
|
public string WrappedFieldName;
|
||||||
public DragonMemnberWrapperAttribute(string wrappedFieldName)
|
public DragonMemberWrapperAttribute(string wrappedFieldName)
|
||||||
{
|
{
|
||||||
WrappedFieldName = wrappedFieldName;
|
WrappedFieldName = wrappedFieldName;
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[MetaProxy(typeof(ComponentTemplateMetaProxy))]
|
[MetaProxy(typeof(ComponentTemplateMetaProxy))]
|
||||||
[DragonMemnberWrapper("component")]
|
[DragonMemberWrapper("component")]
|
||||||
public abstract class ComponentTemplateBase : IComponentTemplate
|
public abstract class ComponentTemplateBase : IComponentTemplate
|
||||||
{
|
{
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user