Quantcast
Channel: Answers for "Prefab Variables Changing in the Original, Not the Copies"
Browsing all 4 articles
Browse latest View live

Answer by Bonfire Boy

So, `player` is your prefab, right? What you're doing is making a clone and then setting values on the object that you cloned, rather than on the clone. You need a reference to the clone, which is...

View Article



Answer by William_Lee_Sims

Do two things: 1) Remove the yield statement from your Start() function. 2) Assign your "Instantiate(...)" to another variable like "var pClone = Instantiate...". Then use that variable to do the rest:...

View Article

Answer by Bonfire-Boy

So, `player` is your prefab, right? What you're doing is making a clone and then setting values on the object that you cloned, rather than on the clone. You need a reference to the clone, which is...

View Article

Answer by William_Lee_Sims

Do two things: 1) Remove the yield statement from your Start() function. 2) Assign your "Instantiate(...)" to another variable like "var pClone = Instantiate...". Then use that variable to do the rest:...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images