diff --git a/Assets/Tests/InputSystem/APIVerificationTests.cs b/Assets/Tests/InputSystem/APIVerificationTests.cs index a32c881c44..32bfa184ea 100644 --- a/Assets/Tests/InputSystem/APIVerificationTests.cs +++ b/Assets/Tests/InputSystem/APIVerificationTests.cs @@ -250,6 +250,25 @@ public void API_MonoBehavioursHaveHelpUrls() Assert.That(monoBehaviourTypesHelpUrls, Has.All.StartWith(InputSystem.kDocUrl)); } + [Test] + [Category("API")] + public void API_InputActionImporterHasHelpUrlToExistingManualPage() + { + const string manualPrefix = "/manual/"; + + var helpUrlAttribute = typeof(InputActionImporter).GetCustomAttribute(); + Assert.That(helpUrlAttribute, Is.Not.Null, "InputActionImporter has no HelpURL attribute, so the .inputactions Inspector help button falls back to a generated URL with no published page."); + Assert.That(helpUrlAttribute.URL, Does.StartWith(InputSystem.kDocUrl + manualPrefix)); + + var page = helpUrlAttribute.URL.Substring(InputSystem.kDocUrl.Length + manualPrefix.Length); + var anchorIndex = page.IndexOf('#'); + if (anchorIndex >= 0) + page = page.Substring(0, anchorIndex); + + var markdownPath = "Packages/com.unity.inputsystem/Documentation~/" + Path.ChangeExtension(page, ".md"); + Assert.That(File.Exists(markdownPath), Is.True, $"HelpURL of InputActionImporter points at {helpUrlAttribute.URL} but {markdownPath} does not exist."); + } + private const string kAPIDirectory = "Tools/API"; ////FIXME: The .api-based checks are temporary and don't account for platform-specific APIs. Nuke these tests as soon diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 5e13c71fe8..9a6d3514da 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed +- Fixed the Inspector help button for a selected `.inputactions` asset ("Open Reference for Input Action Importer") opening a missing documentation page; it now links to the Action Assets manual page [UUM-149518](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-149518) - Fixed an `OverflowException` when creating a control scheme (or other named item) whose all-numeric name exceeds `Int32.MaxValue`, which previously discarded the entered name and fell back to the default [UUM-145766](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-145766) - Fixed the Input Actions editor window logging a "Failed to load asset" exception on editor startup when its saved window layout was restored in a project where the referenced asset GUID did not resolve; the window now closes quietly instead [UUM-144318](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144318) - Empty foldouts are no longer shown for processors and interactions that have no settings (e.g. "Invert") [UUM-144325](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144325) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs index 126fb83de3..b572b29029 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs @@ -22,6 +22,7 @@ namespace UnityEngine.InputSystem.Editor /// Will not overwrite existing wrappers except if the generated code actually differs. /// [ScriptedImporter(kVersion, InputActionAsset.Extension)] + [HelpURL(InputSystem.kDocUrl + "/manual/action-assets.html")] internal class InputActionImporter : ScriptedImporter { private const int kVersion = 14;