using System.Collections; using System.Collections.Generic; using UnityEngine; public class Rotator : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { int angle = giveMeSomeRandomAngle(); Debug.Log("The angle we got is : " + angle); transform.Rotate(angle * Vector3.right); } int giveMeSomeRandomAngle(){ return Random.Range(-5,6); } }