The question is very simple. I’d like to know on how can I scale an object by using sliders. My plan is to use three sliders to scale the object’s Height, Length, and Depth. I’ve been reading tutorials and Q&A’s but I dont seem to get the concept of using sliders to scale objects. Thank you in advance for your answers. Examples will be greatly appreciated
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ControlScaleWithSlider : MonoBehaviour {
[Range(0, 10)]
public float z = 1;
[Range(0, 10)]
public float x = 1;
[Range(0, 10)]
public float y = 1;
// Update is called once per frame
void Update () {
transform.localScale = new Vector3(x, y, z);
}
}