[SOLVED] No suggestions for 'Touchscreen' at all - on the Unity Mobile course

I’m trying to follow along the 3rd tutorial from Unity Mobile course - the “Asteroid Avoider” game.

But the touch stuff doesn’t seem to work.

  1. I have installed the InputSystem package:

  2. Then, in the code - when I type “Touchscreen” - I don’t get any suggestions. Tried Ctrl + Period on the “Trouchscreen” word - and got “No code actions available”.

  3. Then - I manually typed “using UnityEngine.InputSystem;” at the top - but still don’t get suggestions after “Touchscreen”.


Is this a matter of some setting?

Hi,

Do any of the other autocomplete work? For example if you type Start() does it give a suggestion for the start method.
It could be that its playing up or the plugins have not all been installed.

Ensure the same VScode plugins have been installed.
And in Vscode press Control, Shift and P and at the top press omnisharp and you will be presented with two options, select the one that is not the csproj one (I forget what the other one is as its early morning and having net issues so things are not opening properly)

Let me know how you get on with this

Thank you for the quick reply, Marc :slight_smile:

So - yes, I have suggestions in general - for example when I type “Start”:

I also tried your advice for the Ctrl+Shift+P - and got this dropdown:

I tried the “Restore project” option but got an error.

=====

Do you have any clue at what could be wrong? … For example - a setting in the input system:

@Nathan_Farrer Have you got any ideas on this one?

Hey, @Marc_Carlyon,

I managed to solve this by:

  1. Going to Edit → Preferences → External Tools
  2. Under "Generate .csproj files for: - I checked all the checkboxes and clicked “Regenerate project files”
  3. After that was complete - closed VS Code and opened it again. It needed several seconds, after which the formatting of the code changed - and then all was working fine.

This happened on one more small project I’m playing with - and this solved the issue there as well. (On the other project I didn’t get suggestions for - let say - “Input” - but after the steps above - all was fine.)


Some thoughts:

  1. I think there was an update for VS Code after which the things broke. But I’m not 100% sure.
  2. Also - I’m on Linux - OpenSUSE Tumbleweed - but I guess the above steps could work for Windows and Mac. too.
  3. I did the regenerating of csproj files back in the time. Not sure why I had to do it now again … but it could be because of the update of VS Code.

Anyway, thank for all the help :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms