diff --git a/Assets/GameScripts/DotNet/Core/Define.cs b/Assets/GameScripts/DotNet/Core/Define.cs index 9bb0b606..314be151 100644 --- a/Assets/GameScripts/DotNet/Core/Define.cs +++ b/Assets/GameScripts/DotNet/Core/Define.cs @@ -80,7 +80,7 @@ public static class Define { "", "0", "bool", "byte", "short", "ushort", "int", "uint", "long", "ulong", "float", "string", "AttrConfig", "IntDictionaryConfig", "StringDictionaryConfig", - "short[]", "int[]", "long[]", "float[]", "string[]" + "short[]", "int[]", "long[]", "float[]", "string[]","uint[]" }; /// /// Excel生成代码模板的位置 diff --git a/Assets/GameScripts/DotNet/Core/Entitas/Entity.cs b/Assets/GameScripts/DotNet/Core/Entitas/Entity.cs index fae76067..b627633e 100644 --- a/Assets/GameScripts/DotNet/Core/Entitas/Entity.cs +++ b/Assets/GameScripts/DotNet/Core/Entitas/Entity.cs @@ -450,6 +450,11 @@ namespace TEngine #endif #region GetComponent + public T GetParent() where T : Entity, new() + { + return (T)Parent; + } + public T GetComponent() where T : Entity, new() { return GetComponent(typeof(T)) as T;