Skip to content

Commit c21ca7e

Browse files
committed
Merge branch 'develop' into stable
2 parents f1497f4 + 99a46a2 commit c21ca7e

File tree

217 files changed

+20578
-4506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+20578
-4506
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ docerrors.log
2828

2929
Assets/**/*.api
3030
Assets/**/*.api.meta
31+
Assets/__TestInputAsset.inputactions
32+
Assets/__TestInputAsset.inputactions.meta
3133

3234
Packages/packages-lock.json
3335
Packages/com.unity.inputsystem/artifacts/**

.yamato/config.metadata

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
editors:
22
- version: 2021.3
33
- version: 2022.3
4-
- version: 2023.1
54
- version: 2023.2
65
- version: trunk
76
disable_tvos_run: true
@@ -29,7 +28,7 @@ platforms_win:
2928
flavor: b1.large
3029
runtime: StandaloneWindows64
3130
scripting-backend: Il2Cpp
32-
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
31+
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
3332
platforms_nix:
3433
- name: mac
3534
type: Unity::VM::osx
@@ -46,7 +45,7 @@ platforms_nix:
4645
flavor: m1.mac
4746
runtime: StandaloneOSX
4847
scripting-backend: Il2Cpp
49-
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP -w -u
48+
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
5049
scripting_backends:
5150
- name: mono
5251
- name: il2cpp

.yamato/upm-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
3333
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
3434
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
35-
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
35+
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
3636
artifacts:
3737
UTR_Output.zip:
3838
paths:
@@ -67,7 +67,7 @@
6767
- mv ./Packages/com.unity.inputsystem/Samples ./Assets
6868
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
6969
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
70-
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
70+
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" %} --suite=editor {% endif %} --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
7171
artifacts:
7272
UTR_Output.zip:
7373
paths:
@@ -85,7 +85,7 @@ build_ios_{{ editor.version }}:
8585
commands:
8686
- {{ utr_install_nix }}
8787
- {{ unity_downloader_install }}
88-
- unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
88+
- unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast --wait
8989
- ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
9090
artifacts:
9191
players:
@@ -122,7 +122,7 @@ build_tvos_{{ editor.version }}:
122122
commands:
123123
- {{ utr_install_nix }}
124124
- {{ unity_downloader_install }}
125-
- unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast -w
125+
- unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast --wait
126126
- ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
127127
artifacts:
128128
players:
@@ -159,7 +159,7 @@ build_android_{{ editor.version }}_{{ backend.name }}:
159159
commands:
160160
- {{ utr_install_win }}
161161
- {{ unity_downloader_install }}
162-
- unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
162+
- unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast --wait
163163
- ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
164164
artifacts:
165165
players:

Assets/Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Editor/AddScenesToBuild.cs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
using System.Collections.Generic;
2+
using UnityEditor;
3+
using UnityEditor.SceneManagement;
4+
using UnityEngine;
5+
6+
[InitializeOnLoad]
7+
public class AddScenesToBuild : EditorWindow
8+
{
9+
private const string corePlatformsMenu = "Assets/QA/Tests/Core Platform Menu/Core Platforms Menu.unity";
10+
11+
[MenuItem("QA Tools/Open Core Scene Menu")]
12+
static void OpenScene()
13+
{
14+
EditorSceneManager.OpenScene(corePlatformsMenu);
15+
}
16+
17+
[MenuItem("QA Tools/Add All Core Samples to Build")]
18+
private static void AddAllScenesToBuildExcludingXboxAndXR()
19+
{
20+
// Get all available scenes in the project
21+
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene");
22+
string[] scenePaths = new string[sceneGuids.Length];
23+
24+
for (int i = 0; i < sceneGuids.Length; i++)
25+
{
26+
scenePaths[i] = AssetDatabase.GUIDToAssetPath(sceneGuids[i]);
27+
}
28+
// Filter out scenes in folders containing "xbox" or "xr"
29+
List<string> filteredScenePaths = new List<string>();
30+
string coreScene = null;
31+
32+
// Find the corePlatformsMenu scene and remove it from the general scene list
33+
for (int i = 0; i < scenePaths.Length; i++)
34+
{
35+
if (scenePaths[i] == corePlatformsMenu)
36+
{
37+
coreScene = scenePaths[i];
38+
}
39+
else if (!IsPathInExcludedFolder(scenePaths[i]))
40+
{
41+
filteredScenePaths.Add(scenePaths[i]);
42+
}
43+
}
44+
45+
// Add and ensure "Core Platforms Menu" is at the beginning of the list
46+
if (!string.IsNullOrEmpty(coreScene))
47+
{
48+
filteredScenePaths.Insert(0, coreScene);
49+
}
50+
51+
// Update the build settings
52+
EditorBuildSettingsScene[] buildScenes = new EditorBuildSettingsScene[filteredScenePaths.Count];
53+
for (int i = 0; i < filteredScenePaths.Count; i++)
54+
{
55+
buildScenes[i] = new EditorBuildSettingsScene(filteredScenePaths[i], true);
56+
}
57+
EditorBuildSettings.scenes = buildScenes;
58+
Debug.Log("All scenes (excluding Xbox and XR) added to build settings.");
59+
}
60+
61+
private static bool IsPathInExcludedFolder(string path)
62+
{
63+
// Specify folder names to exclude
64+
string[] excludedFolders = { "xbox", "xr" };
65+
66+
// Check if the path or any part of it contains any of the excluded folder names
67+
foreach (string folder in excludedFolders)
68+
{
69+
if (path.ToLower().Contains(folder.ToLower()))
70+
{
71+
return true;
72+
}
73+
}
74+
return false;
75+
}
76+
77+
private static void SaveBuildSettings()
78+
{
79+
// Save the current build settings to EditorPrefs
80+
int sceneCount = EditorBuildSettings.scenes.Length;
81+
EditorPrefs.SetInt("BuildSettingsSceneCount", sceneCount);
82+
for (int i = 0; i < sceneCount; i++)
83+
{
84+
EditorPrefs.SetString($"BuildSettingsScenePath_{i}", EditorBuildSettings.scenes[i].path);
85+
EditorPrefs.SetBool($"BuildSettingsSceneEnabled_{i}", EditorBuildSettings.scenes[i].enabled);
86+
}
87+
}
88+
89+
private static void RestoreBuildSettings()
90+
{
91+
// Restore the build settings from EditorPrefs
92+
int sceneCount = EditorPrefs.GetInt("BuildSettingsSceneCount", 0);
93+
EditorBuildSettingsScene[] buildScenes = new EditorBuildSettingsScene[sceneCount];
94+
for (int i = 0; i < sceneCount; i++)
95+
{
96+
string scenePath = EditorPrefs.GetString($"BuildSettingsScenePath_{i}", "");
97+
bool sceneEnabled = EditorPrefs.GetBool($"BuildSettingsSceneEnabled_{i}", false);
98+
99+
buildScenes[i] = new EditorBuildSettingsScene(scenePath, sceneEnabled);
100+
}
101+
EditorBuildSettings.scenes = buildScenes;
102+
}
103+
}

Assets/Editor/AddScenesToBuild.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)