Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputActionAssetReference fields are untyped #384

Closed
Baste-RainGames opened this issue Jan 19, 2019 · 1 comment
Closed

InputActionAssetReference fields are untyped #384

Baste-RainGames opened this issue Jan 19, 2019 · 1 comment
Labels
bug Issues where existsing functionality misbehaves

Comments

@Baste-RainGames
Copy link

I've got an input action asset that generates a C# script:

image

I've got a script with a public field of that type:

image

When assigning the field, I think I should only be able to assign the same input action asset that the type defines, but I can assign all of them:

image

That shouldn't be possible, right? If I assign menu input there, I get all kinds of trouble:

KeyNotFoundException: Could not find an action map called 'KnightMap' in asset 'MenuControls (UnityEngine.Experimental.Input.InputActionAsset)' UnityEngine.Experimental.Input.InputActionAsset.GetActionMap (System.String name) (at Library/PackageCache/com.unity.inputsystem@0.1.2-preview/InputSystem/Actions/InputActionAsset.cs:318) KnightControls.Initialize () (at Assets/Input/KnightControls.cs:22) KnightControls.get_KnightMap () (at Assets/Input/KnightControls.cs:114) InputTester.Awake () (at Assets/InputTester.cs:15)

@Rene-Damm Rene-Damm added the bug Issues where existsing functionality misbehaves label Mar 12, 2019
@JiaUnity
Copy link
Contributor

JiaUnity commented Apr 9, 2019

@JiaUnity JiaUnity closed this as completed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues where existsing functionality misbehaves
Projects
None yet
Development

No branches or pull requests

3 participants