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:
2026-05-20 11:10:31 +08:00
parent 5fd981f5b9
commit c88d2d0549
46 changed files with 6099 additions and 2588 deletions

View File

@@ -17,8 +17,13 @@ MonoBehaviour:
m_SerializedData: []
m_GUID: bb063dcc2b7a95445ba989917306f188
m_SerializeEntries:
- m_GUID: 2a1ec0c1f9a64054f95911d1cda97f6e
m_Address: Assets/_Game/Scenes/Testings/MainMenu.unity
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 6372e5b8e07d7ae4eb37a184fc8e912d
m_Address: Scene_Persistent
m_Address: Assets/_Game/Scenes/Persistent.unity
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_CheckpointRespawn
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eef5aef659932dd448be6d91119082e6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 23dad55c2f7bcc54a92ed61cc6f27c5b, type: 3}
m_Name: EVT_MaxHPContainerPickedUp
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 25684d2fcc1c0664f9bd00c8f83d1473
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aea19505e2b46be4c8f9e1002dccc739
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_LoadingComplete
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1e4580d266c4bd44c8b25a70d26608d3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62f2d5b0575789048b6badd7d1608db3, type: 3}
m_Name: EVT_LoadingProgressUpdated
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d366d52ee6a8214c8cd94d14e9ccd15
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_LoadingStarted
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 78de6bbfc7741ad47ad568ba0b65fde0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e350e72ad553c7a4c821a83692256f8b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ce6e33f4353535944a0d2573df0a08d4, type: 3}
m_Name: EVT_SlotConfirmed
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1c277e56e36d35b4393889527ad3306d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ddb591133c2948746a3afcd1010dc494
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_SplashComplete
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cba99b7e6819cd045b1869258dcef1e6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_SplashStartRequest
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d769382aa82a14d498706776dfb4091e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 07c5881d0d5ca3c42949a79f40939c3e, type: 3}
m_Name: EVT_CheckpointReached
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 172e9bc777b1b4b4b99f47e43cbaedb1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 23dad55c2f7bcc54a92ed61cc6f27c5b, type: 3}
m_Name: EVT_DoorOpened
m_EditorClassIdentifier:
description:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2e07e660aec45fb40a296a27bb0b8fbd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2a1ec0c1f9a64054f95911d1cda97f6e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -183,7 +183,7 @@ Camera:
height: 1
near clip plane: 0.1
far clip plane: 5000
field of view: 10
field of view: 40
orthographic: 0
orthographic size: 10
m_Depth: -1
@@ -210,7 +210,7 @@ Transform:
m_GameObject: {fileID: 265623115}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.19243693, y: -1.6213, z: -64}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []

View File

@@ -57,14 +57,29 @@ namespace BaseGames.Core.Assets
/// Addressable 标签常量(用于批量加载)。
/// 注意:这里是标签名称而非资产地址,不会被 AddressKeyValidator 校验。
/// </summary>
/// <summary>
/// Addressable Label 常量(用于批量加载与预热)。
/// 代码中引用 Label 时必须使用此处的常量,禁止硬编码字符串。
/// 完整说明见 Docs/Standards/AddressablesLabelSpec.md。
/// </summary>
public static class Labels
{
public const string Enemy = "Enemy";
public const string Poolable = "Poolable";
public const string BGM = "BGM";
public const string Charms = "Charms";
/// <summary>游戏启动时预热下载的资产标签BootSequencer 使用)。</summary>
/// <summary>游戏启动时通过 DownloadDependenciesAsync 预热下载依赖BootSequencer 使用)。</summary>
public const string Preload = "Preload";
/// <summary>纳入 GlobalObjectPool 对象池管理的 PrefabVFX、投射物、收集物等。</summary>
public const string Poolable = "Poolable";
/// <summary>所有敌人顶级 Prefab用于区域 Spawner 批量加载。</summary>
public const string Enemy = "Enemy";
/// <summary>背景音乐 AudioClip / FMOD bank 引用 SOAudioManager 批量建立 BGM 索引。</summary>
public const string BGM = "BGM";
/// <summary>音效 AudioClip / SFX 配置 SOAudioManager 批量建立 SFX 索引。</summary>
public const string SFX = "SFX";
/// <summary>所有护身符配置 SOCHM_*.assetEquipmentManager 批量加载护身符列表。</summary>
public const string Charms = "Charms";
/// <summary>运行时动态加载的配置类 SOInspector 直接引用的 SO 不加此标签)。</summary>
public const string Config = "Config";
/// <summary>所有武器 PrefabWPN_*.prefab玩家换形态时批量加载武器列表。</summary>
public const string Weapon = "Weapon";
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: da575c82357778a4baa083a9afcb1b8a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -40,18 +40,7 @@ namespace BaseGames.Editor
private bool _autoGroupByPrefix = true; // 按 Key 前缀自动选/建分组
// Key 前缀 → 分组名称映射Tab ① 自动分组用)
private static readonly (string Prefix, string GroupName)[] PrefixGroupMap =
{
("Scene_", "Scenes"),
("PLY_", "Player"),
("ENM_", "Enemies"),
("PROJ_", "Projectiles"),
("VFX_", "VFX"),
("UI_", "UI"),
("COL_", "Collectibles"),
("WPN_", "Weapons"),
("Config/", "Config"),
};
// 规范数据统一来自 AddressableRules此处不再声明本地副本。
// Tab ②
private DefaultAsset _folderAsset;
@@ -743,12 +732,7 @@ namespace BaseGames.Editor
/// <summary>根据 AddressKey 前缀返回建议分组名,未匹配时返回 null回退到手动选定分组。</summary>
private static string DeriveGroupName(string key)
{
foreach (var (prefix, groupName) in PrefixGroupMap)
if (key.StartsWith(prefix, StringComparison.Ordinal))
return groupName;
return null;
}
=> AddressableRules.GetExpectedGroup(key);
private static bool ExactNameMatch(string assetPath, string searchName)
{

View File

@@ -0,0 +1,486 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
namespace BaseGames.Editor
{
/// <summary>
/// Addressable 规则同步窗口。
///
/// 功能:
/// 1. 扫描所有已注册的 Addressable 资产
/// 2. 根据 <see cref="AddressableRules"/> 中的规则计算期望分组与期望标签
/// 3. 对比实际值,显示所有不符合规范的条目(分组错误 / 标签缺失 / 标签多余)
/// 4. 一键自动修复全部问题
/// 5. 导出 CSV 报告供存档或 Code Review
///
/// 菜单BaseGames → Addressables → Rule Sync
/// </summary>
public class AddressableRuleSyncWindow : EditorWindow
{
// ── 内部数据结构 ───────────────────────────────────────────────────────
private enum IssueKind { None, WrongGroup, MissingLabel, ExtraLabel }
private class EntryReport
{
public string Address;
public string AssetPath;
public string CurrentGroup;
public string ExpectedGroup; // null = 规则未覆盖,维持现状
public string[] CurrentLabels;
public string[] ExpectedLabels;
public string[] MissingLabels; // 应有但没有
public string[] ExtraLabels; // 有但不应有
public bool GroupOk => ExpectedGroup == null || CurrentGroup == ExpectedGroup;
public bool LabelsOk => MissingLabels.Length == 0 && ExtraLabels.Length == 0;
public bool IsOk => GroupOk && LabelsOk;
}
// ── 状态 ──────────────────────────────────────────────────────────────
private List<EntryReport> _reports = new();
private Vector2 _scrollPos;
private bool _showOk = false;
private bool _scanned = false;
private string _searchFilter = "";
// ── 样式(惰性初始化)────────────────────────────────────────────────
private GUIStyle _okStyle;
private GUIStyle _warnStyle;
private GUIStyle _errorStyle;
private GUIStyle _boldStyle;
private GUIStyle _rowEven;
private GUIStyle _rowOdd;
private bool _stylesReady;
// ── 颜色 ─────────────────────────────────────────────────────────────
private static readonly Color ColOk = new(0.20f, 0.78f, 0.35f, 1f);
private static readonly Color ColWarn = new(0.95f, 0.75f, 0.10f, 1f);
private static readonly Color ColError = new(0.90f, 0.25f, 0.20f, 1f);
private static readonly Color ColRowEven = new(0.22f, 0.22f, 0.22f, 0.4f);
// ── 菜单入口 ──────────────────────────────────────────────────────────
[MenuItem("BaseGames/Addressables/Rule Sync", priority = 110)]
public static void OpenWindow()
{
var win = GetWindow<AddressableRuleSyncWindow>("Addressable Rule Sync");
win.minSize = new Vector2(900, 520);
win.Show();
}
// ── GUI ───────────────────────────────────────────────────────────────
private void OnGUI()
{
EnsureStyles();
if (AddressableAssetSettingsDefaultObject.Settings == null)
{
EditorGUILayout.HelpBox(
"Addressable Settings 未初始化。\n" +
"请先执行 Window → Asset Management → Addressables → Groups → Create Addressables Settings。",
MessageType.Error);
return;
}
DrawToolbar();
DrawStats();
DrawTable();
DrawFooter();
}
// ── 工具栏 ────────────────────────────────────────────────────────────
private void DrawToolbar()
{
using (new EditorGUILayout.HorizontalScope(EditorStyles.toolbar))
{
if (GUILayout.Button("扫描", EditorStyles.toolbarButton, GUILayout.Width(80)))
Scan();
GUILayout.Space(8);
_showOk = GUILayout.Toggle(_showOk, "显示正常项", EditorStyles.toolbarButton, GUILayout.Width(80));
GUILayout.Space(8);
EditorGUILayout.LabelField("搜索:", GUILayout.Width(42));
_searchFilter = EditorGUILayout.TextField(_searchFilter, EditorStyles.toolbarSearchField,
GUILayout.Width(200));
GUILayout.FlexibleSpace();
GUI.enabled = _scanned && _reports.Any(r => !r.IsOk);
if (GUILayout.Button("✦ 修复所有问题", EditorStyles.toolbarButton, GUILayout.Width(120)))
FixAll();
GUI.enabled = _scanned;
if (GUILayout.Button("导出 CSV", EditorStyles.toolbarButton, GUILayout.Width(80)))
ExportCsv();
GUI.enabled = true;
}
}
// ── 统计行 ────────────────────────────────────────────────────────────
private void DrawStats()
{
if (!_scanned) return;
int total = _reports.Count;
int ok = _reports.Count(r => r.IsOk);
int issues = total - ok;
int wrongGrp = _reports.Count(r => !r.GroupOk);
int misLabel = _reports.Count(r => r.MissingLabels.Length > 0);
int extLabel = _reports.Count(r => r.ExtraLabels.Length > 0);
EditorGUILayout.Space(2);
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Label($"共 {total} 条目", EditorStyles.miniLabel);
GUILayout.Space(12);
DrawColoredLabel($"✅ 正常 {ok}", ColOk);
GUILayout.Space(12);
DrawColoredLabel($"⚠ 问题 {issues}", issues > 0 ? ColWarn : ColOk);
GUILayout.Space(20);
GUILayout.Label($"分组错误 {wrongGrp} | 标签缺失 {misLabel} | 标签多余 {extLabel}",
EditorStyles.miniLabel);
GUILayout.FlexibleSpace();
}
EditorGUILayout.Space(2);
}
// ── 主表格 ────────────────────────────────────────────────────────────
private void DrawTable()
{
// 表头
using (new EditorGUILayout.HorizontalScope(EditorStyles.toolbar))
{
GUILayout.Label("Address", _boldStyle, GUILayout.Width(200));
GUILayout.Label("当前分组", _boldStyle, GUILayout.Width(130));
GUILayout.Label("期望分组", _boldStyle, GUILayout.Width(130));
GUILayout.Label("缺失标签", _boldStyle, GUILayout.Width(140));
GUILayout.Label("多余标签", _boldStyle, GUILayout.Width(120));
GUILayout.Label("状态", _boldStyle, GUILayout.Width(80));
}
_scrollPos = EditorGUILayout.BeginScrollView(_scrollPos, GUILayout.ExpandHeight(true));
if (!_scanned)
{
EditorGUILayout.HelpBox("点击「扫描」按钮开始分析已注册的 Addressable 资产。", MessageType.Info);
}
else
{
var display = _reports
.Where(r => _showOk || !r.IsOk)
.Where(r => string.IsNullOrEmpty(_searchFilter)
|| r.Address.IndexOf(_searchFilter, StringComparison.OrdinalIgnoreCase) >= 0)
.ToList();
if (display.Count == 0)
{
EditorGUILayout.HelpBox(
_showOk ? "没有匹配搜索条件的条目。" : "✅ 所有资产均符合规范!",
MessageType.Info);
}
for (int i = 0; i < display.Count; i++)
DrawRow(display[i], i);
}
EditorGUILayout.EndScrollView();
}
private void DrawRow(EntryReport r, int idx)
{
var bg = idx % 2 == 0 ? _rowEven : GUIStyle.none;
using (new EditorGUILayout.HorizontalScope(bg, GUILayout.Height(20)))
{
// Address点击可 Ping
if (GUILayout.Button(r.Address, EditorStyles.linkLabel, GUILayout.Width(200)))
PingAsset(r.AssetPath);
// 当前分组
var grpColor = r.GroupOk ? ColOk : ColError;
DrawColoredLabel(r.CurrentGroup ?? "—", grpColor, GUILayout.Width(130));
// 期望分组
var expGrpText = r.ExpectedGroup ?? "(规则未覆盖)";
var expGrpColor = r.GroupOk ? ColOk : ColWarn;
DrawColoredLabel(expGrpText, expGrpColor, GUILayout.Width(130));
// 缺失标签
var missingText = r.MissingLabels.Length > 0 ? string.Join(", ", r.MissingLabels) : "—";
DrawColoredLabel(missingText, r.MissingLabels.Length > 0 ? ColError : ColOk, GUILayout.Width(140));
// 多余标签
var extraText = r.ExtraLabels.Length > 0 ? string.Join(", ", r.ExtraLabels) : "—";
DrawColoredLabel(extraText, r.ExtraLabels.Length > 0 ? ColWarn : ColOk, GUILayout.Width(120));
// 状态 + 单条修复按钮
if (r.IsOk)
{
DrawColoredLabel("✅ 正常", ColOk, GUILayout.Width(80));
}
else
{
DrawColoredLabel("⚠ 需修复", ColWarn, GUILayout.Width(60));
if (GUILayout.Button("修复", EditorStyles.miniButton, GUILayout.Width(40)))
FixEntry(r);
}
}
}
// ── 底栏 ──────────────────────────────────────────────────────────────
private void DrawFooter()
{
EditorGUILayout.Space(4);
EditorGUILayout.HelpBox(
"规则来源Docs/Standards/AddressablesLabelSpec.md §3 分组规则AssetFolderSpec.md §8.1\n" +
"「修复所有问题」仅修改已注册资产的分组/标签,不注册新资产(请用 Addressable Batch Tool。",
MessageType.None);
}
// ── 扫描逻辑 ──────────────────────────────────────────────────────────
private void Scan()
{
_reports.Clear();
var settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null) return;
// 收集所有全局标签供"多余标签"判断
var allKnownLabels = new HashSet<string>(settings.GetLabels(), StringComparer.Ordinal);
foreach (var group in settings.groups)
{
if (group == null) continue;
foreach (var entry in group.entries)
{
if (entry == null) continue;
var address = entry.address;
var expectedGroup = AddressableRules.GetExpectedGroup(address);
var expectedLbls = AddressableRules.GetExpectedLabels(address);
var currentLbls = entry.labels.ToArray();
var missing = expectedLbls.Except(currentLbls, StringComparer.Ordinal).ToArray();
var extra = currentLbls.Except(expectedLbls, StringComparer.Ordinal).ToArray();
_reports.Add(new EntryReport
{
Address = address,
AssetPath = entry.AssetPath,
CurrentGroup = group.name,
ExpectedGroup = expectedGroup,
CurrentLabels = currentLbls,
ExpectedLabels = expectedLbls,
MissingLabels = missing,
ExtraLabels = extra,
});
}
}
// 问题项排前面,正常项排后面;同类按 Address 字母序
_reports = _reports
.OrderBy(r => r.IsOk)
.ThenBy(r => r.Address, StringComparer.Ordinal)
.ToList();
_scanned = true;
Repaint();
Debug.Log($"[AddressableRuleSync] 扫描完成:{_reports.Count} 个条目," +
$"{_reports.Count(r => !r.IsOk)} 个需要修复。");
}
// ── 修复逻辑 ──────────────────────────────────────────────────────────
private void FixAll()
{
var issues = _reports.Where(r => !r.IsOk).ToList();
if (issues.Count == 0) return;
int fixedCount = 0;
foreach (var r in issues)
{
if (FixEntry(r)) fixedCount++;
}
SaveSettings();
Scan(); // 修复后重新扫描以更新结果
Debug.Log($"[AddressableRuleSync] 修复完成:共处理 {fixedCount} 个条目。");
}
private bool FixEntry(EntryReport r)
{
var settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null) return false;
var entry = FindEntry(settings, r.Address);
if (entry == null)
{
Debug.LogWarning($"[AddressableRuleSync] 找不到条目:{r.Address}");
return false;
}
bool changed = false;
// 修复分组
if (!r.GroupOk && r.ExpectedGroup != null)
{
var targetGroup = GetOrCreateGroup(settings, r.ExpectedGroup);
if (targetGroup != null && entry.parentGroup != targetGroup)
{
settings.MoveEntry(entry, targetGroup, false, false);
r.CurrentGroup = r.ExpectedGroup;
changed = true;
}
}
// 添加缺失标签
foreach (var lbl in r.MissingLabels)
{
EnsureLabelExists(settings, lbl);
entry.SetLabel(lbl, true, true);
changed = true;
}
// 移除多余标签
foreach (var lbl in r.ExtraLabels)
{
entry.SetLabel(lbl, false, true);
changed = true;
}
return changed;
}
// ── 导出 CSV ──────────────────────────────────────────────────────────
private void ExportCsv()
{
if (_reports.Count == 0) return;
var path = EditorUtility.SaveFilePanel(
"导出 Addressable Rule 报告", "", "AddressableRuleReport.csv", "csv");
if (string.IsNullOrEmpty(path)) return;
var sb = new StringBuilder();
sb.AppendLine("Address,CurrentGroup,ExpectedGroup,GroupOk,MissingLabels,ExtraLabels,Status");
foreach (var r in _reports)
{
var status = r.IsOk ? "OK" : "ISSUE";
sb.AppendLine(
$"\"{r.Address}\"," +
$"\"{r.CurrentGroup}\"," +
$"\"{r.ExpectedGroup ?? "(uncovered)"}\"," +
$"{r.GroupOk}," +
$"\"{string.Join(";", r.MissingLabels)}\"," +
$"\"{string.Join(";", r.ExtraLabels)}\"," +
$"{status}");
}
File.WriteAllText(path, sb.ToString(), Encoding.UTF8);
Debug.Log($"[AddressableRuleSync] CSV 报告已导出:{path}");
}
// ── 辅助方法 ──────────────────────────────────────────────────────────
private static AddressableAssetEntry FindEntry(AddressableAssetSettings settings, string address)
{
foreach (var group in settings.groups)
{
if (group == null) continue;
foreach (var e in group.entries)
if (e != null && e.address == address) return e;
}
return null;
}
private static AddressableAssetGroup GetOrCreateGroup(AddressableAssetSettings settings, string groupName)
{
var existing = settings.groups.FirstOrDefault(g => g != null && g.name == groupName);
if (existing != null) return existing;
var template = settings.GroupTemplateObjects.FirstOrDefault()
as AddressableAssetGroupTemplate;
var newGroup = settings.CreateGroup(groupName, false, false, true,
template != null
? new List<AddressableAssetGroupSchema>(template.SchemaObjects)
: null);
if (newGroup != null)
Debug.Log($"[AddressableRuleSync] 已自动创建分组:{groupName}");
return newGroup ?? settings.DefaultGroup;
}
private static void EnsureLabelExists(AddressableAssetSettings settings, string label)
{
var labels = settings.GetLabels();
if (!labels.Contains(label))
{
settings.AddLabel(label, true);
Debug.Log($"[AddressableRuleSync] 已创建标签:{label}");
}
}
private static void SaveSettings()
{
AssetDatabase.SaveAssets();
AddressableAssetSettingsDefaultObject.Settings?.SetDirty(
AddressableAssetSettings.ModificationEvent.EntryModified, null, true);
}
private static void PingAsset(string assetPath)
{
if (string.IsNullOrEmpty(assetPath)) return;
var obj = AssetDatabase.LoadMainAssetAtPath(assetPath);
if (obj != null) EditorGUIUtility.PingObject(obj);
}
// ── 样式初始化 ────────────────────────────────────────────────────────
private void EnsureStyles()
{
if (_stylesReady) return;
_boldStyle = new GUIStyle(EditorStyles.boldLabel) { fontSize = 11 };
_okStyle = new GUIStyle(EditorStyles.miniLabel) { normal = { textColor = ColOk } };
_warnStyle = new GUIStyle(EditorStyles.miniLabel) { normal = { textColor = ColWarn } };
_errorStyle = new GUIStyle(EditorStyles.miniLabel) { normal = { textColor = ColError } };
_rowEven = new GUIStyle();
_rowEven.normal.background = MakeTexture(1, 1, ColRowEven);
_stylesReady = true;
}
private void DrawColoredLabel(string text, Color color, params GUILayoutOption[] options)
{
var prev = GUI.color;
GUI.color = color;
GUILayout.Label(text, EditorStyles.miniLabel, options);
GUI.color = prev;
}
private static Texture2D MakeTexture(int width, int height, Color color)
{
var tex = new Texture2D(width, height);
tex.SetPixel(0, 0, color);
tex.Apply();
return tex;
}
}
}

View File

@@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using BaseGames.Core.Assets;
namespace BaseGames.Editor
{
/// <summary>
/// Addressable 分组与标签的权威规则数据。
/// 规范来源:<c>Docs/Standards/AddressablesLabelSpec.md §3</c> 与
/// <c>Docs/Standards/AssetFolderSpec.md §8</c>。
///
/// <see cref="AddressableBatchTool"/> 和 <see cref="AddressableRuleSyncWindow"/> 均引用此处,
/// 保证两个工具的分组/标签判断完全一致,修改规则时只需改这一处。
/// </summary>
public static class AddressableRules
{
// ── 前缀 → 分组名 ──────────────────────────────────────────────────────
// 规则:按 AssetFolderSpec §8.1 Group 划分策略。
// 顺序:更长/更具体的前缀必须排在更短/更泛化的前缀之前,否则短前缀会先匹配。
// 特殊Room_/Boss_ 地址的分组名在运行时动态计算,见 GetExpectedGroup()。
public static readonly (string Prefix, string Group)[] PrefixGroupMap =
{
("Scene_", "Scenes"),
("PLY_", "Player"),
("WPN_", "Player"), // 武器与玩家 Prefab 同组AssetFolderSpec §8.1
("ENM_", "Enemies"),
("PROJ_", "Projectiles"),
("VFX_", "VFX_Common"), // 通用特效组AssetFolderSpec §8.1
("UI_", "UI"),
("COL_", "Collectibles"),
("CHM_", "Config"), // 护身符 SO 归入 Config 组AddressablesLabelSpec §3.9
("Config/", "Config"),
("AUD_", "Audio_Music"),
};
// ── 精确地址 → 标签(优先级高于前缀规则)────────────────────────────────
private static readonly Dictionary<string, string[]> ExactLabelMap =
new(StringComparer.Ordinal)
{
// Scene_MainMenu 是唯一需要 Preload 的场景
{ AddressKeys.SceneMainMenu, new[] { AddressKeys.Labels.Preload } },
// Persistent 场景无需标签(随引擎启动,不通过 label 批量加载)
{ AddressKeys.ScenePersistent, Array.Empty<string>() },
// FloatingDamageText 是 Poolable + PreloadUI_ 前缀通常无 label此处例外
{ AddressKeys.PrefabUIFloatingDmgText, new[] { AddressKeys.Labels.Poolable, AddressKeys.Labels.Preload } },
// FootstepCatalog 是首帧必须可用的配置
{ AddressKeys.DataFootstepCatalog, new[] { AddressKeys.Labels.Config, AddressKeys.Labels.Preload } },
};
// ── 前缀 → 标签列表 ─────────────────────────────────────────────────────
// 顺序更具体的前缀AUD_BGM_在更泛化的前缀AUD_之前。
private static readonly (string Prefix, string[] Labels)[] PrefixLabelMap =
{
("AUD_BGM_", new[] { AddressKeys.Labels.BGM }),
("AUD_SFX_", new[] { AddressKeys.Labels.SFX }),
("AUD_", new[] { AddressKeys.Labels.BGM }), // 未细分音频默认归 BGM
("Scene_", Array.Empty<string>()), // 除 MainMenu 外场景无 label
("PLY_", new[] { AddressKeys.Labels.Preload }),
("WPN_", new[] { AddressKeys.Labels.Weapon, AddressKeys.Labels.Preload }),
("ENM_", new[] { AddressKeys.Labels.Enemy }),
("PROJ_", new[] { AddressKeys.Labels.Poolable, AddressKeys.Labels.Preload }),
("VFX_", new[] { AddressKeys.Labels.Poolable, AddressKeys.Labels.Preload }),
("UI_", Array.Empty<string>()), // 除 FloatingDamageText 外 UI 无默认 label
("COL_", new[] { AddressKeys.Labels.Poolable, AddressKeys.Labels.Preload }),
("CHM_", new[] { AddressKeys.Labels.Charms }),
("Config/", new[] { AddressKeys.Labels.Config }),
};
// ── 公开 API ───────────────────────────────────────────────────────────
/// <summary>
/// 根据 Addressable 地址字符串返回期望的分组名称。
/// <list type="bullet">
/// <item><c>Room_Forest_01</c> → <c>Room_Forest</c>(动态计算)</item>
/// <item><c>Boss_CaoZhi</c> → <c>Boss_CaoZhi</c>(动态计算)</item>
/// <item>无匹配前缀时返回 <c>null</c>(调用方可回退到 Default Group</item>
/// </list>
/// </summary>
public static string GetExpectedGroup(string address)
{
if (string.IsNullOrEmpty(address)) return null;
// Room_/Boss_ 的分组名在地址中动态编码
if (address.StartsWith("Room_", StringComparison.Ordinal))
{
var parts = address.Split('_');
return parts.Length >= 2 ? $"Room_{parts[1]}" : "Room_Unknown";
}
if (address.StartsWith("Boss_", StringComparison.Ordinal))
{
// Boss_CaoZhi → 整个地址即为分组名(与 AssetFolderSpec §8.1 一致)
return address;
}
foreach (var (prefix, group) in PrefixGroupMap)
{
if (address.StartsWith(prefix, StringComparison.Ordinal))
return group;
}
return null;
}
/// <summary>
/// 根据 Addressable 地址字符串返回期望的标签集合。
/// 精确地址匹配优先,其次前缀匹配,均无匹配时返回空数组。
/// </summary>
public static string[] GetExpectedLabels(string address)
{
if (string.IsNullOrEmpty(address)) return Array.Empty<string>();
if (ExactLabelMap.TryGetValue(address, out var exact))
return exact;
foreach (var (prefix, labels) in PrefixLabelMap)
{
if (address.StartsWith(prefix, StringComparison.Ordinal))
return labels;
}
return Array.Empty<string>();
}
}
}

View File

@@ -7,6 +7,7 @@ using BaseGames.Core;
using BaseGames.Core.Events;
using BaseGames.UI;
using BaseGames.UI.MainMenu;
using BaseGames.UI.Menus;
using BaseGames.UI.Splash;
namespace BaseGames.Editor
@@ -27,8 +28,8 @@ namespace BaseGames.Editor
{
// ── 常量 ──────────────────────────────────────────────────────────────
private const string EventRoot = "Assets/_Game/Data/Events";
private const string PersistentName = "Scene_Persistent";
private const string MainMenuName = "Scene_MainMenu";
private const string PersistentName = "Persistent";
private const string MainMenuName = "MainMenu";
// 启动流程所需的事件频道资产清单 (subfolder, assetName, SO type)
private static readonly (string folder, string name, System.Type type)[] BootChannels =

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dcbbced2e8951c542a2af85944c0c29a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -202,8 +202,6 @@ namespace BaseGames.Editor
AssignReference(cameraStateController, "_brain", brain);
AssignReference(cameraStateController, "_impulseSource", impulseSource);
AssignReference(cameraStateController, "_lookSystem", lookSystem);
AssignReference(cameraStateController, "_vcamA", vcamA);
AssignReference(cameraStateController, "_vcamB", vcamB);
AssignAsset(cameraStateController, "_onPlayerSpawned", report, true, "EVT_PlayerSpawned");
AssignAsset(cameraStateController, "_lensConfig", report, false, "CAM_LensConfig", "LensConfig", "CameraLensConfig");

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a81c593ef6b215e4c9752363738c131b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5e1f947f274273f4c9a5a310fc40a625
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a4714b32299804648acbfef71cf9ac81
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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)

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b14de374a70f8234bb49050dd91c9b6a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -2,7 +2,7 @@
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.14.2
// from Assets/Settings/PlayerInputActions.inputactions
// from Assets/_Game/Settings/PlayerInputActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -16,7 +16,7 @@ using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
/// <summary>
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/Settings/PlayerInputActions.inputactions".
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/_Game/Settings/PlayerInputActions.inputactions".
/// </summary>
/// <remarks>
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.
@@ -231,7 +231,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""b15ae123-2d81-4473-a16f-dc7f1a9d3527"",
""expectedControlType"": ""Button"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
@@ -581,21 +581,30 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""UI"",
""id"": ""905d74a5-6596-4177-8377-8a05d113b186"",
""id"": ""ba1e4240-82fc-40d3-ac98-5fe1f6ed88c0"",
""actions"": [
{
""name"": ""Navigate"",
""type"": ""Value"",
""id"": ""16469da9-bfd0-4a21-a370-d89bdb682245"",
""type"": ""PassThrough"",
""id"": ""f8fcd154-d35c-40b0-b99a-0d1df5fa2e1f"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
""initialStateCheck"": false
},
{
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""2d22c992-df5f-4d63-8a35-42a1464f7ff3"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Submit"",
""type"": ""Button"",
""id"": ""133cd9f7-2cbb-4e69-a67f-929b5f258cef"",
""id"": ""0deec593-3bdc-4a97-9b78-bc841ed7d75c"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
@@ -604,16 +613,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
{
""name"": ""Cancel"",
""type"": ""Button"",
""id"": ""d6902a56-8d24-401e-a0e7-1d9f24743377"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""bb4dfee5-99f7-43a5-971f-2e727227ae24"",
""id"": ""b304717b-ed90-4179-8543-fac11a253476"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
@@ -621,29 +621,72 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""Point"",
""type"": ""Value"",
""id"": ""4e32bfb2-f45a-4606-8b3f-74578320de78"",
""type"": ""PassThrough"",
""id"": ""97dfade5-1878-4e11-8309-5a63013df36b"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Click"",
""type"": ""PassThrough"",
""id"": ""1f4a2847-9ec5-474b-9743-5f4ff65a2479"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""ScrollWheel"",
""type"": ""PassThrough"",
""id"": ""7139aa93-a0de-4ac9-9f0d-b804e9d38c30"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""MiddleClick"",
""type"": ""PassThrough"",
""id"": ""9e9a8297-7298-4c98-94f5-dba6950ea2ba"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""RightClick"",
""type"": ""PassThrough"",
""id"": ""a9dfbbec-1954-43bb-ba82-9553ef02752c"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""TrackedDevicePosition"",
""type"": ""PassThrough"",
""id"": ""8e630404-0267-4c8f-af31-a26398ce7cf9"",
""expectedControlType"": ""Vector3"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""TrackedDeviceOrientation"",
""type"": ""PassThrough"",
""id"": ""8657997d-5de9-4a9e-bd3e-e9b00f9f8791"",
""expectedControlType"": ""Quaternion"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""33e3a0ed-3d92-4e66-89f1-d35c7f47a2bd"",
""path"": ""<Gamepad>/leftStick"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""2D Vector"",
""id"": ""0445f630-8dc6-438d-bbe9-46c34ae7abc6"",
""name"": ""Gamepad"",
""id"": ""1d26a74e-68cf-48c7-85f2-c85244e2c86f"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
@@ -654,7 +697,183 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""up"",
""id"": ""60f27c2f-f363-44bb-b0f4-cdef654322ae"",
""id"": ""b489e707-914b-4478-b911-10e75a73e5c2"",
""path"": ""<Gamepad>/leftStick/up"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""up"",
""id"": ""10f2d6a4-94da-4d79-88cc-a9dadadfa120"",
""path"": ""<Gamepad>/rightStick/up"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""ddd79bd5-5503-4eab-aca2-93d92575a84a"",
""path"": ""<Gamepad>/leftStick/down"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""9b164cbe-a66c-4caf-ba09-a6f84b36475a"",
""path"": ""<Gamepad>/rightStick/down"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""b59f3f33-9730-422a-99c1-2695cec5e48a"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""506400ef-6960-4032-9624-6ec131423eb2"",
""path"": ""<Gamepad>/rightStick/left"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""2c07c3b4-699b-4dde-ab28-5bd8f190eaf3"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""6a545dc0-75d7-4556-8af8-c060d951a2c2"",
""path"": ""<Gamepad>/rightStick/right"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""38b742b3-8125-485c-ab6d-8bfe034acb78"",
""path"": ""<Gamepad>/dpad"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""Joystick"",
""id"": ""707eaebc-a6db-449c-9c83-ae6773cdcaf7"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Navigate"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""9714a5ad-d5fb-44c3-be0f-a134a5ddb03b"",
""path"": ""<Joystick>/stick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""Joystick"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""9eef44a9-6c59-4dba-9e52-1a51edf8255e"",
""path"": ""<Joystick>/stick/down"",
""interactions"": """",
""processors"": """",
""groups"": ""Joystick"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""75219c79-9470-41e8-88ef-a35eb5d532a5"",
""path"": ""<Joystick>/stick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""Joystick"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""0eb30457-c8b6-426a-bd9a-919d3d720fef"",
""path"": ""<Joystick>/stick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""Joystick"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard"",
""id"": ""d19dae69-faee-40a3-87c0-a292c879607d"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Navigate"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""f1745283-5e7c-4121-a44e-91e4a12a86a2"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""up"",
""id"": ""fec1489f-16c5-49ea-8be3-f29336444c5a"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
@@ -665,7 +884,18 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""down"",
""id"": ""4567655f-b7a9-4458-a0c0-929d4020a401"",
""id"": ""f10707c9-071c-41f2-b97f-5f46cb95b15e"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""be8f5a8e-a4a9-4bbe-91a8-ae2811ff9696"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
@@ -676,7 +906,18 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""left"",
""id"": ""f10bf7f0-6a08-4d8a-893d-efe31c6a95e3"",
""id"": ""78875792-1535-4c46-9fad-6b6c7ae75bcd"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""fba38f2f-4996-47fc-b369-8480e9593f0b"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
@@ -687,7 +928,18 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": ""right"",
""id"": ""da749bdf-d05f-490c-827f-ab184a156c66"",
""id"": ""3fa9923b-edfb-4def-abf8-801b7d9e77ca"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Navigate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""aa7524f2-5737-44b0-8783-6e7a722ccdd5"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
@@ -698,51 +950,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": """",
""id"": ""6cc5c2c6-aa18-4f9e-a5ab-624147a93203"",
""path"": ""<Keyboard>/enter"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Submit"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""80758152-6c57-4b22-add3-98b2a6b1c113"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Submit"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""f8621671-e257-429a-b12c-2bfb1b6fa21c"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""0ca5a00e-8110-45e3-8465-0cbb6f3ea4aa"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""58af2641-5e8b-4e49-89e6-5e47ada4fb07"",
""id"": ""5c3030c2-489b-43cc-92c3-c5eed849affa"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
@@ -753,7 +961,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": """",
""id"": ""85ed737c-425e-4e66-a050-12b1ae5588ce"",
""id"": ""5632ce4b-cb65-4d5a-a133-262727b68139"",
""path"": ""<Gamepad>/start"",
""interactions"": """",
""processors"": """",
@@ -764,7 +972,29 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
},
{
""name"": """",
""id"": ""4add46ae-9c9a-4385-b180-5cd650aa89a6"",
""id"": ""5ef7192c-3c67-4fff-b29a-b21377bbc430"",
""path"": ""*/{Submit}"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"",
""action"": ""Submit"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""e6b74122-53a6-4ad1-85fb-dce8de71bf51"",
""path"": ""*/{Cancel}"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""448f17c8-8894-41c7-b41b-f39fceb9928f"",
""path"": ""<Mouse>/position"",
""interactions"": """",
""processors"": """",
@@ -772,6 +1002,127 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
""action"": ""Point"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""8ac9363b-5554-4db1-921a-76f0cd7c4630"",
""path"": ""<Pen>/position"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Point"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""80efa3a9-c91c-428c-8f39-6d2924cbaae2"",
""path"": ""<Touchscreen>/touch*/position"",
""interactions"": """",
""processors"": """",
""groups"": ""Touch"",
""action"": ""Point"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""7ea9b409-669b-46f6-b0af-c717a1406c95"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Click"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""0b684379-4daa-4656-9253-d07b04775dd2"",
""path"": ""<Pen>/tip"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Click"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""f4d64e59-b1a7-4517-9a7a-39972e4ae64a"",
""path"": ""<Touchscreen>/touch*/press"",
""interactions"": """",
""processors"": """",
""groups"": ""Touch"",
""action"": ""Click"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""1910f113-09ab-4ef0-b126-6a638f38e7d1"",
""path"": ""<XRController>/trigger"",
""interactions"": """",
""processors"": """",
""groups"": ""XR"",
""action"": ""Click"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""954897cb-1087-472a-b353-b041397ef647"",
""path"": ""<Mouse>/scroll"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""ScrollWheel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""591b8687-9f7e-498c-9cb6-aeafaa9013e7"",
""path"": ""<Mouse>/middleButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""MiddleClick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""790f83ba-a25d-4b98-ab40-e38af127bf61"",
""path"": ""<Mouse>/rightButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""RightClick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""26afc077-19d7-4014-984e-7ec31b029ec7"",
""path"": ""<XRController>/devicePosition"",
""interactions"": """",
""processors"": """",
""groups"": ""XR"",
""action"": ""TrackedDevicePosition"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""e4e7f9d2-6793-4d26-a064-5502fb8a94b1"",
""path"": ""<XRController>/deviceRotation"",
""interactions"": """",
""processors"": """",
""groups"": ""XR"",
""action"": ""TrackedDeviceOrientation"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@@ -828,10 +1179,16 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
// UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
m_UI_Pause = m_UI.FindAction("Pause", throwIfNotFound: true);
m_UI_Submit = m_UI.FindAction("Submit", throwIfNotFound: true);
m_UI_Cancel = m_UI.FindAction("Cancel", throwIfNotFound: true);
m_UI_Pause = m_UI.FindAction("Pause", throwIfNotFound: true);
m_UI_Point = m_UI.FindAction("Point", throwIfNotFound: true);
m_UI_Click = m_UI.FindAction("Click", throwIfNotFound: true);
m_UI_ScrollWheel = m_UI.FindAction("ScrollWheel", throwIfNotFound: true);
m_UI_MiddleClick = m_UI.FindAction("MiddleClick", throwIfNotFound: true);
m_UI_RightClick = m_UI.FindAction("RightClick", throwIfNotFound: true);
m_UI_TrackedDevicePosition = m_UI.FindAction("TrackedDevicePosition", throwIfNotFound: true);
m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true);
}
~@PlayerInputActions()
@@ -1186,10 +1543,16 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
private readonly InputActionMap m_UI;
private List<IUIActions> m_UIActionsCallbackInterfaces = new List<IUIActions>();
private readonly InputAction m_UI_Navigate;
private readonly InputAction m_UI_Pause;
private readonly InputAction m_UI_Submit;
private readonly InputAction m_UI_Cancel;
private readonly InputAction m_UI_Pause;
private readonly InputAction m_UI_Point;
private readonly InputAction m_UI_Click;
private readonly InputAction m_UI_ScrollWheel;
private readonly InputAction m_UI_MiddleClick;
private readonly InputAction m_UI_RightClick;
private readonly InputAction m_UI_TrackedDevicePosition;
private readonly InputAction m_UI_TrackedDeviceOrientation;
/// <summary>
/// Provides access to input actions defined in input action map "UI".
/// </summary>
@@ -1206,6 +1569,10 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @Navigate => m_Wrapper.m_UI_Navigate;
/// <summary>
/// Provides access to the underlying input action "UI/Pause".
/// </summary>
public InputAction @Pause => m_Wrapper.m_UI_Pause;
/// <summary>
/// Provides access to the underlying input action "UI/Submit".
/// </summary>
public InputAction @Submit => m_Wrapper.m_UI_Submit;
@@ -1214,14 +1581,34 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @Cancel => m_Wrapper.m_UI_Cancel;
/// <summary>
/// Provides access to the underlying input action "UI/Pause".
/// </summary>
public InputAction @Pause => m_Wrapper.m_UI_Pause;
/// <summary>
/// Provides access to the underlying input action "UI/Point".
/// </summary>
public InputAction @Point => m_Wrapper.m_UI_Point;
/// <summary>
/// Provides access to the underlying input action "UI/Click".
/// </summary>
public InputAction @Click => m_Wrapper.m_UI_Click;
/// <summary>
/// Provides access to the underlying input action "UI/ScrollWheel".
/// </summary>
public InputAction @ScrollWheel => m_Wrapper.m_UI_ScrollWheel;
/// <summary>
/// Provides access to the underlying input action "UI/MiddleClick".
/// </summary>
public InputAction @MiddleClick => m_Wrapper.m_UI_MiddleClick;
/// <summary>
/// Provides access to the underlying input action "UI/RightClick".
/// </summary>
public InputAction @RightClick => m_Wrapper.m_UI_RightClick;
/// <summary>
/// Provides access to the underlying input action "UI/TrackedDevicePosition".
/// </summary>
public InputAction @TrackedDevicePosition => m_Wrapper.m_UI_TrackedDevicePosition;
/// <summary>
/// Provides access to the underlying input action "UI/TrackedDeviceOrientation".
/// </summary>
public InputAction @TrackedDeviceOrientation => m_Wrapper.m_UI_TrackedDeviceOrientation;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_UI; }
@@ -1250,18 +1637,36 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
@Navigate.started += instance.OnNavigate;
@Navigate.performed += instance.OnNavigate;
@Navigate.canceled += instance.OnNavigate;
@Pause.started += instance.OnPause;
@Pause.performed += instance.OnPause;
@Pause.canceled += instance.OnPause;
@Submit.started += instance.OnSubmit;
@Submit.performed += instance.OnSubmit;
@Submit.canceled += instance.OnSubmit;
@Cancel.started += instance.OnCancel;
@Cancel.performed += instance.OnCancel;
@Cancel.canceled += instance.OnCancel;
@Pause.started += instance.OnPause;
@Pause.performed += instance.OnPause;
@Pause.canceled += instance.OnPause;
@Point.started += instance.OnPoint;
@Point.performed += instance.OnPoint;
@Point.canceled += instance.OnPoint;
@Click.started += instance.OnClick;
@Click.performed += instance.OnClick;
@Click.canceled += instance.OnClick;
@ScrollWheel.started += instance.OnScrollWheel;
@ScrollWheel.performed += instance.OnScrollWheel;
@ScrollWheel.canceled += instance.OnScrollWheel;
@MiddleClick.started += instance.OnMiddleClick;
@MiddleClick.performed += instance.OnMiddleClick;
@MiddleClick.canceled += instance.OnMiddleClick;
@RightClick.started += instance.OnRightClick;
@RightClick.performed += instance.OnRightClick;
@RightClick.canceled += instance.OnRightClick;
@TrackedDevicePosition.started += instance.OnTrackedDevicePosition;
@TrackedDevicePosition.performed += instance.OnTrackedDevicePosition;
@TrackedDevicePosition.canceled += instance.OnTrackedDevicePosition;
@TrackedDeviceOrientation.started += instance.OnTrackedDeviceOrientation;
@TrackedDeviceOrientation.performed += instance.OnTrackedDeviceOrientation;
@TrackedDeviceOrientation.canceled += instance.OnTrackedDeviceOrientation;
}
/// <summary>
@@ -1276,18 +1681,36 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
@Navigate.started -= instance.OnNavigate;
@Navigate.performed -= instance.OnNavigate;
@Navigate.canceled -= instance.OnNavigate;
@Pause.started -= instance.OnPause;
@Pause.performed -= instance.OnPause;
@Pause.canceled -= instance.OnPause;
@Submit.started -= instance.OnSubmit;
@Submit.performed -= instance.OnSubmit;
@Submit.canceled -= instance.OnSubmit;
@Cancel.started -= instance.OnCancel;
@Cancel.performed -= instance.OnCancel;
@Cancel.canceled -= instance.OnCancel;
@Pause.started -= instance.OnPause;
@Pause.performed -= instance.OnPause;
@Pause.canceled -= instance.OnPause;
@Point.started -= instance.OnPoint;
@Point.performed -= instance.OnPoint;
@Point.canceled -= instance.OnPoint;
@Click.started -= instance.OnClick;
@Click.performed -= instance.OnClick;
@Click.canceled -= instance.OnClick;
@ScrollWheel.started -= instance.OnScrollWheel;
@ScrollWheel.performed -= instance.OnScrollWheel;
@ScrollWheel.canceled -= instance.OnScrollWheel;
@MiddleClick.started -= instance.OnMiddleClick;
@MiddleClick.performed -= instance.OnMiddleClick;
@MiddleClick.canceled -= instance.OnMiddleClick;
@RightClick.started -= instance.OnRightClick;
@RightClick.performed -= instance.OnRightClick;
@RightClick.canceled -= instance.OnRightClick;
@TrackedDevicePosition.started -= instance.OnTrackedDevicePosition;
@TrackedDevicePosition.performed -= instance.OnTrackedDevicePosition;
@TrackedDevicePosition.canceled -= instance.OnTrackedDevicePosition;
@TrackedDeviceOrientation.started -= instance.OnTrackedDeviceOrientation;
@TrackedDeviceOrientation.performed -= instance.OnTrackedDeviceOrientation;
@TrackedDeviceOrientation.canceled -= instance.OnTrackedDeviceOrientation;
}
/// <summary>
@@ -1489,6 +1912,13 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnNavigate(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Pause" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnPause(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Submit" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
@@ -1503,18 +1933,53 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnCancel(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Pause" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnPause(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Point" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnPoint(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Click" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnClick(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "ScrollWheel" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnScrollWheel(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "MiddleClick" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnMiddleClick(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "RightClick" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnRightClick(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "TrackedDevicePosition" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnTrackedDevicePosition(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "TrackedDeviceOrientation" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnTrackedDeviceOrientation(InputAction.CallbackContext context);
}
}

View File

@@ -145,7 +145,7 @@
"name": "Pause",
"type": "Button",
"id": "b15ae123-2d81-4473-a16f-dc7f1a9d3527",
"expectedControlType": "Button",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
@@ -495,21 +495,30 @@
},
{
"name": "UI",
"id": "905d74a5-6596-4177-8377-8a05d113b186",
"id": "ba1e4240-82fc-40d3-ac98-5fe1f6ed88c0",
"actions": [
{
"name": "Navigate",
"type": "Value",
"id": "16469da9-bfd0-4a21-a370-d89bdb682245",
"type": "PassThrough",
"id": "f8fcd154-d35c-40b0-b99a-0d1df5fa2e1f",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
"initialStateCheck": false
},
{
"name": "Pause",
"type": "Button",
"id": "2d22c992-df5f-4d63-8a35-42a1464f7ff3",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Submit",
"type": "Button",
"id": "133cd9f7-2cbb-4e69-a67f-929b5f258cef",
"id": "0deec593-3bdc-4a97-9b78-bc841ed7d75c",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
@@ -518,16 +527,7 @@
{
"name": "Cancel",
"type": "Button",
"id": "d6902a56-8d24-401e-a0e7-1d9f24743377",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Pause",
"type": "Button",
"id": "bb4dfee5-99f7-43a5-971f-2e727227ae24",
"id": "b304717b-ed90-4179-8543-fac11a253476",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
@@ -535,29 +535,72 @@
},
{
"name": "Point",
"type": "Value",
"id": "4e32bfb2-f45a-4606-8b3f-74578320de78",
"type": "PassThrough",
"id": "97dfade5-1878-4e11-8309-5a63013df36b",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Click",
"type": "PassThrough",
"id": "1f4a2847-9ec5-474b-9743-5f4ff65a2479",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "ScrollWheel",
"type": "PassThrough",
"id": "7139aa93-a0de-4ac9-9f0d-b804e9d38c30",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "MiddleClick",
"type": "PassThrough",
"id": "9e9a8297-7298-4c98-94f5-dba6950ea2ba",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "RightClick",
"type": "PassThrough",
"id": "a9dfbbec-1954-43bb-ba82-9553ef02752c",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "TrackedDevicePosition",
"type": "PassThrough",
"id": "8e630404-0267-4c8f-af31-a26398ce7cf9",
"expectedControlType": "Vector3",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "TrackedDeviceOrientation",
"type": "PassThrough",
"id": "8657997d-5de9-4a9e-bd3e-e9b00f9f8791",
"expectedControlType": "Quaternion",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "33e3a0ed-3d92-4e66-89f1-d35c7f47a2bd",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "2D Vector",
"id": "0445f630-8dc6-438d-bbe9-46c34ae7abc6",
"name": "Gamepad",
"id": "1d26a74e-68cf-48c7-85f2-c85244e2c86f",
"path": "2DVector",
"interactions": "",
"processors": "",
@@ -568,7 +611,183 @@
},
{
"name": "up",
"id": "60f27c2f-f363-44bb-b0f4-cdef654322ae",
"id": "b489e707-914b-4478-b911-10e75a73e5c2",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "10f2d6a4-94da-4d79-88cc-a9dadadfa120",
"path": "<Gamepad>/rightStick/up",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "ddd79bd5-5503-4eab-aca2-93d92575a84a",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "9b164cbe-a66c-4caf-ba09-a6f84b36475a",
"path": "<Gamepad>/rightStick/down",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "b59f3f33-9730-422a-99c1-2695cec5e48a",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "506400ef-6960-4032-9624-6ec131423eb2",
"path": "<Gamepad>/rightStick/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "2c07c3b4-699b-4dde-ab28-5bd8f190eaf3",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "6a545dc0-75d7-4556-8af8-c060d951a2c2",
"path": "<Gamepad>/rightStick/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "38b742b3-8125-485c-ab6d-8bfe034acb78",
"path": "<Gamepad>/dpad",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Joystick",
"id": "707eaebc-a6db-449c-9c83-ae6773cdcaf7",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "9714a5ad-d5fb-44c3-be0f-a134a5ddb03b",
"path": "<Joystick>/stick/up",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "9eef44a9-6c59-4dba-9e52-1a51edf8255e",
"path": "<Joystick>/stick/down",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "75219c79-9470-41e8-88ef-a35eb5d532a5",
"path": "<Joystick>/stick/left",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "0eb30457-c8b6-426a-bd9a-919d3d720fef",
"path": "<Joystick>/stick/right",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard",
"id": "d19dae69-faee-40a3-87c0-a292c879607d",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Navigate",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "f1745283-5e7c-4121-a44e-91e4a12a86a2",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "fec1489f-16c5-49ea-8be3-f29336444c5a",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
@@ -579,7 +798,18 @@
},
{
"name": "down",
"id": "4567655f-b7a9-4458-a0c0-929d4020a401",
"id": "f10707c9-071c-41f2-b97f-5f46cb95b15e",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "be8f5a8e-a4a9-4bbe-91a8-ae2811ff9696",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
@@ -590,7 +820,18 @@
},
{
"name": "left",
"id": "f10bf7f0-6a08-4d8a-893d-efe31c6a95e3",
"id": "78875792-1535-4c46-9fad-6b6c7ae75bcd",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "fba38f2f-4996-47fc-b369-8480e9593f0b",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
@@ -601,7 +842,18 @@
},
{
"name": "right",
"id": "da749bdf-d05f-490c-827f-ab184a156c66",
"id": "3fa9923b-edfb-4def-abf8-801b7d9e77ca",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Navigate",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "aa7524f2-5737-44b0-8783-6e7a722ccdd5",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
@@ -612,51 +864,7 @@
},
{
"name": "",
"id": "6cc5c2c6-aa18-4f9e-a5ab-624147a93203",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Submit",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "80758152-6c57-4b22-add3-98b2a6b1c113",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Submit",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f8621671-e257-429a-b12c-2bfb1b6fa21c",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "0ca5a00e-8110-45e3-8465-0cbb6f3ea4aa",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "58af2641-5e8b-4e49-89e6-5e47ada4fb07",
"id": "5c3030c2-489b-43cc-92c3-c5eed849affa",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
@@ -667,7 +875,7 @@
},
{
"name": "",
"id": "85ed737c-425e-4e66-a050-12b1ae5588ce",
"id": "5632ce4b-cb65-4d5a-a133-262727b68139",
"path": "<Gamepad>/start",
"interactions": "",
"processors": "",
@@ -678,7 +886,29 @@
},
{
"name": "",
"id": "4add46ae-9c9a-4385-b180-5cd650aa89a6",
"id": "5ef7192c-3c67-4fff-b29a-b21377bbc430",
"path": "*/{Submit}",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
"action": "Submit",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e6b74122-53a6-4ad1-85fb-dce8de71bf51",
"path": "*/{Cancel}",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "448f17c8-8894-41c7-b41b-f39fceb9928f",
"path": "<Mouse>/position",
"interactions": "",
"processors": "",
@@ -686,6 +916,127 @@
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8ac9363b-5554-4db1-921a-76f0cd7c4630",
"path": "<Pen>/position",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "80efa3a9-c91c-428c-8f39-6d2924cbaae2",
"path": "<Touchscreen>/touch*/position",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Point",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "7ea9b409-669b-46f6-b0af-c717a1406c95",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "0b684379-4daa-4656-9253-d07b04775dd2",
"path": "<Pen>/tip",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f4d64e59-b1a7-4517-9a7a-39972e4ae64a",
"path": "<Touchscreen>/touch*/press",
"interactions": "",
"processors": "",
"groups": "Touch",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1910f113-09ab-4ef0-b126-6a638f38e7d1",
"path": "<XRController>/trigger",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Click",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "954897cb-1087-472a-b353-b041397ef647",
"path": "<Mouse>/scroll",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "ScrollWheel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "591b8687-9f7e-498c-9cb6-aeafaa9013e7",
"path": "<Mouse>/middleButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "MiddleClick",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "790f83ba-a25d-4b98-ab40-e38af127bf61",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "RightClick",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "26afc077-19d7-4014-984e-7ec31b029ec7",
"path": "<XRController>/devicePosition",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "TrackedDevicePosition",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e4e7f9d2-6793-4d26-a064-5502fb8a94b1",
"path": "<XRController>/deviceRotation",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "TrackedDeviceOrientation",
"isComposite": false,
"isPartOfComposite": false
}
]
}