Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity set object scale

//gets the local scale of an object
vector3 local = transform.localScale;

//sets the local scale of an object
transform.localScale = new Vector3(scaleX,scaleY,scaleZ);

//gets the world scale of the object but is read only
vector3 world = transform.lossyScale;
 
PREVIOUS NEXT
Tagged: #unity #set #object #scale
ADD COMMENT
Topic
Name
9+4 =