feat: Addressables rules/sync tools, UI fixes, AddressKeys update
- Add AddressableRules.cs: single source of truth for prefix->group and prefix->label rules - Add AddressableRuleSyncWindow.cs: scan/fix/export-CSV tool (BaseGames > Addressables > Rule Sync) - AddressableBatchTool.cs: delegate DeriveGroupName to AddressableRules, remove duplicate PrefixGroupMap - AddressKeys.cs: add Labels constants (Preload, Poolable, Enemy, BGM, SFX, Charms, Config, Weapon) - Docs/Standards/AddressablesLabelSpec.md: new label naming & assignment spec - Docs/Standards/AssetFolderSpec.md: update Addressables group strategy section - SplashScreenController.cs: fix MainMenu loading flow - BootFlowSetupWizard.cs / SceneScaffoldTools.cs: scene scaffold fixes - PlayerInputActions: set UI/Point to Pass-Through type - Persistent.unity: add BootSequencer to auto-load MainMenu on play - EditorBuildSettings.asset: register scenes for build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using BaseGames.Core.Events;
|
||||
|
||||
namespace BaseGames.UI.Splash
|
||||
@@ -35,6 +36,7 @@ namespace BaseGames.UI.Splash
|
||||
[SerializeField] private VoidEventChannelSO _onSplashComplete; // Raise
|
||||
|
||||
private bool _skipRequested;
|
||||
private InputAction _anyButtonAction;
|
||||
private readonly CompositeDisposable _subs = new();
|
||||
|
||||
// ── 生命周期 ─────────────────────────────────────────────────────────
|
||||
@@ -45,10 +47,28 @@ namespace BaseGames.UI.Splash
|
||||
SetAlpha(_splashRoot, 1f, blocksRaycasts: true);
|
||||
SetAlpha(_studioLogoGroup, 0f, blocksRaycasts: false);
|
||||
SetAlpha(_gameTitleGroup, 0f, blocksRaycasts: false);
|
||||
|
||||
// 通配符绑定:捕获任意设备的任意按键/手柄键/触屏按压
|
||||
_anyButtonAction = new InputAction(binding: "/*/<button>");
|
||||
_anyButtonAction.performed += _ => _skipRequested = true;
|
||||
}
|
||||
|
||||
private void OnEnable() => _onSplashStartRequest?.Subscribe(OnStartRequested).AddTo(_subs);
|
||||
private void OnDisable() => _subs.Clear();
|
||||
private void OnEnable()
|
||||
{
|
||||
_onSplashStartRequest?.Subscribe(OnStartRequested).AddTo(_subs);
|
||||
_anyButtonAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
_subs.Clear();
|
||||
_anyButtonAction.Disable();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_anyButtonAction.Dispose();
|
||||
}
|
||||
|
||||
// ── 入口 ─────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -94,14 +114,6 @@ namespace BaseGames.UI.Splash
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// ── Unity 输入(任意按键跳过)────────────────────────────────────────
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.anyKeyDown)
|
||||
_skipRequested = true;
|
||||
}
|
||||
|
||||
// ── 内部工具 ─────────────────────────────────────────────────────────
|
||||
|
||||
private IEnumerator FadeGroup(CanvasGroup group, float from, float to, float duration)
|
||||
|
||||
Reference in New Issue
Block a user