Przeglądaj źródła

修复ComponentParent一个小bug

tanghai 4 lat temu
rodzic
commit
ecd971138c
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Unity/Assets/Model/Core/Object/Entity.cs

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

@@ -178,9 +178,9 @@ namespace ET
         {
         {
             set
             set
             {
             {
-                if (this.parent != null)
+                if (value == null)
                 {
                 {
-                    throw new Exception($"Component parent is not null: {this.GetType().Name}");
+                    throw new Exception($"cant set parent null: {this.GetType().Name}");
                 }
                 }
                 
                 
                 if (value == this)
                 if (value == this)