C
C#3mo ago
Epiceratos

How to connect Rigid body with Reference?

No description
No description
3 Replies
Epiceratos
EpiceratosOP3mo ago
Im just around one week anyway
sibber
sibber3mo ago
youre looking for GerComponent and you might want to require that componenet
Salman
Salman3mo ago
you should make the variable private :
private Rigidbody2D rb;
private Rigidbody2D rb;
Then add the Rigidbody2D component manually from the inspector and then reference it in the Start method like this :
rb = GetComponent<Rigidbody2d>();
rb = GetComponent<Rigidbody2d>();
Want results from more Discord servers?
Add your server