File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,18 @@ bool ValidateEmitter () {
3232 // parent was killed.
3333 if ( ( object ) _parent != null ) { return false ; }
3434
35- var parent = _searchType == SearchType . InGlobal
36- ? FindObjectOfType < EcsUguiEmitter > ( )
37- : GetComponentInParent < EcsUguiEmitter > ( ) ;
35+ EcsUguiEmitter parent = default ;
36+ if ( _searchType == SearchType . InGlobal ) {
37+ var validType = typeof ( EcsUguiEmitter ) ;
38+ foreach ( var em in FindObjectsOfType < EcsUguiEmitter > ( ) ) {
39+ if ( em . GetType ( ) == validType ) {
40+ parent = em ;
41+ break ;
42+ }
43+ }
44+ } else {
45+ parent = GetComponentInParent < EcsUguiEmitter > ( ) ;
46+ }
3847 // fix for GetComponentInParent.
3948 if ( parent == this ) { parent = null ; }
4049#if DEBUG && ! LEOECSLITE_NO_SANITIZE_CHECKS
Original file line number Diff line number Diff line change 44 "displayName" : " LeoECS Lite uGui Bindings" ,
55 "description" : " LeoECS Lite uGui Bindings - поддержка событий uGui в ECS-мире." ,
66 "unity" : " 2020.3" ,
7- "version" : " 2022.9 .22" ,
7+ "version" : " 2023.12 .22" ,
88 "keywords" : [
99 " leoecslite" ,
1010 " leoecs" ,
You can’t perform that action at this time.
0 commit comments