返回随机旋转(只读)。
using UnityEngine;// Click button and a rotation will be appliedpublic class ExampleClass : MonoBehaviour { void OnGUI() { if (GUI.Button(new Rect(10, 10, 100, 50), "rotation")) { transform.rotation = Random.rotation; } } }