Version: 2019.3
public static Vector3 onUnitSphere ;

説明

半径 1 の球体の表面上にランダムな点を返します(読み取り専用)

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Sets the rigidbody velocity to 10 and in a random direction.

GetComponent<Rigidbody>().velocity = Random.onUnitSphere * 10; } }