i want to adjust scale of an object with new UI slider, how to do that ?
here my code … i attach it to slider
using UnityEngine;
using System.Collections;
public class ScaleObject : MonoBehaviour {
public float _value = 1;
// Use this for initialization
void Start () {
}
// Update is called once per frame
public void OnSlide (GameObject _target) {
_target.transform.localScale = new Vector3 (1, 1, 1) * _value * Time.deltaTime;
}
}