using System.Collections

Hello guys suddenly I found using the following packages not active in Visual studio.
System.Collections;
using System.Collections.Generic;
what the solution for this.

They are imported by default. That they are slightly greyed out just means that you currently do not use anything they offer, so technically (if your class if finished) you could remove them. They are imported by default since it’s very common to use, for example, List<> in your scripts.

1 Like

For future reference if Visual studio couldn’t find those namespaces/references it would have a squiggly red line under them and Unity would tell you in the console window.

1 Like

Thanks for help :slight_smile:

yeah thanks

If you don’t need to use anything from those namespaces, you can simply delete them.

I actually have the squigglies on mine. I installed a newer version of Unity because I thought it would fix a FPS issue I was having (randomly went from 700+ to ~100 FPS and I have no clue why). I installed the latest Unity version, changed it so that I could open my project in the newest version instead of having to redownload the version I made it on, and now System.Collections isn’t recognized AND the fps issue isn’t fixed. How do I get system.collections to work?

Seems like an issue where VS is not set up properly to access the Unity API. You will likely find some info about that online. I dont really remember how you’d set it up properly. However, as it’s a separate issue entirely, i would recommend creating another thread unless you can fix it with the above.

1 Like