Просмотр исходного кода

修复一个设置parent错误

tanghai 4 лет назад
Родитель
Сommit
7524a691bf
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Unity/Assets/Model/Core/Object/Entity.cs

+ 1 - 1
Unity/Assets/Model/Core/Object/Entity.cs

@@ -795,7 +795,7 @@ namespace ET
             Type type = typeof (T);
             T component = (T) Entity.Create(type, isFromPool);
             component.Id = IdGenerater.Instance.GenerateId();
-            component.Parent = parent;
+            component.Parent = this;
 
             EventSystem.Instance.Awake(component, a, b);
             return component;