Change Size Of Transform Unity Code Example


Example 1: 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;

Example 2: unity how to get transform scale


// This returns the scale of the object the script is attached to.
transform.localScale

Comments

Popular posts from this blog

Android - ImageView With Rounded Only One Corner

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

403 Access Denied On Tomcat 8 Manager App Without Prompting For User/password