Hello,
I’m new in Unity, someone help me please.
I have a code like this,
public class scaleObject : MonoBehaviour
{
public Slider ScaleSlider;
[SerializeField] float currentScale = 0.1f;
// Use this for initialization
void Start ()
{
ScaleSlider = GameObject.Find ("ScaleSlider").GetComponent<Slider>();
}
// Update is called once per frame
void Update ()
{
transform.localScale = new Vector3 (1f, ScaleSlider.value, ScaleSlider.value);
}
private void OnGUI()
{
currentScale = GUI.HorizontalSlider (new Rect (-280f, 128.0f, 228.0f, 57.0f), currentScale, 0f, 2f);
transform.localScale = new Vector3 (currentScale, currentScale, currentScale);
}
public void AdjustScale(float newScale)
{}
}
my question is, how to add three (height, width, length) , one script in three Slider to object?
If three scripts are the solution, no problem
thank you.

