Reply To: I'm curious now: Is there a certain way that I need to code, to bring in the Rigidbody component? I was looking at the que…

Forum Archive I'm curious now: Is there a certain way that I need to code, to bring in the Rigidbody component? I was looking at the que… Reply To: I'm curious now: Is there a certain way that I need to code, to bring in the Rigidbody component? I was looking at the que…

#23031
Jonathan Gonzalez
Participant

    Just to clarify a bit as it can be confusing. Unity will automatically cache these commonly used components for you. In general if you want to access something within a script, you need to tell Unity to Get that component, or “Get that script” so you can access it. That’s all you’re doing with GetComponent. With a Rigidbody it’s not really necessary at the moment to do that since Unity does that in the background, although they have required it in the past (like in Unity 5.0), but not at the moment.