Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

FIX: InputActionCodeGenerator if an action map is named debug (ISXB-851) #1968

Closed bmalrat closed 1 month ago

bmalrat commented 1 month ago

Description

When generation an input action with an action map named "Debug" it generate a code that doesn't compile. https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-851 Assets\InputSystem.cs(65,15): error CS1061: 'InputSystem.DebugActions' does not contain a definition for 'Assert' and no accessible extension method 'Assert' accepting a first argument of type 'InputSystem.DebugActions' could be found (are you missing a using directive or an assembly reference?)

Changes made

Added the prefix UnityEngine prefix to Debug to remove the ambiguity in the generated code

Testing

local test

Risk

Please describe the potential risks of your changes for the reviewers.

Checklist

Before review:

During merge:

After merge: