Saving default scale of an object c#
Hi, my Object scales everytime it is hit by another object with specific tag.. and if i want to reset the game - here's the problem = I want to have a default scale of my Object. Is there a way to store and than call the default scale of an object? For the scale.. im using transform.localScale. Thx for help
Answer by Cuttlas-U · Feb 11, 2018 at 02:35 PM
hi; yeah u can do it easily;
u can store the scale in a vector3 variable in the Start method or elsewhere like this ;
Vector3 DefaultScale;
DefaultScale = transform.localScale;
then u can change it when ever u want;
transform.localScale = DefaultScale;
Your answer
Follow this Question
Related Questions
If statement not getting called after Lerping a Scale 1 Answer
I can not modify localscale while I'm playing because of the Animator. 1 Answer
objects of same parrent random scale/size(xy and z) 0 Answers
function works script-wise; doesn't work visually(only in game) 0 Answers
why did the script change 0 Answers