Skip to content

Commit d7055df

Browse files
committed
Merge branch 'release/2023.12.22'
2 parents 18a643c + 43335e8 commit d7055df

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Runtime/Systems/EcsUguiProxyEmitter.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff 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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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",

0 commit comments

Comments
 (0)