diff --git a/Runtime/RuntimeUtil.cs b/Runtime/RuntimeUtil.cs index 0cd05d3c..83b69337 100644 --- a/Runtime/RuntimeUtil.cs +++ b/Runtime/RuntimeUtil.cs @@ -186,13 +186,15 @@ public static Transform FindAvatarInParents(Transform target) /// internal static IEnumerable FindAvatarsInScene(Scene scene) { + var list = new List(); foreach (var root in scene.GetRootGameObjects()) { foreach (var avatar in root.GetComponentsInChildren()) { - if (IsAvatarRoot(avatar.transform)) yield return avatar.transform; + if (IsAvatarRoot(avatar.transform)) list.Add(avatar.transform); } } + return list; } } } \ No newline at end of file