Преглед изворни кода

修复一个设置parent错误

tanghai пре 4 година
родитељ
комит
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;