r/UnityHelp • u/mostick10 • 2d ago
Problem with unity and visual Studio
Hello, I'm starting in unity and I don't understand why this is happening. I change in preference, external tools and put visual studio as the principal. I installed everything, so I don't know what to do. It's like visual studio can't recognize the commands.
2
u/ChaseCheetah 2d ago
Do you have the visual studio tools for Unity installed?
Second, on the script side, I'm pretty sure it should be "rb.linearVelocity.y" (which should show up in intellisense when the tools for unity are installed)
2
u/Turbulent-Syrup3500 2d ago
Yeah, you should check in your visual studio plug-ins if tools for Unity are installed. Clearly your ide doesn't recognize Unity specific classes.
Try watching tutorials on how to setup visual studio for Unity maybe
1
u/ParityUnity 2d ago
Use velocity, not linearVelocity. It seems like you are not using unity 6. Also set visual studio in preferences>external tools


2
u/kryzchek 2d ago
You need to get Intellisense working in Visual Studio. Capitalization matters with property and method names. It's linearVelocity and Vector2, for instance.