diff --git a/Assets/Samples/InGameHints/InGameHintsActions.cs b/Assets/Samples/InGameHints/InGameHintsActions.cs index 5c880a15b2..4bd926e78d 100644 --- a/Assets/Samples/InGameHints/InGameHintsActions.cs +++ b/Assets/Samples/InGameHints/InGameHintsActions.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; -using UnityEngine; namespace UnityEngine.InputSystem.Samples.InGameHints { @@ -275,7 +274,7 @@ public @InGameHintsActions() ~@InGameHintsActions() { - Debug.Assert(!m_Gameplay.enabled, "This will cause a leak and performance issues, InGameHintsActions.Gameplay.Disable() has not been called."); + UnityEngine.Debug.Assert(!m_Gameplay.enabled, "This will cause a leak and performance issues, InGameHintsActions.Gameplay.Disable() has not been called."); } public void Dispose() diff --git a/Assets/Samples/SimpleDemo/SimpleControls.cs b/Assets/Samples/SimpleDemo/SimpleControls.cs index 279e3117eb..cb5972b685 100644 --- a/Assets/Samples/SimpleDemo/SimpleControls.cs +++ b/Assets/Samples/SimpleDemo/SimpleControls.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; -using UnityEngine; public partial class @SimpleControls: IInputActionCollection2, IDisposable { @@ -170,7 +169,7 @@ public @SimpleControls() ~@SimpleControls() { - Debug.Assert(!m_gameplay.enabled, "This will cause a leak and performance issues, SimpleControls.gameplay.Disable() has not been called."); + UnityEngine.Debug.Assert(!m_gameplay.enabled, "This will cause a leak and performance issues, SimpleControls.gameplay.Disable() has not been called."); } public void Dispose() diff --git a/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs b/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs index b4dc55fafd..47989e5de4 100644 --- a/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs +++ b/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; -using UnityEngine; public partial class @InputActionCodeGeneratorActions: IInputActionCollection2, IDisposable { @@ -83,7 +82,7 @@ public @InputActionCodeGeneratorActions() ~@InputActionCodeGeneratorActions() { - Debug.Assert(!m_gameplay.enabled, "This will cause a leak and performance issues, InputActionCodeGeneratorActions.gameplay.Disable() has not been called."); + UnityEngine.Debug.Assert(!m_gameplay.enabled, "This will cause a leak and performance issues, InputActionCodeGeneratorActions.gameplay.Disable() has not been called."); } public void Dispose() diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index c7175a3c70..bb22477046 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Fixed default scroll speed in uGUI being slower than before. [ISXB-766](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-766) - Fixed an issue when multiple interactions drive an action and perform during the cancelation of the current active interaction [ISXB-310](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-310). +- Fixed an issue when generating C# class of Input Actions that contain an action map named `Debug` [ISXB-851](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-851). ### Added - Added `InputSystemUIInputModule.scrollDeltaPerTick` property, a customizable multiplicative factor applied to the scroll wheel speed before it is sent to UI components. Note that this has no effect on UI Toolkit content, only uGUI. diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionCodeGenerator.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionCodeGenerator.cs index 1e45e37632..dab46023da 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionCodeGenerator.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionCodeGenerator.cs @@ -83,7 +83,6 @@ public static string GenerateWrapperCode(InputActionAsset asset, Options options writer.WriteLine("using System.Collections.Generic;"); writer.WriteLine("using UnityEngine.InputSystem;"); writer.WriteLine("using UnityEngine.InputSystem.Utilities;"); - writer.WriteLine("using UnityEngine;"); writer.WriteLine(""); // Begin namespace. @@ -127,7 +126,7 @@ public static string GenerateWrapperCode(InputActionAsset asset, Options options foreach (var map in maps) { var mapName = CSharpCodeHelpers.MakeIdentifier(map.name); - writer.WriteLine($"Debug.Assert(!m_{mapName}.enabled, \"This will cause a leak and performance issues, {options.className}.{mapName}.Disable() has not been called.\");"); + writer.WriteLine($"UnityEngine.Debug.Assert(!m_{mapName}.enabled, \"This will cause a leak and performance issues, {options.className}.{mapName}.Disable() has not been called.\");"); } writer.EndBlock(); writer.WriteLine();