Skip to content

Commit daafedc

Browse files
committed
MERGE: develop => stable
2 parents 0343e55 + 17883b2 commit daafedc

86 files changed

Lines changed: 2225 additions & 670 deletions

File tree

Some content is hidden

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

.yamato/config.metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
editors:
22
- version: 2019.4
33
- version: 2020.3
4-
- version: 2021.1
4+
- version: 2021.2
55
- version: trunk
66
platforms:
77
- name: win

.yamato/upm-ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,17 @@ all_tests:
171171
- .yamato/upm-ci.yml#run_ios_{{ editor.version }}
172172
- .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
173173
{% endfor %}
174+
- .yamato/upm-ci.yml#publish_dryrun
174175
triggers:
175176
cancel_old_ci: true
176177
pull_requests:
177178
- targets:
178179
only:
179180
- "develop"
180181

181-
publish:
182-
name: Publish to Internal Registry
182+
{% for run in (1..2) %}
183+
publish{% cycle "", "_dryrun" %}:
184+
name: Publish to Internal Registry {% cycle "", "(Dry Run)" %}
183185
agent:
184186
type: Unity::VM
185187
image: package-ci/win10:stable
@@ -192,8 +194,9 @@ publish:
192194
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
193195
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
194196
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
195-
- upm-ci package publish --package-path ./Packages/com.unity.inputsystem/
197+
- upm-ci package publish --package-path ./Packages/com.unity.inputsystem/ {% cycle "", "--dry-run" %}
196198
artifacts:
197199
artifacts:
198200
paths:
199201
- "upm-ci~/packages/*.tgz"
202+
{% endfor %}

Assets/Samples/InGameHints/InGameHintsActions.cs

Lines changed: 4 additions & 2 deletions
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.2.0
4+
// version 1.3.0
55
// from Assets/Samples/InGameHints/InGameHintsActions.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if
@@ -17,7 +17,7 @@
1717

1818
namespace UnityEngine.InputSystem.Samples.InGameHints
1919
{
20-
public partial class @InGameHintsActions : IInputActionCollection2, IDisposable
20+
public partial class @InGameHintsActions: IInputActionCollection2, IDisposable
2121
{
2222
public InputActionAsset asset { get; }
2323
public @InGameHintsActions()
@@ -315,12 +315,14 @@ public void Disable()
315315
{
316316
asset.Disable();
317317
}
318+
318319
public IEnumerable<InputBinding> bindings => asset.bindings;
319320

320321
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
321322
{
322323
return asset.FindAction(actionNameOrId, throwIfNotFound);
323324
}
325+
324326
public int FindBinding(InputBinding bindingMask, out InputAction action)
325327
{
326328
return asset.FindBinding(bindingMask, out action);

Assets/Samples/SimpleDemo/SimpleControls.cs

Lines changed: 4 additions & 2 deletions
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.2.0
4+
// version 1.3.0
55
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if
@@ -15,7 +15,7 @@
1515
using UnityEngine.InputSystem;
1616
using UnityEngine.InputSystem.Utilities;
1717

18-
public partial class @SimpleControls : IInputActionCollection2, IDisposable
18+
public partial class @SimpleControls: IInputActionCollection2, IDisposable
1919
{
2020
public InputActionAsset asset { get; }
2121
public @SimpleControls()
@@ -210,12 +210,14 @@ public void Disable()
210210
{
211211
asset.Disable();
212212
}
213+
213214
public IEnumerable<InputBinding> bindings => asset.bindings;
214215

215216
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
216217
{
217218
return asset.FindAction(actionNameOrId, throwIfNotFound);
218219
}
220+
219221
public int FindBinding(InputBinding bindingMask, out InputAction action)
220222
{
221223
return asset.FindBinding(bindingMask, out action);

Assets/Tests/InputSystem/APIVerificationTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ public void API_DocsDoNotHaveXMLDocErrors()
476476
[Test]
477477
[Category("API")]
478478
[Ignore("Still needs a lot of documentation work to happen")]
479+
#if UNITY_EDITOR_OSX
480+
[Explicit] // Fails due to file system permissions on yamato, but works locally.
481+
#endif
479482
#if !HAVE_DOCTOOLS_INSTALLED
480483
//[Ignore("Must install com.unity.package-manager-doctools package to be able to run this test")]
481484
#endif
@@ -567,6 +570,9 @@ public void API_PrecompiledLayoutsAreUpToDate(string layoutName, string filePath
567570

568571
[Test]
569572
[Category("API")]
573+
#if UNITY_EDITOR_OSX
574+
[Explicit] // Fails due to file system permissions on yamato, but works locally.
575+
#endif
570576
public void API_MonoBehavioursHaveHelpUrls()
571577
{
572578
// We exclude abstract MonoBehaviours as these can't show up in the Unity inspector.
@@ -766,6 +772,12 @@ public class TrackedPoseDriver : UnityEngine.MonoBehaviour
766772
public class Touchscreen : UnityEngine.InputSystem.Pointer, UnityEngine.InputSystem.LowLevel.IInputStateCallbackReceiver
767773
")]
768774
[ScopedExclusionProperty("1.0.0", "UnityEngine.InputSystem.Editor", "public sealed class InputControlPathEditor : System.IDisposable", "public void OnGUI(UnityEngine.Rect rect);")]
775+
// InputEventTrace.Resize() has a new parameter with a default value.
776+
[ScopedExclusionProperty("1.0.0", "UnityEngine.InputSystem.LowLevel", "public sealed class InputEventTrace : System.Collections.Generic.IEnumerable<UnityEngine.InputSystem.LowLevel.InputEventPtr>, System.Collections.IEnumerable, System.IDisposable", "public bool Resize(long newBufferSize);")]
777+
// filterNoiseOnCurrent is Obsolete since 1.3.0
778+
[Property("Exclusions", @"1.0.0
779+
public bool filterNoiseOnCurrent { get; set; }
780+
")]
769781
public void API_MinorVersionsHaveNoBreakingChanges()
770782
{
771783
var currentVersion = CoreTests.PackageJson.ReadVersion();
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
2-
<ui:Button text="Button" display-tooltip-when-elided="true" name="Button" focusable="true" style="justify-content: flex-start; height: 100%; width: 50%; align-items: stretch; left: auto; flex-grow: 1;" />
3-
<ui:ScrollView name="ScrollView" style="flex-grow: 1; width: 50%; height: 100px; left: 50%; top: 0; flex-direction: column; flex-basis: auto; position: absolute;">
4-
<ui:TextField picking-mode="Ignore" value="filler text" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&#10;" multiline="false" readonly="true" style="font-size: 50px; white-space: normal;" />
5-
</ui:ScrollView>
2+
<ui:VisualElement style="width: 640px; height: 480px;">
3+
<ui:ScrollView name="ScrollView" style="flex-grow: 1; width: 50%; height: 100px; left: 50%; top: 0; flex-direction: column; flex-basis: auto; position: absolute;">
4+
<ui:TextField picking-mode="Ignore" value="filler text" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&#10;" multiline="false" readonly="true" style="font-size: 50px; white-space: normal;" />
5+
</ui:ScrollView>
6+
<ui:Button text="Button" display-tooltip-when-elided="true" name="Button" focusable="true" style="justify-content: flex-start; height: 100%; width: 50%; align-items: stretch; left: auto; flex-grow: 1;" />
7+
</ui:VisualElement>
68
</ui:UXML>

Assets/Tests/InputSystem/CorePerformanceTests.cs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,62 @@ public void Performance_Rebinding_OneSuccessfulCycle()
410410
.Run();
411411
}
412412

413+
public enum LookupByName
414+
{
415+
CaseMatches,
416+
CaseDoesNotMatch
417+
}
418+
419+
[Test, Performance]
420+
[Category("Performance")]
421+
[TestCase(LookupByName.CaseMatches)]
422+
[TestCase(LookupByName.CaseDoesNotMatch)]
423+
public void Performance_LookupActionByName(LookupByName lookup)
424+
{
425+
const int kActionCount = 100;
426+
427+
var asset = ScriptableObject.CreateInstance<InputActionAsset>();
428+
var map = asset.AddActionMap("map");
429+
for (var n = 0; n < kActionCount; ++n)
430+
map.AddAction("action" + n);
431+
432+
Measure.Method(() =>
433+
{
434+
var _ = asset[(lookup == LookupByName.CaseDoesNotMatch ? "ACTION" : "action") + (int)(kActionCount * 0.75f)];
435+
})
436+
.MeasurementCount(100)
437+
.WarmupCount(5)
438+
.Run();
439+
}
440+
441+
[Test, Performance]
442+
[Category("Performance")]
443+
public void Performance_LookupActionByGuid()
444+
{
445+
const int kActionCount = 100;
446+
447+
InputAction actionToFind = null;
448+
449+
var asset = ScriptableObject.CreateInstance<InputActionAsset>();
450+
var map = asset.AddActionMap("map");
451+
for (var n = 0; n < kActionCount; ++n)
452+
{
453+
var action = map.AddAction("action" + n);
454+
action.GenerateId();
455+
456+
if (n == (int)(kActionCount * 0.75f))
457+
actionToFind = action;
458+
}
459+
460+
Measure.Method(() =>
461+
{
462+
Assert.That(asset[actionToFind.id.ToString()], Is.SameAs(actionToFind));
463+
})
464+
.MeasurementCount(100)
465+
.WarmupCount(5)
466+
.Run();
467+
}
468+
413469
// We're hitting MatchesPrefix a lot from rebinding, so make sure it's performing reasonably well.
414470
[Test, Performance]
415471
[Category("Performance")]

0 commit comments

Comments
 (0)