Skip to content

Commit 4777c94

Browse files
committed
Merge branch 'develop' into stable
2 parents 3062b2c + b141ac4 commit 4777c94

File tree

167 files changed

+6884
-691
lines changed

Some content is hidden

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

167 files changed

+6884
-691
lines changed

.yamato/config.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ platforms_win:
3434
platforms_nix:
3535
- name: mac
3636
type: Unity::VM::osx
37-
image: package-ci/macos-12:default
37+
image: package-ci/macos-13:default
3838
flavor: m1.mac
3939
- name: mac_standalone
4040
type: Unity::VM::osx
41-
image: package-ci/macos-12:default
41+
image: package-ci/macos-13:default
4242
flavor: m1.mac
4343
runtime: StandaloneOSX
4444
- name: mac_standalone_il2cpp
4545
type: Unity::VM::osx
46-
image: package-ci/macos-12:default
46+
image: package-ci/macos-13:default
4747
flavor: m1.mac
4848
runtime: StandaloneOSX
4949
scripting-backend: Il2Cpp

Assets/Samples/CustomComposite/CustomComposite.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using UnityEngine;
23
using UnityEngine.InputSystem;
34
using UnityEngine.InputSystem.Layouts;
@@ -6,6 +7,7 @@
67
#if UNITY_EDITOR
78
using UnityEditor;
89
using UnityEngine.InputSystem.Editor;
10+
using UnityEngine.UIElements;
911
#endif
1012

1113
// Let's say we want to have a composite that takes an axis and uses
@@ -175,6 +177,30 @@ public override void OnGUI()
175177
target.scaleFactor = EditorGUILayout.Slider(m_ScaleFactorLabel, currentValue, 0, 2);
176178
}
177179

180+
#if UNITY_2022_1_OR_NEWER
181+
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
182+
{
183+
var slider = new Slider(m_ScaleFactorLabel.text, 0, 2)
184+
{
185+
value = target.scaleFactor,
186+
showInputField = true
187+
};
188+
189+
// Note: For UIToolkit sliders, as of Feb 2022, we can't register for the mouse up event directly
190+
// on the slider because an element inside the slider captures the event. The workaround is to
191+
// register for the event on the slider container. This will be fixed in a future version of
192+
// UIToolkit.
193+
slider.Q("unity-drag-container").RegisterCallback<MouseUpEvent>(evt =>
194+
{
195+
target.scaleFactor = slider.value;
196+
onChangedCallback?.Invoke();
197+
});
198+
199+
root.Add(slider);
200+
}
201+
202+
#endif
203+
178204
private GUIContent m_ScaleFactorLabel = new GUIContent("Scale Factor");
179205
}
180206
#endif

Assets/Samples/InGameHints/InGameHintsActions.cs

Lines changed: 1 addition & 1 deletion
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.5.1
4+
// version 1.6.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

Lines changed: 1 addition & 1 deletion
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.5.1
4+
// version 1.6.0
55
// from Assets/Samples/SimpleDemo/SimpleControls.inputactions
66
//
77
// Changes to this file may cause incorrect behavior and will be lost if

Assets/Tests/InputSystem.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.

0 commit comments

Comments
 (0)