Why isn't VS auto-complete detecting 'Collider?'

I’m having difficulty figuring out why Visual Studio’s Intelli-sense/auto-complete feature isn’t kicking in when I declare a new Collider (or Collision). No luck on Google. Here’s a screenshot.

As a result, I’m getting a compiler error… Suggestions?

In your method ExpectCollider you are calling it again ExpectCollider = collider, shoud that read expectedCollider = collider.

1 Like

Thank you Rob! That fixed the error and I can run the game again. Visual Studio auto-complete still isn’t recognizing ‘Collider,’ but I’ll march onwards.

1 Like

No worries.

I noticed in the solution explorer on the right hand side of Visual Studio you have two projects which have failed to load.

Can you expand those details and pop a screenshot up please.

Sure, here you go:

ShootHoops! 2 is my main working project (duplicated the whole project once as a backup).

That solution doesn’t contain any projects as indicated by the (0 projects) - they have both failed to load, as such any references to libraries and such won’t have loaded either, I suspect the Unity.Engine library isn’t loaded.

I would aim to fix the projects within the solution, maybe by removing both and re-adding the correct one, or, create a new solution and add the project to it.

Try that and see if it resolves the issue.

Thanks for the advice! After some methodical trial and error, I’ve figured out that the GoogleVR package and Plugins are somehow breaking the solution’s path to the project.

Can’t reload project, nor can I load it from a new solution:

I created a new project, then started copying asset folders into it from the previous project.
I could load the solution>project in Visual Studio as normal (auto-complete working), until I copied the Plugins folder, which seems to contain GoogleVR stuff for Android, IOs, etc.

If I remove it again, Visual Studio finds the project in the solution again and auto-complete works as normal again, and the game still runs as normal.

If I copy the GoogleVR folder into the new project, I get a host of compiler errors that prevent the game from running.

Now that I’ve isolated the problem folders, I’m going to save a backup of the project, and try a fresh install of the GoogleVR custom package as shown in the tutorial video. If that breaks it again, I think I have to skip the Android programming section of the course.

Thanks for helping me narrow it down :slight_smile:

1 Like

Really pleased to hear you have made progress and well done for working through it and isolating the issue :slight_smile:

Privacy & Terms