Skip to content

What am I missing? I'm following a tutorial and I got to this point. The guy is "referencing the rigid body and when he typed "rigi" a drop down suggestion appeared where he clicked the rigidbody selection, but when I type it out, no drop down. I even tried typing it out in its entirety, but nothing

Not downloaded yet
17 points70 comments
Open on Reddit
About this post
Posted
Archived
Score
17 · 100% up
Kind
Image
ID
pcaid0

Author

10
posts
138
comments
3
media
View profile

80 comments

It's called Intellisense, I think the methods of enabling are different depending on which code editor you are using. Goolge enable intellisense and your editor and you should easily find how to do it.

2 points

Its Visual studio code. I'll try to look it up.

Do I need to install any extensions as well?

1 points

The YouTuber is using Visual Studio Community Edition. Not VS Code.

Visual Studio Community Edition has a native extension for Unity Intellisense and Unity hooking.

1 points

I enabled intellisense, but it just says "No suggestions". I'm definitely missing something.

1 points

I can help you out on Discord, if you send me a DM

2 points

I appreciate the offer, but I already gave up on it and just unistalled Visual Studio Code. I just went with Visual Studio 2019 instead.

I think I figured out the issue to be something about the incorrect version of the .NET framework, but I had already downloaded one of the versions while trying to fix it and it didn't solve the problem, but it did clear an error message in VSCode that was apparently supposed to tell me which framework to use (I didn't find that out until after) but now I don't know how to find and delete the version of the framework that I don't need, and have no other way of figuring out which version I would've needed.

2 points

That was probably a good idea. I personally prefer JetBrains Rider, as I use JetBrains IDEs for all my different programming projects.

1 points

Do you have the "using UnityEngine" reference? That is where rigidbody is coming from

2 points

Yeah. It's in the first line. Exactly as it was when I opened the script. I cleaned it up exactly like he did in the video, but left that at the top. I type in "private" and it recognizes it as a keyword, then I start typing "rigi" and there are "no suggestions". Even if I type it out fully, it doesn't recognize it as anything.

2 points
unknown author16 hidden

Deleted before we saved it.

1 points

Thats exactly how I got into the script. I created a folder in the assets window labeled "scripts" I opened the folder, right clicked, clscrolled to "create", clicked C# Script, and it took me to Visual Studios Code where it already had a bit of code written. Including the "using unity" at the top. Everything should be working, and yet its not recognizing it. I have no idea why I'm having this issue.

1 points

Im not expert in programming, but I think Unity uses like 3 libraries that are there by default in Visual Studio if you successfully chose VS as your default coding software. I only see one in your picture and I have not idea if that is the problem or not, but you migjt wanna check

1 points

I'm not sure what exactly you mean. The picture is a screenshot of the video I was watching. I'm using Visual Studio Code, which is the one recommended for use in unity by most. I don't have any other coding software on my PC. Before I downloaded VSC, I couldn't even access any of the scripts.

1 points

TLDR: use visual studio for now. There’s a lot less setup involved.

The frustration you are feeling is normal. Game dev can have A LOT of roadblocks especially when you are beginning. My advice is to not get too stuck. Setting up vs code can be a harrowing process. For some people it’s super easy and quick, for others they have more trouble. I’ve had tons of trouble setting it up on one comp and easy with another. One valuable skill you should learn if you want to keep continuing is to know when to stop struggling and pivot to the easy solution, which in this case would to just use visual studio. Later when you’re not frustrated, try setting it up again, you’ll get it eventually.

1 points

Thats what I did. Normally I try to face the issue and fix it, instead of finding the easy way around, but this one was just too difficult. I finally cracked and downloaded Visual Studio instead. Which isn't bad, or anything. I was just told that Code was better. After the struggle I went through, though, I have to disagree.

Now the battle is trying to figure out why my code is throwing errors when I've written it exactly how it was in the tutorial.

1 points

Yes I know what you mean. Being a good developer means you have to be persistent but also choosing your battles can be extremely helpful as well. Glad you got your editor working, good luck with the code!

2 points

I had a similar thing happen when I started Unity. In Visual Studio, just under the Extensions tab at the top, there's a little drop down that should say "Attach to Unity." There's a couple hoops to jump through to get it setup iirc. But until I got that hooked up, I had to manually type out Rigidbody2D and all that jazz. You can see it in the picture you posted. There's a green arrow pointing to the right.

1 points

Even when I typed out Rigidbody 2D entirely, it didn't recognize it. It wasn't recognizing any keywords from Unity. Nothing related to Unity whatsoever. I give up trying to figure out what could be causing it. Just gonna scrap it all and uninstall everything. Not sure whether I even want to try again at this point. I'm livid.

1 points

In unity Go to preferences,External tools and select VSC in external script editor maybe that will work

1 points

I already have it set as the external script editor. Based on what I've seen in a video I just watched, it has something to do with the required .NET framework for Visual Studio Code. Unfortunately, when I was following the step by step instructions on Visual Studios support page, I ended up downloading some random .NET framework because I wasn't sure which version to download. In doing so, it cleared an error message in Visual Studio Code, which I thought was a good thing. However, upon watching the video, that error was needed to display which version of the .NET framework I needed for VSC. Now, I don't know how to find and delete the versions of framework I downloaded earlier, which I need to do in order to bring back the error message and figure out which framework I need to download.

In the video, after downloading the proper framework, his VSC worked perfectly fine. Thats my solution, but now I have a whole different problem... finding the crap I downloaded and deleting it. But I have no idea how to delete .NET framework or which ones I need to delete.

1 points
unknown author1 hidden

Deleted before we saved it.

1 points

I did have it set as the external editor. It still wasn't working at all.

I did end up scrapping VS Code and going with VS 2019 instead. After setting that as the external editor, it works fine so far. VSCode is just broken for me. No idea how to fix it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.