From 0f7d062a9fc16e61ef5fd521a56d2ee3c0c99891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Tue, 7 Apr 2026 15:32:20 +0800 Subject: [PATCH] 11 --- Runtime/UXComponent/Navigation/UXNavigationRuntime.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Runtime/UXComponent/Navigation/UXNavigationRuntime.cs b/Runtime/UXComponent/Navigation/UXNavigationRuntime.cs index d12869d..3f764d8 100644 --- a/Runtime/UXComponent/Navigation/UXNavigationRuntime.cs +++ b/Runtime/UXComponent/Navigation/UXNavigationRuntime.cs @@ -26,6 +26,7 @@ namespace UnityEngine.UI [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] private static void Bootstrap() { + if (AppServices.App == null || AppServices.App.Require() == null) return; EnsureInstance(); UXInputModeService.EnsureInstance(); } @@ -348,10 +349,10 @@ namespace UnityEngine.UI } bool suppress = IsScopeAvailable(scope) - && _topScope != null - && !ReferenceEquals(scope, _topScope) - && _topScope.BlockLowerScopes - && CompareScopePriority(_topScope, scope) < 0; + && _topScope != null + && !ReferenceEquals(scope, _topScope) + && _topScope.BlockLowerScopes + && CompareScopePriority(_topScope, scope) < 0; scope.SetNavigationSuppressed(suppress); } }