NEW: Project-wide Actions#1735
Conversation
|
|
||
| AssetDatabase.AddObjectToAsset(asset, s_AssetPath); | ||
|
|
||
| // Make sure all the elements in the asset have GUIDs and that they are indeed unique. |
There was a problem hiding this comment.
I'd be tempted to split this out into a support function taking the asset as a parameter.
There was a problem hiding this comment.
In part because I think a 'restore defaults' functionality may use this later
https://jira.unity3d.com/browse/ISX-1564
| } | ||
| } | ||
|
|
||
| // Create sub-asset for each action. This is so that users can select individual input actions from the asset when they're |
There was a problem hiding this comment.
Similar to the above chunk of code I think this could be a support function
| if (InputSystem.settings == null) | ||
| return; | ||
| m_OriginalPreloadedAssets = PlayerSettings.GetPreloadedAssets(); | ||
| var preloadedAssets = PlayerSettings.GetPreloadedAssets(); |
There was a problem hiding this comment.
Could do this to avoid calling playersettings function twice as it may have higher cost.
var preloadedAssets = m_OriginalPreloadedAssets;
| @@ -1,4 +1,4 @@ | |||
| #if UNITY_EDITOR && UNITY_INPUT_SYSTEM_UI_TK_ASSET_EDITOR // We use some UITK controls that are only available in 2022.2 or later (MultiColumnListView for example) | |||
| #if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS | |||
There was a problem hiding this comment.
Is it worth keeping the comment?
| s_projectWideActions, true); | ||
| } | ||
| #else | ||
| s_projectWideActions = Resources.FindObjectsOfTypeAll<InputActionAsset>().FirstOrDefault(); |
There was a problem hiding this comment.
Is this line valid - could it end up picking up some other input action asset that we don't expect ?
There was a problem hiding this comment.
Can the resources areas only contain the pre built one or could a user tuck some in there too ?
Would it be better to iterate over all and match by name.
| // Hence we ignore adding temporary objects to preloaded assets. | ||
| if (!EditorUtility.IsPersistent(InputSystem.settings)) | ||
| #if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS | ||
| EditorBuildSettings.TryGetConfigObject(InputSettingsProvider.kEditorBuildSettingsActionsConfigKey, |
There was a problem hiding this comment.
Why do we reference config object here. We don't seem to use m_ProjectWideActions for anything
There was a problem hiding this comment.
Oh wait InputSystem.actions also pulls from the configobject.
In which case - why don't we just use that reference directly ?
(This might be ok, but it confused me a little, perhaps a little comment here would help if it remains the same)
|
|
||
| public static void SaveAsset(SerializedObject serializedAsset, InputActionsEditorWindow currentWindow = null) | ||
| { | ||
| if ((focusedWindow == null || focusedWindow is not InputActionsEditorWindow) && currentWindow == null) |
There was a problem hiding this comment.
Is it ok this check is removed - I think Joao added this to make sure not used on the Input Asset flow where IMGUI still used. Perhaps its not really needed?
… without any devices attached yet in tests
tidied whitespace in code sample
Next/Previous updated to be more intuative/same axis Names for UI Click* restored to original Added keyboard binding for Attack Added some XR bindings Some reordering too E.g. so crouch/jump next to each other This makes the diff slightly harder
…logies/InputSystem into project-wide-actions-phase1
…auto saving always atm (ISX-1556)
…her actions or controls
removed duplicate comment on private member
Pauliusd01
left a comment
There was a problem hiding this comment.
Approving to be mergable to develop. Testing will be continued in develop
jfreire-unity
left a comment
There was a problem hiding this comment.
Approving so we can start testing.
|
Merging in present state for pre-release testing
|
Description
In-built set of Actions which is installed (currently inside InputManager.asset) and is available via
InputSystem.actionsNew UITK based editor installed in Project Settings provides a UI for editing these Actions
Changes made
.inputactionsasset files)InputSystem.actionsbacked by InputManager.asset and EditorBuildSettings for PlayersManual Testing
Testing Document
Checklist
Before review:
Changed,Fixed,Addedsections.([case %number%](https://issuetracker.unity3d.com/issues/...)).Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.