- Home /
Can we refer to two rigidbodies2d in a single script?
I have a script which is attached to a certain rigid body and in that script i have defined two rigid bodies and later in the inspector i have option to assign rigidbodies to those two objects,but only one rigidbody is displaying in the option to select and that is the one to which the script is attached.
So does this mean that i have to create new script for each rigidbody2d?
Sorry for the poor english .And also i am new to scripting and unity.
You can refer to as many RBs as you want. You can just drag and drop any RB to an inspector field of the appropriate type.
Your answer
Follow this Question
Related Questions
Text in the scene is not being updated! 0 Answers
Tag detection not working with rigidbody 0 Answers
Multiple Cars not working 1 Answer
Script on Prefab is not changeable without changing all other instaniated objects 1 Answer
Displaying the y value score,Displaying the score of the Y value 1 Answer