Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ however, it has to be formatted properly to pass verification tests.
- Input Action Asset editors Auto-save feature has been modified to trigger on focus-lost when activated instead of triggering on every modification to the asset in order to reduce impact of processing required to handle modified assets.
- Project-wide input actions template extension changed from .inputactions to .json. This avoids showing template actions in the action's selector UI that are not intended to be used.
- Re-enabled some UI tests that were disabled on iOS.
- Reorganized package Project Settings so that "Input System Package" setting node contains "Input Actions" and "Settings" becomes a child node when Project-wide Actions are available. For Unity versions where Project-wide Actions are not available, the settings structure remains unchanged.

### Added
- Support for [Game rotation vector](https://developer.android.com/reference/android/hardware/Sensor#TYPE_GAME_ROTATION_VECTOR) sensor on Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,23 @@
#pragma warning disable CS0414
namespace UnityEngine.InputSystem.Editor
{
internal static class InputSettingsPath
{
public const string kSettingsRootPath = "Project/Input System Package";
}

internal class InputSettingsProvider : SettingsProvider, IDisposable
{
public const string kEditorBuildSettingsConfigKey = "com.unity.input.settings";
public const string kEditorBuildSettingsActionsConfigKey = "com.unity.input.settings.actions";

#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
// When Project Wide Actions are enabled we place this as a child node to main settings node.
public const string kSettingsPath = InputSettingsPath.kSettingsRootPath + "/Settings";
#else
// When Project Wide Actions are not enabled we let this be the main settings node.
public const string kSettingsPath = "Project/Input System Package";
#endif

public static void Open()
{
Expand All @@ -27,7 +39,14 @@ public static void Open()
[SettingsProvider]
public static SettingsProvider CreateInputSettingsProvider()
{
return new InputSettingsProvider(kSettingsPath, SettingsScope.Project);
return new InputSettingsProvider(kSettingsPath, SettingsScope.Project)
{
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
// We put this in a child node called "Settings" when Project-wide Actions is enabled.
// When not enabled it sits on the main package Settings node.
label = "Settings"
#endif
};
}

private InputSettingsProvider(string path, SettingsScope scopes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UnityEngine.InputSystem.Editor
{
internal class InputActionsEditorSettingsProvider : SettingsProvider
{
public const string kSettingsPath = "Project/Input System Package/Actions";
public const string kSettingsPath = InputSettingsPath.kSettingsRootPath;

[SerializeField] InputActionsEditorState m_State;
VisualElement m_RootVisualElement;
Expand Down Expand Up @@ -112,12 +112,7 @@ private void BuildUI()
[SettingsProvider]
public static SettingsProvider CreateGlobalInputActionsEditorProvider()
{
var provider = new InputActionsEditorSettingsProvider(kSettingsPath, SettingsScope.Project)
{
label = "Input Actions"
};

return provider;
return new InputActionsEditorSettingsProvider(kSettingsPath, SettingsScope.Project);
}
}
}
Expand Down