- Home /
Question by
Thomas0899 · Feb 24, 2017 at 09:49 AM ·
multiplayer-networking
PhotonNetwork.Instantiate ?
I am new to unity and have been working on a 2d multiplayer racing game. I have a brake pedal and gas pedal on my canvas that have trigger events to run my "gas" and "brake" functions in my (CarControllerScript). In the "Car Prefab" I drag the components in the fields that I created using "public" before my variables in the inspector such as " wheeljoint2d" etc... My problem is that when I Instantiate the "Car prefab" it is no longer called "car" but "car(Clone)" because of this my buttons will not work with the car. I have already tried Instantiating as a game object and changing the name but it doesn't fix anything.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612111743im_/https://answers.unity.com/themes/thub/images/avi.jpg)