Random.rotation Manual     Reference     Scripting  
Scripting > Runtime Classes > Random
Random.rotation

static var rotation : Quaternion

Description

Returns a random rotation (Read Only).

// Instantiates a prefab with a random rotation at the world-origin
var prefab : GameObject;
Instantiate(prefab, Vector3.zero, Random.rotation);