does not contain a definition for 'Gameplay'
Posted: Tue May 02, 2023 7:54 pm
Hi Tony,
I am sure you've been over this error before, but I tried searching for it, and couldn't find anything.
I am trying to add the RegisterMyControls.cs script you advised in the youtube video about input control, and I keep getting two errors:
"Assets/Scripts/RegisterMyControls.cs(23,153): error CS1061: 'PlayerInput' does not contain a definition for 'Gameplay' and no accessible extension method 'Gameplay' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)"
"Assets/Scripts/RegisterMyControls.cs(23,77): error CS1061: 'PlayerInput' does not contain a definition for 'Gameplay' and no accessible extension method 'Gameplay' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)"
I am pretty new to coding, but I got the understood the basic issue - My PlayerInput script does not mention or define a class to 'Gameplay'.
Problem is, I don't know how I would go about doing that. Any guidiance you could give would be very much appreciated. I can post code if needed, but it's the .cs that Unity created and I haven't touched it.
I am sure you've been over this error before, but I tried searching for it, and couldn't find anything.
I am trying to add the RegisterMyControls.cs script you advised in the youtube video about input control, and I keep getting two errors:
"Assets/Scripts/RegisterMyControls.cs(23,153): error CS1061: 'PlayerInput' does not contain a definition for 'Gameplay' and no accessible extension method 'Gameplay' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)"
"Assets/Scripts/RegisterMyControls.cs(23,77): error CS1061: 'PlayerInput' does not contain a definition for 'Gameplay' and no accessible extension method 'Gameplay' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)"
I am pretty new to coding, but I got the understood the basic issue - My PlayerInput script does not mention or define a class to 'Gameplay'.
Problem is, I don't know how I would go about doing that. Any guidiance you could give would be very much appreciated. I can post code if needed, but it's the .cs that Unity created and I haven't touched it.