Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class FixSize : MonoBehaviour
- {
- private float currentSize = 0.5f;
- public Transform[] objects;
- void Update ()
- {
- for(int i = 0; i<objects.Length; i++)
- {
- objects[i].localScale = new Vector3(currentSize,currentSize,currentSize);
- }
- }
- void OnGUI()
- {
- currentSize = GUI.HorizontalSlider(new Rect(Screen.width-350, Screen.height-60, 300, 30), currentSize, 0.0F, 2.0F);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement