#if GRAPH_DESIGNER /// --------------------------------------------- /// Behavior Designer /// Copyright (c) Opsive. All Rights Reserved. /// https://www.opsive.com /// --------------------------------------------- namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Math { using Opsive.GraphDesigner.Runtime.Variables; using UnityEngine; [Opsive.Shared.Utility.Category("Math")] [Opsive.Shared.Utility.Description("Generates a random Vector3 on a unit sphere (normalized).")] public class RandomOnUnitSphere : Action { [Tooltip("The resulting random Vector3 on a unit sphere.")] [SerializeField] [RequireShared] protected SharedVariable m_Result; /// /// Generates a random Vector3 on a unit sphere. /// /// The status of the action. public override TaskStatus OnUpdate() { m_Result.Value = Random.onUnitSphere; return TaskStatus.Success; } } } #endif