소스 검색

GetComponent(Type type)也需要加上GetComponentSystem

tanghai 4 년 전
부모
커밋
92d8370dab
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      Unity/Codes/Model/Core/Object/Entity.cs

+ 6 - 0
Unity/Codes/Model/Core/Object/Entity.cs

@@ -679,6 +679,12 @@ namespace ET
             {
             {
                 return null;
                 return null;
             }
             }
+            
+            // 如果有IGetComponent接口,则触发GetComponentSystem
+            if (component is IGetComponent)
+            {
+                EventSystem.Instance.GetComponent(component);
+            }
 
 
             return component;
             return component;
         }
         }