C
C#2mo ago
Epiceratos

How to connect Rigid body with Reference?

No description
No description
3 Replies
Epiceratos
Epiceratos2mo ago
Im just around one week anyway
sibber
sibber2mo ago
youre looking for GerComponent and you might want to require that componenet
Salman
Salman2mo 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