I’m using Unity 2019.1.1f1 alongside Input System 0.2.8, which I just upgraded to from 0.2.1. When creating the generated class Controls.cs from Controls.inputactions, I got the following error:
Assets/Controls.cs(9,25): error CS0246: The type or namespace name 'InputActionAssetReference' could not be found (are you missing a using directive or an assembly reference?)
Any ideas on how to fix this? Thanks in advance!
The Input System no longer uses InputActionAssetReferences to which you need to assign the asset for the generated wrapper code - instead it will now embed the asset data into the wrapper code itself. That way, we save the step of having to manually assign the reference. Now, your Controls.cs is still using the old style. Try deleting and regenerating it.
That doesn’t work on its own. Even after updating to 0.2.8, deleting Controls file and regenerating it, the file would still be created in the old way.
As tiskolin found out in his other thread , you also need to restart Unity after updating. Then it works.
1 Like