Skip to content

Commit 73feff4

Browse files
committed
Merge branch 'develop' into stable
2 parents ea78ad9 + 22303aa commit 73feff4

File tree

127 files changed

+4499
-544
lines changed

Some content is hidden

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

127 files changed

+4499
-544
lines changed

.fork/custom-commands.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[
2+
{
3+
"version" : 1
4+
},
5+
{
6+
"action" : {
7+
"type" : "url",
8+
"url" : "https://github.com/Unity-Technologies/InputSystem/compare/develop...${ref:short}?expand=1"
9+
},
10+
"name" : "GitHub: Create PR for branch",
11+
"refTargets" : [
12+
"localbranch",
13+
"remotebranch"
14+
],
15+
"target" : "ref"
16+
},
17+
{
18+
"action" : {
19+
"type" : "url",
20+
"url" : "https://github.com/Unity-Technologies/InputSystem/tree/${ref:short}"
21+
},
22+
"name" : "GitHub: Open branch",
23+
"refTargets" : [
24+
"localbranch",
25+
"remotebranch"
26+
],
27+
"target" : "ref"
28+
},
29+
{
30+
"action" : {
31+
"type" : "url",
32+
"url" : "https://unity-ci.cds.internal.unity3d.com/project/130"
33+
},
34+
"name" : "View on Yamato",
35+
"target" : "repository"
36+
},
37+
{
38+
"action" : {
39+
"type" : "url",
40+
"url" : "https://unity-ci.cds.internal.unity3d.com/project/130/branch/${ref:short}"
41+
},
42+
"name" : "Yamato: Open branch",
43+
"refTargets" : [
44+
"localbranch",
45+
"remotebranch"
46+
],
47+
"target" : "ref"
48+
}
49+
]

.github/pull_request_template.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ _Please fill this section with a description what the pull request is trying to
66

77
_Please write down a short description of what changes were made._
88

9-
### Notes
9+
### Testing
1010

11-
_Please write down any additional notes, remove the section if not applicable._
11+
_Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA._
12+
13+
### Risk
14+
15+
_Please describe the potential risks of your changes for the reviewers._
1216

1317
### Checklist
1418

@@ -17,8 +21,8 @@ Before review:
1721
- [ ] Changelog entry added.
1822
- Explains the change in `Changed`, `Fixed`, `Added` sections.
1923
- For API change contains an example snippet and/or migration example.
20-
- FogBugz ticket attached, example `([case %number%](https://issuetracker.unity3d.com/issues/...))`.
21-
- FogBugz is marked as "Resolved" with *next* release version correctly set.
24+
- JIRA ticket linked, example ([case %<ID>%](https://issuetracker.unity3d.com/product/unity/issues/guid/<ID>)). If it is a private issue, just add the case ID without a link.
25+
- Jira port for the next release set as "Resolved".
2226
- [ ] Tests added/changed, if applicable.
2327
- Functional tests `Area_CanDoX`, `Area_CanDoX_EvenIfYIsTheCase`, `Area_WhenIDoX_AndYHappens_ThisIsTheResult`.
2428
- Performance tests.
@@ -37,3 +41,7 @@ During merge:
3741
- `DOCS: ___`.
3842
- `CHANGE: ___`.
3943
- `RELEASE: 1.1.0-preview.3`.
44+
45+
After merge:
46+
47+
- [ ] Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

.github/workflows/pr-title.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on pull request creation and edit events but only for the "main" branch
8+
pull_request:
9+
types:
10+
- edited
11+
- opened
12+
- synchronize
13+
branches: [ "develop" ]
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
check-pr-title:
22+
# The type of runner that the job will run on
23+
runs-on: ubuntu-latest
24+
# Steps represent a sequence of tasks that will be executed as part of the job
25+
steps:
26+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27+
- uses: actions/checkout@v4
28+
29+
# Runs a bash script from the specified working directory
30+
- name: Check PR Title begins with the required prefix
31+
shell: bash
32+
working-directory: .github/workflows
33+
env:
34+
TITLE: ${{github.event.pull_request.title}}
35+
run: bash verify-pr-title-prefix.sh $TITLE "NEW:" "CHANGE:" "FIX:" "DOCS:" "RELEASE:"
36+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
exit_with_failure()
4+
{
5+
echo "$*" 1>&2 ; exit 1;
6+
}
7+
8+
TITLE_STRING="$1"
9+
shift # Shift all arguments to the left, so $2 becomes $1, $3 becomes $2, etc.
10+
11+
# The remaining arguments are treated as an array of strings
12+
PREFIXES_REQUIRED=("$@")
13+
14+
# Validate the title string prefix based on prefixes required
15+
for PREFIX in "${PREFIXES_REQUIRED[@]}";
16+
do
17+
if [[ "$TITLE_STRING" =~ ^$PREFIX ]]; then
18+
echo ""
19+
exit 0
20+
fi
21+
done
22+
23+
PREFIXES_REQUIRED_STRING="${PREFIXES_REQUIRED[*]}"
24+
25+
exit_with_failure "PR Title needs the required prefixes: $PREFIXES_REQUIRED_STRING"

.yamato/config.metadata

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
editors:
22
- version: 2021.3
33
- version: 2022.3
4-
- version: 2023.2
4+
- version: 6000.0
55
- version: trunk
66
disable_tvos_run: true
77

@@ -46,6 +46,24 @@ platforms_nix:
4646
runtime: StandaloneOSX
4747
scripting-backend: Il2Cpp
4848
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
49+
- name: linux
50+
type: Unity::VM
51+
image: package-ci/ubuntu-20.04:v4.50.0
52+
flavor: b1.large
53+
- name: linux_standalone
54+
type: Unity::VM
55+
image: package-ci/ubuntu-20.04:v4.50.0
56+
flavor: b1.large
57+
runtime: StandaloneLinux64
58+
- name: linux_standalone_il2cpp
59+
type: Unity::VM
60+
image: package-ci/ubuntu-20.04:v4.50.0
61+
flavor: b1.large
62+
runtime: StandaloneLinux64
63+
scripting-backend: Il2Cpp
64+
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
4965
scripting_backends:
5066
- name: mono
51-
- name: il2cpp
67+
- name: il2cpp
68+
69+
ios_and_tvos_macos_bokken_image: package-ci/macos-13:v4.50.0

.yamato/upm-ci.yml

+6-6
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 {% 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
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 {% 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 {% 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
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 %} {% if platform.name == "linux" %} --suite=editor {% endif %} --api-profile=NET_4_6 {% 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:
@@ -80,7 +80,7 @@ build_ios_{{ editor.version }}:
8080
name: Build Tests on {{ editor.version }} on ios
8181
agent:
8282
type: Unity::VM::osx
83-
image: package-ci/macos-12:v4.19.0
83+
image: {{ ios_and_tvos_macos_bokken_image }}
8484
flavor: b1.large
8585
commands:
8686
- {{ utr_install_nix }}
@@ -99,7 +99,7 @@ run_ios_{{ editor.version }}:
9999
name: Run Tests on {{ editor.version }} on ios
100100
agent:
101101
type: Unity::mobile::iPhone
102-
image: package-ci/macos-12:v4.19.0
102+
image: {{ ios_and_tvos_macos_bokken_image }}
103103
model: SE
104104
flavor: b1.medium
105105
skip_checkout: true
@@ -117,7 +117,7 @@ build_tvos_{{ editor.version }}:
117117
name: Build Tests on {{ editor.version }} on tvos
118118
agent:
119119
type: Unity::VM::osx
120-
image: package-ci/macos-12:v4.19.0
120+
image: {{ ios_and_tvos_macos_bokken_image }}
121121
flavor: b1.large
122122
commands:
123123
- {{ utr_install_nix }}
@@ -136,7 +136,7 @@ run_tvos_{{ editor.version }}:
136136
name: Run Tests on {{ editor.version }} on tvos
137137
agent:
138138
type: Unity::mobile::appletv
139-
image: package-ci/macos-12:v4.19.0
139+
image: {{ ios_and_tvos_macos_bokken_image }}
140140
flavor: b1.medium
141141
skip_checkout: true
142142
dependencies:

Assets/Samples/InGameHints/InGameHintsActions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4-
// version 1.8.2
4+
// version 1.9.0
55
// from Assets/Samples/InGameHints/InGameHintsActions.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Samples/SimpleDemo/SimpleControls.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4-
// version 1.8.2
4+
// version 1.9.0
55
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Samples/Visualizers/InputActionVisualizer.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ protected void Update()
6363
{
6464
base.OnDisable();
6565

66-
s_EnabledInstances.Remove(this);
67-
if (s_EnabledInstances.Count == 0)
68-
InputSystem.onActionChange -= OnActionChange;
66+
if (s_EnabledInstances != null)
67+
{
68+
s_EnabledInstances.Remove(this);
69+
if (s_EnabledInstances.Count == 0)
70+
InputSystem.onActionChange -= OnActionChange;
71+
}
6972

7073
if (m_Visualization == Visualization.Interaction && m_Action != null)
7174
{

Assets/Samples/Visualizers/InputControlVisualizer.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ public int controlIndex
102102
if (m_Visualization == Mode.None)
103103
return;
104104

105-
s_EnabledInstances.Remove(this);
106-
if (s_EnabledInstances.Count == 0)
105+
if (s_EnabledInstances != null)
107106
{
108-
InputSystem.onDeviceChange -= OnDeviceChange;
109-
InputSystem.onEvent -= OnEvent;
107+
s_EnabledInstances.Remove(this);
108+
if (s_EnabledInstances.Count == 0)
109+
{
110+
InputSystem.onDeviceChange -= OnDeviceChange;
111+
InputSystem.onEvent -= OnEvent;
112+
}
110113
}
111114

112115
m_Control = null;

Assets/Tests/InputSystem.Editor/TestData.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using UnityEngine;
55
using UnityEngine.InputSystem;
66
using UnityEngine.InputSystem.Editor;
7+
using InputAnalytics = UnityEngine.InputSystem.InputAnalytics;
78
using Random = UnityEngine.Random;
89

910
public static class TestData
@@ -33,11 +34,13 @@ public static class TestData
3334
});
3435

3536
internal static Generator<InputActionsEditorState> editorState =
36-
new(() => new InputActionsEditorState(new SerializedObject(ScriptableObject.CreateInstance<InputActionAsset>())));
37+
new(() => new InputActionsEditorState(
38+
new InputActionsEditorSessionAnalytic(InputActionsEditorSessionAnalytic.Data.Kind.EditorWindow),
39+
new SerializedObject(ScriptableObject.CreateInstance<InputActionAsset>())));
3740

3841
internal static Generator<InputActionsEditorState> EditorStateWithAsset(ScriptableObject asset)
3942
{
40-
return new Generator<InputActionsEditorState>(() => new InputActionsEditorState(new SerializedObject(asset)));
43+
return new Generator<InputActionsEditorState>(() => new InputActionsEditorState(null, new SerializedObject(asset)));
4144
}
4245

4346
public static Generator<InputControlScheme.DeviceRequirement> deviceRequirement =

Assets/Tests/InputSystem/APIVerificationTests.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ public void API_PrecompiledLayoutsAreUpToDate(string layoutName, string filePath
230230

231231
[Test]
232232
[Category("API")]
233-
#if UNITY_EDITOR_OSX
233+
#if UNITY_EDITOR_OSX
234234
[Explicit] // Fails due to file system permissions on yamato, but works locally.
235+
#endif
236+
#if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
237+
[Ignore("Disabled to make test suite pass on Linux")]
235238
#endif
236239
public void API_MonoBehavioursHaveHelpUrls()
237240
{
@@ -701,6 +704,9 @@ public ScopedExclusionPropertyAttribute(string version, string ns, string type,
701704

702705
[Test]
703706
[Category("API")]
707+
#if UNITY_EDITOR_LINUX
708+
[Ignore("Disabled to make test suite pass on Linux")]
709+
#endif
704710
public void API_DocumentationManualDoesNotHaveMissingOrUnusedImages()
705711
{
706712
const string docsPath = "Packages/com.unity.inputsystem/Documentation~/";

0 commit comments

Comments
 (0)