Visual Studio 2019 - using random doesn't return suggestions

@miniwolf I have a script that needs using Random. When I tried adding

using Random = UnityEngine.Random;

I immediately noticed that Visual Studio 2019 returned suggestions but Random was not among them:

5232293--521921--Sans-titre-2.jpg

So I decided not to add it and see what happens. When I wrote the line of code that needed using Random, Visual Studio 2019 immediately suggested the right “using” line to add:

Typing

using Random

doesn’t return any suggestion either.

I don’t think this is a normal behaviour, which is why I report this here. I’m not sure filing a bug report is required since it’s not a Unity thing.

I’m not sure what you are trying to do, but Random is not a namespace, it is just an object. None of what you are trying to do above applies to Random. You simply need to have “using UnityEngine;” and that should be enough.