(client) feat:完成实体生成函数,修复行为树加载错误,改进Define打印缩进

This commit is contained in:
m0_75251201
2025-07-22 14:40:24 +08:00
parent 506d0a68a8
commit a6dfbd7c68
26 changed files with 835 additions and 527 deletions

View File

@ -16,7 +16,7 @@ namespace Prefab
public void Init(Data.PawnDef pawnDef)
{
entity.runtimeAttributes = pawnDef.attributes.Clone();
entity.attributes = pawnDef.attributes.Clone();
entity.aiTree = ConvertToAIBase(pawnDef.behaviorTree);
outline.Init();
@ -45,7 +45,10 @@ namespace Prefab
{
if (string.IsNullOrEmpty(className))
throw new ArgumentException("className 不能为空");
if (className.Equals("AIBase", StringComparison.OrdinalIgnoreCase))
{
return (AIBase)Activator.CreateInstance(typeof(AIBase));
}
// 定义可能的命名空间列表
var possibleNamespaces = new[] { "AI"};