摄像机区域的架构改动

This commit is contained in:
2026-05-15 14:47:24 +08:00
parent 1b37297585
commit f264329751
3591 changed files with 1687228 additions and 446503 deletions

View File

@@ -0,0 +1,33 @@
using UnityEngine;
namespace BaseGames.Input
{
/// <summary>
/// 在运行时启用 InputReaderSO 的 ActionMap。
/// 挂在 Persistent 场景的 InputReaderHolder 上。
/// _inputReader 必须在 Inspector 中赋值,框架不提供运行时自动查找回退。
/// </summary>
public sealed class InputReaderBootstrap : MonoBehaviour
{
[SerializeField] private InputReaderSO _inputReader;
private void Awake()
{
Debug.Assert(_inputReader != null,
"[InputReaderBootstrap] _inputReader 未在 Inspector 中赋值!请在 Persistent 场景的 InputReaderHolder 上手动指定 InputReaderSO 资产。",
this);
}
private void Start()
{
if (_inputReader == null) return;
_inputReader.LoadBindingOverrides(); // 从 PlayerPrefs 恢复用户自定义绑定
_inputReader.EnableGameplayInput();
}
private void OnDisable()
{
_inputReader?.DisableAllInput();
}
}
}