Search Issue Tracker

Fixed in 1.1-preview.2

Votes

0

Found in [Package]

1.0.0

Issue ID

1212052

Regression

No

[Input System] User can name InputAction asset and Action Map the same, creating compilation errors on generation

Package: Input System

-

[Input System] User can name InputAction asset and Action Map the same, creating compilation errors on generation

When using the input System package, the user is allowed to name Action Maps the same as the enclosing the InputAction asset. When/if the user eneables code generation via the "Generate C# Class" toggle, this will break compilation citing:

error CS0542: 'InputAsset': member names cannot be the same as their enclosing type

Steps to reproduce:
- Download the attached project or create a new Unity project (19.3+), installing the new Input System from the Package Manager (in preview at this time)
- In the project explorer, right click somewhere and create a new InputAction asset.
- Double click the InputAction asset to edit it
- Add a new Action Map (there will be + icon in the "Action Maps" column)
- Give the Action Map the same name as the enclosing InputAction asset
- Press Save to save the changes and close the Input Action window
- In the project explorer, select the Input Action asset created and from the inspector, toggle the "Generate C#Class" option
- Observe compilation errors

  1. Resolution Note (fix version 1.1-preview.2):

Comments (1)

  1. SanderUU

    Sep 25, 2024 11:53

    Voting disabled, but definitely not fixed.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.