VS cant find UnityStandardAssets

Hello.
I’m following Ben’s instructions closely but when I make the new script and open it in VS I can’t access UnityStandardAssets. I have imported and re-imported the asset pack to unity but it’s not working.

Have included a video to show you what I mean.

Please help!

Thankyou

Hi Urist,

The Standard Assets are already in your project by the looks of things, they are in Assets. If you expand this folder, do you have the CrossPlatformInputManager.cs script?


Updated Sat May 05 2018 10:44

I note that you remove two of the first pass project which are contained within your solution, any reason why? If I had to make a guess here, without seeing your project, I would imagine the scripts you require are within those libraries.

If it helps, I had this problem too. When I tried to import it again it said I already had everything imported. I wrote the import statement: using UnityStandardAssets.CrossPlatformInput; then saved, next I just closed down Unity and Visual Studio, then opened Unity again and from there opened the Player script and it worked so see if it helps. Seems to be a slight issue with files syncing between VS and Unity.

1 Like

I believe the reason those libraries with the first pass references are there is because a script may have been moved into the Standard Assets directory. Unity has a specific build or for special directories.

Couple of things you can test;

  • did you put (at any point) your own script(s) into the Standard Assets folder, if so, remove them back into just Assets
  • create a new project, important the Utility package, create a new script, add using UnityStandardAssets - is it accept now?

@vaeloc - did you notice any like @Urist_McMurgen’s video shows within Visual Studio - e.g. those other projects?


See also;

Thanks for the reply guys.

You are right. If i don’t remove frstpass and firstpass-editor then it works. I was deleting hem previously because for some reason having them they was causing a compile error (in my previous project).

I looked in my folder structure and none of my own scripts are in StandardAssets. They are all in my normal Assets folder. The imported assets are here;


So I still cant figure out why they are appearing in VS like this;
image
My own scripts are in the first assembly but the imported ones are in firstpass and firstpass-Editor.
Is that normal?

I’m on the same boat, @Urist_McMurgen though I’m having a slightly different issue.
I’m not getting any autocomplete when typing using UnityStandardAssets.CrossPlatformInput;, but even worse I’m not getting any autocomplete at all for anything related to CrossPlatformInput.

I’ve replied below another student who was having the same issue that hasn’t been solved here (udemy Q&A).

While the code is working, I don’t enjoy not knowing if I’ve typed something out correctly, and relying on the videos to know the member functions available to me.

**Update:** downloaded VS 2017 installer. Installed VS update. Problem solved. All autocomplete works beautifully.

Yep.

Privacy & Terms