Simple code, but how do I declare a variable to use in an update function? Just trying to transform an object equally along X and Z axis.
using UnityEngine;
using System.Collections;
public class popcirc : MonoBehaviour {
// Use this for initialization
void Start () {
float size = Random.Range(-1.0F, 1.0F);
}
// Update is called once per frame
void Update () {
transform.localScale += new Vector3(size, 0, size);
}
}