diff --git a/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentStandard.prefab b/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentStandard.prefab index d98b9561..85eb48b8 100644 --- a/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentStandard.prefab +++ b/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentStandard.prefab @@ -1755,6 +1755,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} insertIndex: -1 addedObject: {fileID: 4269083640301180635} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} + insertIndex: -1 + addedObject: {fileID: 2241099583876537163} m_SourcePrefab: {fileID: 100100000, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} --- !u!1 &212402951927973884 stripped GameObject: @@ -1882,6 +1885,102 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: afa2f315da5127e47a996e328f4ffff3, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!82 &2241099583876537163 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 212402951927973884} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!4 &447753056685965252 stripped Transform: m_CorrespondingSourceObject: {fileID: -8645416474800241303, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} diff --git a/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentWithoutModel.prefab b/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentWithoutModel.prefab index c42ffaa4..28556959 100644 --- a/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentWithoutModel.prefab +++ b/Assets/Virtual Agents Framework/Runtime/Prefabs/AgentWithoutModel.prefab @@ -1757,6 +1757,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} insertIndex: -1 addedObject: {fileID: 8327870396362132631} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} + insertIndex: -1 + addedObject: {fileID: 8651058445503294158} m_SourcePrefab: {fileID: 100100000, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} --- !u!1 &212402951927973884 stripped GameObject: @@ -1884,6 +1887,102 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: afa2f315da5127e47a996e328f4ffff3, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!82 &8651058445503294158 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 212402951927973884} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!4 &700674713753034054 stripped Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 26f8cd740528f3b469c4f32fe28b8306, type: 3} diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Agent.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Agent.cs index e47376b8..032c9e24 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Agent.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Agent.cs @@ -11,6 +11,9 @@ namespace i5.VirtualAgents [RequireComponent(typeof(AgentAnimationUpdater))] // Responsible for the avatar's movement public class Agent : MonoBehaviour { + /// + /// The task system which manages the tasks of the agent + /// public ITaskSystem TaskSystem { get; private set; } /// diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/AgentAnimationUpdater.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/AgentAnimationUpdater.cs index 231a239a..facf5cf8 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/AgentAnimationUpdater.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/AgentAnimationUpdater.cs @@ -12,7 +12,16 @@ public class AgentAnimationUpdater : MonoBehaviour private Animator animator; // animation Parameter Names + /// + /// Controls the forward speed. + /// + [Tooltip("Controls the forward speed.")] [SerializeField] private string forwardSpeed = "Speed"; + + /// + /// Controls the angular speed. + /// + [Tooltip("Controls the angular speed.")] [SerializeField] private string angularSpeed = "Turn"; // animation IDs diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AdaptiveGaze.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AdaptiveGaze.cs index e4b951fe..4f1ae11d 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AdaptiveGaze.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AdaptiveGaze.cs @@ -12,12 +12,39 @@ public class AdaptiveGaze : MonoBehaviour { private class AdaptiveGazeTargetInfo { + /// + /// The gaze target that is looked at + /// public AdaptiveGazeTarget lookAtTarget = null; + + /// + /// Distance to the target + /// public float distance = 0; + + /// + /// The importance of the item for the agent. The higher the value, the more liekly it is the agent to look at it. Increases during runtime resets novelty for the agent + /// public float importance = 0; + + /// + /// The time the agent looked at the target + /// public float timeLookedAt = 0; + + /// + /// The novelty of the target + /// public float novelty = 0; + + /// + /// This value is calculated based on the importance, distance, time looked at and novelty + /// public float calcValueOfInterest = 0; + + /// + /// Specifies if the target is currently nearby + /// public bool isCurrentlyNearby = false; } /// @@ -26,36 +53,76 @@ private class AdaptiveGazeTargetInfo [Tooltip("When this transform is set, the gaze target is overwritten and the agent looks at this transform constantly without interruption (within the boundaries specified by the AimAt Script, e.g. distanceLimit and angleLimit)")] public Transform OverwriteGazeTarget = null; + /// + /// The radius in which the agent looks for gaze targets + /// + [Tooltip("The radius in which the agent looks for gaze targets")] [SerializeField] private float detectionRadius = 10f; + + /// + /// The maximum number of targets in range that are considered for the gaze + /// + [Tooltip("The maximum number of targets in range that are considered for the gaze")] [SerializeField] private int maxNumberOfTargetsInRange = 50; - [Tooltip("The interval in seconds in which the agent looks for new targets when not moving.")] + /// + /// The interval in seconds in which the agent looks for new targets when not moving + /// + [Tooltip("The interval in seconds in which the agent looks for new targets when not moving")] [SerializeField] private float detectionIntervalWhenIdle = 3f; - [Tooltip("The interval in seconds in which the agent looks for new targets when moving.")] + + /// + /// The interval in seconds in which the agent looks for new targets when moving + /// + [Tooltip("The interval in seconds in which the agent looks for new targets when moving")] [SerializeField] private float detectionIntervalWhenWalking = 0.5f; + private float detectionInterval = 3f; // Define the chances for target selection, e.g. chance for the second most interesting target in the list to be looked at - [Tooltip("The chance that the agent looks at the highest ranked target based on the algorithm, see documentation.")] + /// + /// The chance that the agent looks at the highest ranked target based on the algorithm, see documentation + /// + [Tooltip("The chance that the agent looks at the highest ranked target based on the algorithm, see documentation")] [Range(0f, 1f)] [SerializeField] private float chanceHighestRankedTarget = 0.5f; - [Tooltip("The chance that the agent looks at the second highest ranked target based on the algorithm, see documentation.")] + + /// + /// The chance that the agent looks at the second-highest ranked target based on the algorithm, see documentation + /// + [Tooltip("The chance that the agent looks at the second-highest ranked target based on the algorithm, see documentation")] [Range(0f, 1f)] [SerializeField] private float chanceSecondHighestTarget = 0.1f; - [Tooltip("The chance that the agent looks at the third highest ranked target based on the algorithm, see documentation.")] + + /// + /// The chance that the agent looks at the third highest ranked target based on the algorithm, see documentation + /// + [Tooltip("The chance that the agent looks at the third highest ranked target based on the algorithm, see documentation")] [Range(0f, 1f)] [SerializeField] private float chanceThirdHighestTarget = 0.1f; + + /// + /// The chance that the agent looks at a random target + /// [Tooltip("The chance that the agent looks at a random target")] [Range(0f, 1f)] [SerializeField] private float chanceRandomTarget = 0.05f; + + /// + /// The chance that the agent does not look at any target and looks ahead + /// [Tooltip("The chance that the agent does not look at any target and looks ahead")] [Range(0f, 1f)] [SerializeField] private float chanceIdleTarget = 0.25f; + /// + /// The speed at which the agent looks and switches between targets + /// [Tooltip("The speed at which the agent looks and switches between targets")] [SerializeField] private float lookSpeed = 2f; private AdaptiveGazeTargetInfo currentTargetOfInterest; + /// /// The object layers that are checked for gaze targets, default is everything for the sake of simplicity. /// It is recommended to set this to a more specific layer mask to improve performance. diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AimAt.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AimAt.cs index a892faed..519a739d 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AimAt.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Aiming&Gazing/AimAt.cs @@ -13,35 +13,78 @@ public abstract class AimAt : MonoBehaviour /// /// The transform that should be aimed at /// + [Tooltip("The transform that should be aimed at")] [SerializeField] protected Transform targetTransform; /// /// The Transform of the agent childobjects that should directly aim at the target /// + [Tooltip("The Transform of the agent childobjects that should directly aim at the target")] [SerializeField] protected Transform aimTransform; - // Axis of the aimTransform that should aim at the target + + /// + /// Axis of the aimTransform that should aim at the target + /// protected AimDirection aimDirection = AimDirection.Y; + /// /// The Transform that is acutally looked at and will follow the target smootly /// protected Transform targetFollower; + /// + /// The speed at which the agent looks at the target + /// protected float currentLookSpeed = 2f; + + /// + /// To increase the look speed, maximal value is 10 + /// protected float increaseLookSpeedBy = 0f; + /// + /// Reference to the NavMeshAgent component + /// protected NavMeshAgent navMeshAgent; + /// + /// The number of iterations that the aiming algorithm should run + /// + [Tooltip("The number of iterations that the aiming algorithm should run")] [SerializeField] protected int iterations = 10; + /// + /// The angle limit at which the aiming should stop + /// + [Tooltip("The angle limit at which the aiming should stop")] [SerializeField] protected float angleLimit = 180.0f; - // closest distance at which an object will be aimed at + + /// + /// The closest distance at which an object will be aimed at + /// + [Tooltip("The closest distance at which an object will be aimed at")] [SerializeField] protected float distanceLimit = 1.5f; - // The postion where the targetFollower should be placed when no target is set + /// + /// The postion where the targetFollower should be placed when no target is set + /// + [Tooltip("The postion where the targetFollower should be placed when no target is set")] [SerializeField] protected Transform startingTransform; + /// + /// The bones that should be moved to accomplish the aiming + /// + [Tooltip("The bones that should be moved to accomplish the aiming")] [SerializeField] protected HumanBone[] humanBones; + + /// + /// Array of the transforms of the bones that should be moved + /// protected Transform[] boneTransforms; + + /// + /// The direction of the aimTransform that should aim at the target + /// public enum AimDirection { Y, X, Z }; @@ -50,9 +93,17 @@ public enum AimDirection { Y, X, Z }; /// public bool ShouldDestroyItself { get; set; } = true; + /// + /// The speed at which the agent looks at the target + /// + [Tooltip("The speed at which the agent looks at the target")] [field: SerializeField] public float LookSpeed { get; set; } = 2f; + /// + /// The weight of the aiming + /// + [Tooltip("The weight of the aiming")] [field: Range(0, 1)] [field: SerializeField] public float Weight { get; set; } = 0.8f; diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/BaseTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/BaseTask.cs index c0a99010..8be493d2 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/BaseTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/BaseTask.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -6,6 +7,9 @@ namespace i5.VirtualAgents { public abstract class BaseTask : ITask { + /// + /// The state of the task + /// public TaskState State { get; set; } protected Agent executingAgent; @@ -14,6 +18,11 @@ public abstract class BaseTask : ITask /// public string description = ""; + /// + /// Event called when the task is started + /// + public event Action OnTaskStarted; + /// /// Called by the executing agent on running tasks /// Performs frame-to-frame task execution updates @@ -32,6 +41,7 @@ public virtual TaskState EvaluateTaskState() public virtual void StartExecution(Agent executingAgent) { this.executingAgent = executingAgent; + OnTaskStarted?.Invoke(); } /// @@ -48,6 +58,15 @@ public void StopAsFailed() StopExecution(); } + /// + /// Can be used to abort the task outside of its Update method + /// + public void StopAsAborted() + { + State = TaskState.Aborted; + StopExecution(); + } + /// /// Can be used to let the task succeed outside of its Update method /// @@ -57,6 +76,11 @@ public void StopAsSucceeded() StopExecution(); } + /// + /// Updates the State and automatically invokes StartExecution() on first update and StopExeuction() when task succeeds/fails. + /// + /// + /// public TaskState Tick(Agent executingAgent) { // Is the task already finished? @@ -70,7 +94,7 @@ public TaskState Tick(Agent executingAgent) { State = TaskState.Running; StartExecution(executingAgent); - // Check if the task already finished, in the Execute() + // Check if the task already finished in the Execute() if (State == TaskState.Success || State == TaskState.Failure) { return State; diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAdaptiveGazeTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAdaptiveGazeTask.cs index f91d12f5..cefdb7e2 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAdaptiveGazeTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAdaptiveGazeTask.cs @@ -3,7 +3,7 @@ namespace i5.VirtualAgents.AgentTasks { /// - /// Starts or stops adaptive gaze on the agent and marks the task as completed afterwards. + /// Starts or stops adaptive gaze on the agent and marks the task as completed afterwards. /// public class AgentAdaptiveGazeTask : AgentBaseTask, ISerializable { @@ -11,7 +11,12 @@ public class AgentAdaptiveGazeTask : AgentBaseTask, ISerializable private bool shouldStartOrStop; AdaptiveGaze adaptiveGazeScript; + + /// + /// Constructor for the adaptive gaze task + /// public AgentAdaptiveGazeTask() { } + /// /// Constructor for the adaptive gaze task /// diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAnimationTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAnimationTask.cs index 152d694e..ae3623c7 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAnimationTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAnimationTask.cs @@ -144,5 +144,14 @@ public void Deserialize(SerializationDataContainer serializer) layer = serializer.GetSerializedString("Layer"); } + /// + /// Aborts the animation task and sets its state to aborted + /// + public override void Abort() + { + StopExecution(); + State = TaskState.Aborted; + } + } } \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs new file mode 100644 index 00000000..7fe62e59 --- /dev/null +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs @@ -0,0 +1,85 @@ +using UnityEngine; + +namespace i5.VirtualAgents.AgentTasks +{ + public class AgentAudioTask : AgentBaseTask, ISerializable + { + /// + /// The audio to be played + /// + public AudioClip Audio; + + /// + /// The audio source which plays the audio + /// + public AudioSource AgentAudioSource; + + /// + /// Creates a new audio task + /// + /// The audio to be played + public AgentAudioTask(AudioClip audio, int priority = 0) + { + Audio = audio; + } + + /// + /// Starts the audio task + /// + /// The agent which should execute the movement task + public override void StartExecution(Agent agent) + { + base.StartExecution(agent); + AgentAudioSource = agent.GetComponent(); + AgentAudioSource.clip = Audio; + AgentAudioSource.Play(); + } + + public override TaskState EvaluateTaskState() + { + if (AgentAudioSource.time < Audio.length) + { + return TaskState.Running; + } + else + { + return TaskState.Success; + } + } + /// + /// Finish the task + /// + public override void StopExecution() + { + base.StopExecution(); + AgentAudioSource.Stop(); + } + + /// + /// Method to pause the audio + /// + public void PauseAudio() + { + AgentAudioSource.Pause(); + } + + /// + /// Method to continue the audio + /// + public void ContinueAudio() + { + AgentAudioSource.UnPause(); + } + public void Serialize(SerializationDataContainer serializer) + { + serializer.AddSerializedData("Audio", Audio); + serializer.AddSerializedData("Agent Audio Source", AgentAudioSource); + } + + public void Deserialize(SerializationDataContainer serializer) + { + Audio = serializer.GetSerializedAudioClip("Audio"); + AgentAudioSource = serializer.GetSerializedAudioSource("Agent Audio Source"); + } + } +} \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs.meta b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs.meta new file mode 100644 index 00000000..f45134ca --- /dev/null +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentAudioTask.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 10dc0569072448fc809c16b4ad6b8eba +timeCreated: 1722812167 \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentBaseTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentBaseTask.cs index a2ba6767..b09e2664 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentBaseTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentBaseTask.cs @@ -1,6 +1,7 @@ using i5.Toolkit.Core.Utilities; using System; using System.Collections.Generic; +using UnityEngine; namespace i5.VirtualAgents.AgentTasks { @@ -19,6 +20,11 @@ public List DependsOnTasks protected set; } + /// + /// Event which is raised when this task has finished + /// + public event Action OnTaskFinished; + /// /// Indicates whether this task is ready to start execution /// Checks whether all depending tasks are finished @@ -56,6 +62,7 @@ public virtual void FinishTask() StopAsSucceeded(); IsFinished = true; DependsOnTasks.Clear(); + OnTaskFinished?.Invoke(); } public virtual void FinishTaskAsFailed() @@ -63,6 +70,7 @@ public virtual void FinishTaskAsFailed() StopAsFailed(); IsFinished = true; DependsOnTasks.Clear(); + OnTaskFinished?.Invoke(); } /// @@ -90,6 +98,20 @@ public void WaitFor(params AgentBaseTask[] otherTasks) } } + /// + /// Aborts the task and sets its state to aborted + /// + public virtual void Abort() + { + if (State == TaskState.Running) + { + StopAsAborted(); + } + } + + /// + /// Resets the task to be started again + /// public override void Reset() { base.Reset(); diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentMovementTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentMovementTask.cs index 57d0a6a3..01b5cd08 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentMovementTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentMovementTask.cs @@ -210,5 +210,17 @@ public void Deserialize(SerializationDataContainer serializer) TargetSpeed = serializer.GetSerializedFloat("Target Speed"); followGameObject = serializer.GetSerializedBool("Follow GameObject?"); } + + /// + /// Aborts the movement task and sets its state to aborted + /// + public override void Abort() + { + if (navMeshAgent != null) + { + StopExecution(); + } + State = TaskState.Aborted; + } } } \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentPickUpTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentPickUpTask.cs index f953f9b3..3650924a 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentPickUpTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentPickUpTask.cs @@ -13,7 +13,7 @@ namespace i5.VirtualAgents.AgentTasks public class AgentPickUpTask : AgentBaseTask, ISerializable { /// - /// Minimum distance of the agent to the target so that the traget can be picked up + /// Minimum distance of the agent to the target so that the target can be picked up /// public float minDistanceForPickup = 1f; @@ -34,7 +34,7 @@ public class AgentPickUpTask : AgentBaseTask, ISerializable public GameObject PickupObject { get; protected set; } /// - /// Bodypart that the object should attached to + /// Agents socket that the object should be attached to /// public SocketId SocketId { get; protected set; } @@ -49,7 +49,7 @@ public AgentPickUpTask() /// Create an AgentPickUpTask using the object that should be picked up /// /// The object that the agent should pick up - /// Bodypart that the object should be attached to, standard is the right Hand + /// Agent socket that the object should be attached to, standard is the right Hand public AgentPickUpTask(GameObject pickupObject, SocketId socketId = SocketId.RightHand, float minDistanceForPickup = 1f, float animationSpeed = 2f) { PickupObject = pickupObject; @@ -71,8 +71,8 @@ public override void StartExecution(Agent agent) i5Debug.LogError($"The pickup object is null. " + "Therefore, it cannot be picked up. Skipping this task.", this); - FinishTaskAsFailed(); - return; + FinishTaskAsFailed(); + return; } if (!PickupObject.TryGetComponent(out var item)) { @@ -144,23 +144,22 @@ public IEnumerator IKWeightIncrease(Agent agent, Item item) meshSockets.TwoBoneIKConstraintRightArm.data.root = animator.GetBoneTransform(HumanBodyBones.RightUpperArm); meshSockets.TwoBoneIKConstraintRightArm.data.mid = animator.GetBoneTransform(HumanBodyBones.RightLowerArm); meshSockets.TwoBoneIKConstraintRightArm.data.tip = animator.GetBoneTransform(HumanBodyBones.RightHand); - //TODO: This is a computatioal heavy operation, it would be advisable to not do this during runtime + //TODO: This is a computational heavy operation, it would be advisable to not do this during runtime RigBuilder rigs = agent.GetComponent(); rigs.Build(); } constraint.data.target.SetPositionAndRotation(constraint.data.tip.position, constraint.data.tip.rotation); constraint.weight = 1; item.IsPickedUp = true; - while (Vector3.Distance(constraint.data.target.position, item.GrabTarget.position) > proximityThreshold) { - // Calculate direction from which the grapTarget is approached + // Calculate direction from which the grabTarget is approached Quaternion direction = Quaternion.LookRotation(item.GrabTarget.position - constraint.data.tip.position); - // Ajust direction so that the hand is rotated corectly: formulation was found by testing + // Adjust direction so that the hand is rotated correctly: formulation was found by testing direction = Quaternion.Euler(direction.eulerAngles.x + ((315- direction.eulerAngles.x)*2), direction.eulerAngles.y -180, direction.eulerAngles.z); - // Change position and roation of the target smoothly + // Change position and rotation of the target smoothly constraint.data.target.position = Vector3.Lerp(constraint.data.target.position, item.GrabTarget.position, Time.deltaTime * animationSpeed); constraint.data.target.rotation = Quaternion.Lerp(constraint.data.target.rotation, direction, Time.deltaTime * animationSpeed); diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentWaitTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentWaitTask.cs index 2514435b..3d0fa63d 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentWaitTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/AgentWaitTask.cs @@ -14,6 +14,10 @@ public class AgentWaitTask : AgentBaseTask, ISerializable /// public float WaitTimeInSeconds { get; set; } + private Coroutine waitCoroutine; + + private Agent agent; + public AgentWaitTask() { } /// @@ -32,6 +36,7 @@ public AgentWaitTask(float timeInSeconds) /// The agent which executes this task public override void StartExecution(Agent agent) { + this.agent = agent; base.StartExecution(agent); if (WaitTimeInSeconds <= 0) @@ -47,8 +52,7 @@ public override void StartExecution(Agent agent) FinishTaskAsFailed(); return; } - - agent.StartCoroutine(Wait(WaitTimeInSeconds)); + waitCoroutine = agent.StartCoroutine(Wait(WaitTimeInSeconds)); } // wait for the given time and then finish the task @@ -58,14 +62,27 @@ private IEnumerator Wait(float timeInSeconds) FinishTask(); } - public void Serialize(SerializationDataContainer serializer) + public void Serialize(SerializationDataContainer serializer) { serializer.AddSerializedData("Wait time", WaitTimeInSeconds); } - public void Deserialize(SerializationDataContainer serializer) + public void Deserialize(SerializationDataContainer serializer) { WaitTimeInSeconds = serializer.GetSerializedFloat("Wait time"); } + + /// + /// Aborts the wait task + /// + public override void Abort() + { + if (waitCoroutine != null) + { + agent.StopCoroutine(waitCoroutine); + waitCoroutine = null; + } + State = TaskState.Aborted; + } } } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/IAgentTask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/IAgentTask.cs index 547e59a5..e08cc35f 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/IAgentTask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/IAgentTask.cs @@ -14,5 +14,13 @@ public interface IAgentTask : ITask /// False if there are unfulfilled conditions that block the execution /// bool CanStart { get; } + + /// + /// Aborts the task + /// + public void Abort() {} + + event Action OnTaskFinished; + event Action OnTaskStarted; } } \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/SerializationDataContainer.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/SerializationDataContainer.cs new file mode 100644 index 00000000..a71fb3c8 --- /dev/null +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/FundamentalAgentTasks/SerializationDataContainer.cs @@ -0,0 +1,271 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace i5.VirtualAgents.AgentTasks +{ + /// + /// The types that can be serialized using the ISerializable interface. + /// + [Serializable] + public enum SerializableType + { + VECTOR3, + FLOAT, + STRING, + INT, + GAMEOBJECT, + BOOL, + AUDIOCLIP, + AUDIOSOURCE + } + + /// + /// Serialized data identified by a key. + /// + /// + [Serializable] + public class SerializationEntry + { + public string Key; + public T Value; + + public SerializationEntry(string key, T value) + { + this.Key = key; + this.Value = value; + } + } + + /// + /// Pseudo dictonary, that in contrast to actual dictonaries is serializable, but only offers search in linear time. + /// + /// + [Serializable] + public class SerializationData + { + [SerializeField] public List> data = new List>(); + + public T Get(string key) + { + foreach (var entry in data) + { + if (entry.Key == key) + { + return entry.Value; + } + } + throw new KeyNotFoundException(); + } + + public SerializationEntry Get(int index) + { + return data[index]; + } + + public void Add(string key, T value) + { + data.Add(new SerializationEntry(key, value)); + } + + public void Clear() + { + data.Clear(); + } + + public bool KeyExists(string key) + { + foreach (var entry in data) + { + if (entry.Key == key) + { + return true; + } + } + + return false; + } + } + + // Since generic types are not serializable, a new type that derives from the generic version while providing it with a concrete type has to be created. + [Serializable] + public class SerializedVectors : SerializationData { } + [Serializable] + public class SerializedFloats : SerializationData { } + [Serializable] + public class SerializedStrings : SerializationData { } + [Serializable] + public class SerializedInts : SerializationData { } + + [Serializable] + public class SerializedGameobjects : SerializationData { } + + [Serializable] + public class SerializedBools : SerializationData { } + + [Serializable] + public class SerializedAudioClips : SerializationData { } + + [Serializable] + public class SerializedAudioSources : SerializationData { } + + + + [Serializable] + public class SerializationDataContainer + { + //Serialized data + [SerializeField] public SerializedVectors serializedVectors = new SerializedVectors(); + [SerializeField] public SerializedFloats serializedFloats = new SerializedFloats(); + [SerializeField] public SerializedStrings serializedStrings = new SerializedStrings(); + [SerializeField] public SerializedInts serializedInts = new SerializedInts(); + [SerializeField] public SerializedGameobjects serializedGameobjects = new SerializedGameobjects(); + [SerializeField] public SerializedBools serializedBools = new SerializedBools(); + [SerializeField] public SerializedAudioClips serializedAudioClips = new SerializedAudioClips(); + [SerializeField] public SerializedAudioSources serializedAudioSources = new SerializedAudioSources(); + + //Saves the order in which the data was serialized. Allows coustom inspectors to replicate that order. + [SerializeField] public List serializationOrder = new List(); + + #region Overloads for adding data to the serialization + public void AddSerializedData(string key, Vector3 value) + { + serializationOrder.Add(SerializableType.VECTOR3); + serializedVectors.Add(key, value); + } + + public void AddSerializedData(string key, float value) + { + serializationOrder.Add(SerializableType.FLOAT); + serializedFloats.Add(key, value); + } + + public void AddSerializedData(string key, string value) + { + serializationOrder.Add(SerializableType.STRING); + serializedStrings.Add(key, value); + } + + public void AddSerializedData(string key, int value) + { + serializationOrder.Add(SerializableType.INT); + serializedInts.Add(key, value); + } + + public void AddSerializedData(string key, GameObject value) + { + serializationOrder.Add(SerializableType.GAMEOBJECT); + serializedGameobjects.Add(key,value); + } + + public void AddSerializedData(string key, bool value) + { + serializationOrder.Add(SerializableType.BOOL); + serializedBools.Add(key, value); + } + + public void AddSerializedData(string key, AudioClip value) + { + serializationOrder.Add(SerializableType.AUDIOCLIP); + serializedBools.Add(key, value); + } + + public void AddSerializedData(string key, AudioSource value) + { + serializationOrder.Add(SerializableType.AUDIOSOURCE); + serializedBools.Add(key, value); + } + + #endregion + + #region Overloads for retriving serialized data + public Vector3 GetSerializedVector(string key) + { + return serializedVectors.Get(key); + } + + public float GetSerializedFloat(string key) + { + return serializedFloats.Get(key); + } + + public string GetSerializedString(string key) + { + return serializedStrings.Get(key); + } + + public int GetSerializedInt(string key) + { + return serializedInts.Get(key); + } + + public GameObject GetSerializedGameobjects(string key) + { + return serializedGameobjects.Get(key); + } + + public bool GetSerializedBool(string key) + { + return serializedBools.Get(key); + } + + public AudioClip GetSerializedAudioClip(string key) + { + return serializedAudioClips.Get(key); + } + + public AudioSource GetSerializedAudioSource(string key) + { + return serializedAudioSources.Get(key); + } + #endregion + + /// + /// Deletes everything that was serialized + /// + public void Clear() + { + serializationOrder.Clear(); + serializedVectors.Clear(); + serializedStrings.Clear(); + serializedFloats.Clear(); + serializedInts.Clear(); + serializedGameobjects.Clear(); + serializedBools.Clear(); + serializedAudioClips.Clear(); + serializedAudioSources.Clear(); + } + + /// + /// Retrives the key of the item at position index. + /// + /// + /// + /// + public string GetKeyByIndex(int index, SerializableType type) + { + switch (type) + { + case SerializableType.VECTOR3: + return serializedVectors.Get(index).Key; + case SerializableType.FLOAT: + return serializedFloats.Get(index).Key; + case SerializableType.STRING: + return serializedStrings.Get(index).Key; + case SerializableType.INT: + return serializedInts.Get(index).Key; + case SerializableType.GAMEOBJECT: + return serializedGameobjects.Get(index).Key; + case SerializableType.BOOL: + return serializedBools.Get(index).Key; + case SerializableType.AUDIOCLIP: + return serializedAudioClips.Get(index).Key; + case SerializableType.AUDIOSOURCE: + return serializedAudioSources.Get(index).Key; + default: + throw new NotImplementedException(); + } + } + } +} + diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/HumanBone.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/HumanBone.cs index 1de8fc82..bd48bd70 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/HumanBone.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/HumanBone.cs @@ -6,7 +6,16 @@ namespace i5.VirtualAgents [System.Serializable] public class HumanBone { + /// + /// The bone of the agents body + /// + [Tooltip("The bone of the agents body")] public HumanBodyBones bone; + + /// + /// The influence weight of the bone + /// + [Tooltip("The influence weight of the bone")] [Range(0, 1)] public float weight; } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ITask.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ITask.cs index d803b9bc..9ad93757 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/ITask.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ITask.cs @@ -4,12 +4,16 @@ namespace i5.VirtualAgents { + /// + /// The state of a task, one out of five possible states: waiting, running, failure, success, aborted + /// public enum TaskState { Waiting, // Task created, but never executed Running, // Task currently running Failure, // Task has finished executing and failed - Success // Task has finished executing and succeeded + Success, // Task has finished executing and succeeded + Aborted // Task has been aborted } /// @@ -35,17 +39,16 @@ public interface ITask void StartExecution(Agent executingAgent); /// - /// Called when the task succeedes or fails + /// Called when the task succeeds or fails /// void StopExecution(); /// - /// Updates the State and automatically invokes StartExecution() on first update and StopExeuction() when task succeeds/fails. + /// Updates the State and automatically invokes StartExecution() on first update and StopExecution() when task succeeds/fails. /// - /// + /// /// - - TaskState Tick(Agent excutingAgent); + TaskState Tick(Agent executingAgent); /// /// Resets the task to its beginning state diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ITaskSystem.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ITaskSystem.cs index ae97a696..86e3462f 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/ITaskSystem.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ITaskSystem.cs @@ -10,6 +10,9 @@ namespace i5.VirtualAgents /// public interface ITaskSystem { + /// + /// Updates the task system + /// void UpdateTaskSystem(); } } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/Item.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/Item.cs index d11e41f3..f07d7c56 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/Item.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/Item.cs @@ -32,6 +32,10 @@ public bool IsPickedUp } } + /// + /// Determines if the item can be picked up + /// + [Tooltip("Determines if the item can be picked up")] [field: SerializeField] public bool CanBePickedUp { get; set; } = false; diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSocket.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSocket.cs index e8034d1a..2fb32f45 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSocket.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSocket.cs @@ -11,6 +11,10 @@ namespace i5.VirtualAgents /// public class MeshSocket : MonoBehaviour { + /// + /// The id of the socket + /// + [field: Tooltip("The id of the socket")] [field: SerializeField] public MeshSockets.SocketId SocketId { get; private set; } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSockets.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSockets.cs index 0f596ac3..8e502449 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSockets.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Items/MeshSockets.cs @@ -36,10 +36,16 @@ public enum SocketId } /// - /// Define the two bone IK constraints for the arms that is uses in the AgetPickUpTask + /// Define the two bone IK constraints for the arms that is used in the AgentPickUpTask /// + [field: Tooltip("Defines the two bone IK constraints for the right arm that is used in the AgentPickUpTask.")] [field: SerializeField] public TwoBoneIKConstraint TwoBoneIKConstraintRightArm { get; set; } + + /// + /// Define the two bone IK constraints for the left arm that is used in the AgentPickUpTask + /// + [field:Tooltip("Defines the two bone IK constraints for the left arm that is used in the AgentPickUpTask")] [field: SerializeField] public TwoBoneIKConstraint TwoBoneIKConstraintLeftArm { get; set; } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/AgentTaskManager.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/AgentTaskManager.cs index 8f733ec5..eb223ad0 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/AgentTaskManager.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/AgentTaskManager.cs @@ -1,6 +1,8 @@ using i5.Toolkit.Core.Utilities; using System; using i5.VirtualAgents.AgentTasks; +using UnityEngine; +using System.Linq; namespace i5.VirtualAgents.ScheduleBasedExecution { @@ -14,9 +16,13 @@ public class AgentTaskManager // task queue of this manager private AgentTaskQueue queue = new AgentTaskQueue(); - // the stat of the task manager + // the state of the task manager private TaskManagerState currentState; + // the last task to be executed or the last task that has been executed, if the queue is empty + private IAgentTask lastTask; + + /// /// Checks whether the task manager is active or has been deactivated /// Only returns false if the task manager has explicitly been deactivated @@ -60,6 +66,11 @@ public bool IsActive /// public event TaskFinishedEvent OnTaskFinished; + /// + /// Event which is raised once there are no more tasks in the queue + /// + public event Action OnQueueEmpty; + /// /// Agent's current task /// @@ -139,7 +150,12 @@ public void Update() if (taskState == TaskState.Success || taskState == TaskState.Failure) { CurrentState = TaskManagerState.idle; + // fire the OnTaskFinished event and check if it was the last task, if so fire the OnQueueEmpty event as well OnTaskFinished?.Invoke(this, CurrentTask); + if(queue.PeekNextTask() == null) + { + OnQueueEmpty?.Invoke(); + } CurrentTask = null; } break; @@ -154,6 +170,10 @@ public void Update() public void ScheduleTask(IAgentTask task, int priority = 0) { queue.AddTask(task, priority); + if (lastTask != queue.taskQueue[^1].task) + { + lastTask = task; + } } // get the next task from the queue and adapts the states accordingly @@ -189,5 +209,74 @@ public IAgentTask PeekNextTask() { return queue.PeekNextTask(); } + /// + /// Checks the states of all tasks as an "and"-operation in the queue. + /// + /// Failure if one of the Tasks in the queue failed, Success if all Task finished successfully + /// and the state of the current task in the queue, as long as not all tasks have run, but none has failed yet + public TaskState CheckTaskQueueStates() + { + // Check if any task failed + var failedTaskEntry = queue.taskQueue.FirstOrDefault(taskEntry => taskEntry.task.State == TaskState.Failure); + if (failedTaskEntry.task != null) + { + return TaskState.Failure; + } + // Find the first task that is either running or waiting + var currentTaskEntry = queue.taskQueue.FirstOrDefault(taskEntry => taskEntry.task.State is TaskState.Waiting or TaskState.Running); + + // If no task is running, waiting or failed, the bundle is finished + if(currentTaskEntry.task == null) + { + // The last task may still be running + return lastTask.State; + } + + return IsActive ? TaskState.Running : TaskState.Waiting; + + } + + /// + /// Removes all tasks from the queue and sets the state of the task manager to idle + /// + /// Determines whether the current task should be aborted as well + public void Clear(bool clearCurrentTask) + { + queue.Clear(); + if (clearCurrentTask) + { + CurrentTask.Abort(); + CurrentTask = null; + CurrentState = TaskManagerState.idle; + } + lastTask = null; + } + + /// + /// Removes a task from the task queue + /// + /// The task to be removed + public void RemoveTask(IAgentTask task) + { + queue.RemoveTask(task); + if (CurrentTask == task) + { + Abort(); + } + } + + /// + /// Aborts the current task + /// public class AgentTaskQueue { - private List taskQueue; + public List taskQueue = new List(); /// /// Create an empty IAgentTask queue @@ -76,13 +77,37 @@ public void AddTask(IAgentTask task, int priority = 0) } /// - /// Contains a task, its corresponding priority and the task bundle it belongs to if it is part of one + /// Contains a task and its corresponding priority /// - private struct TaskEntry + public struct TaskEntry { public IAgentTask task; public int priority; } + + /// + /// Removes all tasks from the queue + /// + public void Clear() + { + taskQueue.Clear(); + } + + /// + /// Removes a task from the task queue + /// + /// Task to be removed + public void RemoveTask(IAgentTask task) + { + foreach (TaskEntry entry in taskQueue) + { + if (entry.task == task) + { + taskQueue.Remove(entry); + break; + } + } + } } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/ScheduleBasedTaskSystem.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/ScheduleBasedTaskSystem.cs index bb6d0712..482fe0b5 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/ScheduleBasedTaskSystem.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/ScheduleBasedTaskSystem.cs @@ -33,6 +33,9 @@ private void Awake() } } + /// + /// Update the task system + /// public override void UpdateTaskSystem() { foreach (var taskManager in taskManagers.Values) @@ -50,5 +53,59 @@ public void ScheduleTask(IAgentTask task, int priority = 0, string layer = "Base { taskManagers[layer].ScheduleTask(task, priority); } + + /// + /// Aborts the current task on the specified layer + /// + /// Name of the layer on which the task should be aborted + public void Abort(string layer = "Base Layer") + { + taskManagers[layer].Abort(); + } + + /// + /// Aborts the current tasks on all layers + /// + public void AbortAllLayers() + { + foreach (var layer in taskManagers) + { + taskManagers[layer.Key].Abort(); + } + } + + /// + /// Removes a given task from the TaskSystem + /// + /// The task to be removed + /// The layer on which the given task resides + public void RemoveTask(IAgentTask task, string layer = "Base Layer") + { + taskManagers[layer].RemoveTask(task); + } + + /// + /// Clears all tasks from the given layer + /// + /// The layer whose tasks should be cleared, leave empty to clear base layer. + /// If true, the current tasks gets aborted and removed as well, otherwise it can still finish. + /// By default set to true + public void Clear(string layer = "Base Layer", bool clearCurrentTask = true) + { + taskManagers[layer].Clear(clearCurrentTask); + } + + /// + /// Clears all tasks from all layers + /// + /// If true, the current tasks gets aborted and removed as well, otherwise it can still finish. + /// By default set to true + public void ClearAllLayers(bool clearCurrentTask = true) + { + foreach (var layer in taskManagers) + { + taskManagers[layer.Key].Clear(clearCurrentTask); + } + } } } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskActions.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskActions.cs index 152ddd81..7364e868 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskActions.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskActions.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using i5.VirtualAgents.AgentTasks; using UnityEngine; using static i5.VirtualAgents.MeshSockets; @@ -46,7 +47,7 @@ public AgentBaseTask GoTo(Transform destinationTransform, Vector3 offset = defau } /// - /// Creates an AgentMovementTask for walking/running to a specific gameobject and schedules it or forces its execution. + /// Creates an AgentMovementTask for walking/running to a specific GameObject and schedules it or forces its execution. /// Shortcut queue management function /// /// GameObject the agent should go to @@ -70,9 +71,9 @@ public AgentBaseTask GoTo(GameObject destinationObject, Vector3 offset = default /// Lets the agent wait for the given number of seconds in an idle position /// Shortcut queue management function /// - /// The time span in seconds for which the agent shoudl wait + /// The time span in seconds for which the agent should wait /// Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. - /// The animation layer on which the task should be excuted + /// The animation layer on which the task should be executed public AgentBaseTask WaitForSeconds(float seconds, int priority = 0, string layer = "Base Layer") { AgentWaitTask agentWaitTask = new AgentWaitTask(seconds); @@ -89,7 +90,7 @@ public AgentBaseTask WaitForSeconds(float seconds, int priority = 0, string laye /// Time in seconds after which the animation should stop /// Trigger that stops the animation. If not provided, start trigger is used again /// Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. - /// The animation layer on which the task should be excuted + /// The animation layer on which the task should be executed /// The target at which the agent should aim while playing the animation public AgentBaseTask PlayAnimation(string startTrigger, float playTime, string stopTrigger = "", int priority = 0, string layer = "Base Layer", GameObject aimTarget = null) { @@ -104,7 +105,7 @@ public AgentBaseTask PlayAnimation(string startTrigger, float playTime, string s /// /// Object that should be picked up. Needs to have an item component and be near to the agent. /// Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. - /// Bodypart that the object should be attached to, standard is the right Hand + /// Agent socket that the object should be attached to, standard is the right Hand /// public AgentBaseTask PickUp(GameObject pickupObject, int priority = 0, SocketId bodyAttachPoint = SocketId.RightHand) { @@ -119,16 +120,21 @@ public AgentBaseTask PickUp(GameObject pickupObject, int priority = 0, SocketId /// /// Object the agent should go to and pick up. Needs to have an item component and be reachable by the agent. /// Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. - /// Bodypart that the object should be attached to, standard is the right Hand + /// Agent socket that the object should be attached to, standard is the right Hand /// Distance at which the the agent will try to pick up the object /// public AgentBaseTask GoToAndPickUp(GameObject destinationObject, int priority = 0, SocketId bodyAttachPoint = SocketId.RightHand, float minDistance = 0.3f) { - AgentMovementTask goToTask = (AgentMovementTask)GoTo(destinationObject, default, priority, true); - goToTask.MinDistance = minDistance; + AgentMovementTask movementTask = new AgentMovementTask(destinationObject, default, true); + movementTask.MinDistance = minDistance; + AgentPickUpTask pickUpTask = new AgentPickUpTask(destinationObject, bodyAttachPoint); - AgentBaseTask pickUpTask = PickUp(destinationObject, priority, bodyAttachPoint); - return pickUpTask; + TaskBundle PickUpBundle = new TaskBundle(); + PickUpBundle.AddTask(movementTask); + PickUpBundle.AddTask(pickUpTask); + + scheduleTaskSystem.ScheduleTask(PickUpBundle, priority); + return PickUpBundle; } /// @@ -154,9 +160,15 @@ public AgentBaseTask DropItem(GameObject dropObject = null, int priority = 0) /// public AgentBaseTask GoToAndDropItem(Vector3 destinationCoordinates, GameObject dropObject = null, int priority = 0) { - AgentBaseTask goToTask = GoTo(destinationCoordinates, priority); - AgentBaseTask dropTask = DropItem(dropObject, priority); - return dropTask; + AgentMovementTask movementTask = new AgentMovementTask(destinationCoordinates); + AgentDropTask dropTask = new AgentDropTask(dropObject); + + TaskBundle dropTaskBundle = new TaskBundle(); + dropTaskBundle.AddTask(movementTask); + dropTaskBundle.AddTask(dropTask); + + scheduleTaskSystem.ScheduleTask(dropTaskBundle, priority); + return dropTaskBundle; } /// /// Go to a transform and drop one specified or all object that are currently attached to the agent and have the Item component @@ -168,9 +180,15 @@ public AgentBaseTask GoToAndDropItem(Vector3 destinationCoordinates, GameObject /// public AgentBaseTask GoToAndDropItem(Transform destinationTransform, GameObject dropObject = null, int priority = 0) { - AgentBaseTask goToTask = GoTo(destinationTransform, default, priority); - AgentBaseTask dropTask = DropItem(dropObject, priority); - return dropTask; + AgentMovementTask movementTask = new AgentMovementTask(destinationTransform.position); + AgentDropTask dropTask = dropObject == null ? new AgentDropTask() : new AgentDropTask(dropObject); + + TaskBundle dropTaskBundle = new TaskBundle(); + dropTaskBundle.AddTask(movementTask); + dropTaskBundle.AddTask(dropTask); + + scheduleTaskSystem.ScheduleTask(dropTaskBundle, priority); + return dropTaskBundle; } /// @@ -178,16 +196,19 @@ public AgentBaseTask GoToAndDropItem(Transform destinationTransform, GameObject /// /// Time in seconds after which the gazing should stop /// Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. - /// Returs a AgentBaseTask array with two elements. The first has the starting Task (e.g. for startTask.waitFor(diffrentTask), and the second the stop Task ((e.g. for diffrentTask.waitFor(stopTask)) + /// Returns a AgentBaseTask array with two elements. The first has the starting Task (e.g. for startTask.waitFor(differentTask), and the second the stop Task ((e.g. for differentTask.waitFor(stopTask)) public AgentBaseTask[] StartAdaptiveGazeForTime(float seconds, int priority = 0) { AgentBaseTask adaptiveGazeTaskStart = new AgentAdaptiveGazeTask(true); - scheduleTaskSystem.ScheduleTask(adaptiveGazeTaskStart, priority, "Head"); - AgentBaseTask waitHead = WaitForSeconds(seconds, priority, "Head"); - waitHead.WaitFor(adaptiveGazeTaskStart); + AgentWaitTask agentWaitTask = new AgentWaitTask(seconds); AgentBaseTask adaptiveGazeTaskStop = new AgentAdaptiveGazeTask(false); - adaptiveGazeTaskStop.WaitFor(waitHead); - scheduleTaskSystem.ScheduleTask(adaptiveGazeTaskStop, priority, "Head"); + + TaskBundle adaptiveGazeBundle = new TaskBundle(); + adaptiveGazeBundle.AddTask(adaptiveGazeTaskStart); + adaptiveGazeBundle.AddTask(agentWaitTask); + adaptiveGazeBundle.AddTask(adaptiveGazeTaskStop); + + scheduleTaskSystem.ScheduleTask(adaptiveGazeBundle, priority, "Head"); return new AgentBaseTask[] { adaptiveGazeTaskStart, adaptiveGazeTaskStop }; } /// diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs new file mode 100644 index 00000000..78f28c60 --- /dev/null +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using i5.VirtualAgents.AgentTasks; +using i5.VirtualAgents.ScheduleBasedExecution; +using UnityEngine; + +namespace i5.VirtualAgents +{ + /// + /// A task which consists of multiple subtasks. + /// It allows for checking of preconditions and then executing a sequence of tasks. + /// + public class TaskBundle : AgentBaseTask + { + // The TaskManager that is used to schedule and manage the tasks in a bundle + private AgentTaskManager taskManager = new AgentTaskManager(); + + /// + /// List of conditions to be met before execution of tasks + /// + public List> Preconditions { get; private set; } + + /// + /// Creates an empty TaskBundle + /// + public TaskBundle() + { + State = TaskState.Waiting; + Preconditions = new List>(); + } + + /// + /// Creates a TaskBundle with a list of tasks + /// + /// + public TaskBundle(List tasks) + { + State = TaskState.Waiting; + AddTasks(tasks); + } + + /// + /// Creates a TaskBundle with a list of tasks and a list of preconditions + /// + /// + /// + public TaskBundle(List tasks, List> preconditions) + { + State = TaskState.Waiting; + AddTasks(tasks); + Preconditions = preconditions; + } + + /// + /// Adds a task to the task queue after initialisation + /// + /// The task to be added to the task queue + public void AddTask(AgentBaseTask task) + { + taskManager.ScheduleTask(task, 0); + } + + /// + /// Adds a list of tasks to the task queue after initialisation + /// + /// The task list to be added to the task queue + public void AddTasks(List taskList) + { + foreach (var task in taskList) + { + taskManager.ScheduleTask(task, 0); + } + } + + /// + /// Adds a precondition to the list of preconditions after initialisation + /// Note: Preconditions are only checked before the tasks are executed, + /// a precondition added after the execution has started will not be checked + /// + /// The precondition to be added to the list of preconditions + public void AddPrecondition(Func precondition) + { + if(TaskState.Waiting != State) + { + Debug.LogWarning("Preconditions can only be checked before the TaskBundle is started"); + } + Preconditions.Add(precondition); + } + + /// + /// Check for preconditions and start the execution of all subtasks in sequence + /// + /// + public override void StartExecution(Agent executingAgent) + { + taskManager.AssociateAgent(executingAgent); + State = TaskState.Running; + if (CheckPreconditions()) + { + taskManager.IsActive = true; + } + else + { + Debug.Log("Preconditions of TaskBundle not met"); + StopAsFailed(); + } + } + + /// + /// Execute all tasks in the task queue. If a task fails, the whole bundle fails. Note, that checking of preconditions is not part of this method. + /// + /// + public override TaskState EvaluateTaskState() + { + taskManager.Update(); + + if (taskManager.IsActive) + { + TaskState state = taskManager.CheckTaskQueueStates(); + if (state == TaskState.Failure) + { + Debug.LogWarning("Task bundle failed"); + StopAsFailed(); + } + + if (state == TaskState.Success) + { + StopAsSucceeded(); + } + + if (state == TaskState.Running) + { + State = state; + } + } + + return State; + } + + /// + /// Check if all preconditions are met. + /// + /// True if all preconditions evaluate to true, otherwise false. + private bool CheckPreconditions() + { + bool res = true; + foreach (Func condition in Preconditions) + { + res = res && condition(); + } + return res; + } + } +} \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs.meta b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs.meta new file mode 100644 index 00000000..3c2966a0 --- /dev/null +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/ScheduleBasedExecution/TaskBundle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 767001170c90e674baac4f3cc0afd1f1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/TaskSystem.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/TaskSystem.cs index 86b9c5ba..14b36b47 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/TaskSystem.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/TaskSystem.cs @@ -6,6 +6,9 @@ namespace i5.VirtualAgents { public abstract class TaskSystem : MonoBehaviour, ITaskSystem { + /// + /// Updates the task system + /// public abstract void UpdateTaskSystem(); } } diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformAxes.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformAxes.cs index 835a672a..23232f6f 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformAxes.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformAxes.cs @@ -5,8 +5,22 @@ namespace i5.VirtualAgents.Utilities { public class DebugDrawTransformAxes : MonoBehaviour { + /// + /// Draw the green Y axis of the transform. + /// + [Tooltip("Draw the green Y axis of the transform.")] [SerializeField] private bool drawGreenY = false; + + /// + /// Draw the red X axis of the transform. + /// + [Tooltip("Draw the red X axis of the transform.")] [SerializeField] private bool drawRedX = false; + + /// + /// Draw the blue Z axis of the transform. + /// + [Tooltip("Draw the blue Z axis of the transform.")] [SerializeField] private bool drawBlueZ = true; private void OnDrawGizmos() diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformSphere.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformSphere.cs index b6729c5e..dade10e4 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformSphere.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/DebugDrawTransformSphere.cs @@ -4,10 +4,20 @@ namespace i5.VirtualAgents.Utilities { public class DebugDrawTransformSphere : MonoBehaviour { + /// + /// The color of the sphere. + /// + [Tooltip("The color of the sphere.")] [SerializeField] public Color color = Color.green; + + /// + /// The radius of the sphere + /// + [Tooltip("The radius of the sphere")] [SerializeField] public float radius = 0.05f; + private void OnDrawGizmos() { Gizmos.color = color; diff --git a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/SampleScheduleController.cs b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/SampleScheduleController.cs index e3e6b4c2..2bf3fed8 100644 --- a/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/SampleScheduleController.cs +++ b/Assets/Virtual Agents Framework/Runtime/Scripts/Utilities/SampleScheduleController.cs @@ -11,6 +11,9 @@ namespace i5.VirtualAgents.Examples /// public class SampleScheduleController : MonoBehaviour { + /// + /// The agent which will execute the tasks. + /// public Agent agent; protected ScheduleBasedTaskSystem taskSystem; diff --git a/Assets/Virtual Agents Framework/Samples/AdaptiveGazeSample/AdaptiveGazeSampleController.cs b/Assets/Virtual Agents Framework/Samples/AdaptiveGazeSample/AdaptiveGazeSampleController.cs index 169fefa7..b725e0b1 100644 --- a/Assets/Virtual Agents Framework/Samples/AdaptiveGazeSample/AdaptiveGazeSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/AdaptiveGazeSample/AdaptiveGazeSampleController.cs @@ -7,13 +7,34 @@ namespace i5.VirtualAgents.Examples { public class AdaptiveGazeSampleController : SampleScheduleController { + /// + /// List of waypoints which the agent should visit in order. + /// + [Tooltip("List of waypoints which the agent should visit in order.")] [SerializeField] private List waypoints; + /// + /// The target object which the agent should look at. + /// + [Tooltip("The target object which the agent should look at.")] [SerializeField] private GameObject target; + /// + /// The time in seconds that the agent should overwrite the adaptive gaze at the beginning. + /// + [Tooltip("The time in seconds that the agent should overwrite the adaptive gaze at the beginning.")] [SerializeField] private int aimAtTime = 100; + /// + /// If true, the adaptive gaze will be started and stopped using TaskActions. + /// + [Tooltip("If true, the adaptive gaze will be started and stopped using TaskActions.")] [SerializeField] private bool useTaskActionsForAdaptiveGaze; + + /// + /// If true, the adaptive gaze will be overwritten with the aim head animation. + /// + [Tooltip("If true, the adaptive gaze will be overwritten with the aim head animation.")] [SerializeField] private bool overwriteAdaptiveGazeWithAimHead = false; private int gazeTime = 5; @@ -22,7 +43,7 @@ protected override void Start() List agentTasks = new List(); base.Start(); // add walking tasks for each waypoint - // here, we use the TaskActions shortcut but we could also just create a new + // here, we use the TaskActions shortcut, but we could also just create a new // AgentMovementTask and schedule it using agent.ScheduleTask. for (int i = 0; i < waypoints.Count; i++) { diff --git a/Assets/Virtual Agents Framework/Samples/Aiming Sample/Aiming Sample.unity b/Assets/Virtual Agents Framework/Samples/Aiming Sample/Aiming Sample.unity index e3614a4f..214c805e 100644 --- a/Assets/Virtual Agents Framework/Samples/Aiming Sample/Aiming Sample.unity +++ b/Assets/Virtual Agents Framework/Samples/Aiming Sample/Aiming Sample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: diff --git a/Assets/Virtual Agents Framework/Samples/Aiming Sample/AimingSampleController.cs b/Assets/Virtual Agents Framework/Samples/Aiming Sample/AimingSampleController.cs index 0022f2cf..62e5d141 100644 --- a/Assets/Virtual Agents Framework/Samples/Aiming Sample/AimingSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/Aiming Sample/AimingSampleController.cs @@ -6,16 +6,64 @@ namespace i5.VirtualAgents.Examples { public class AimingSampleController : SampleScheduleController { + /// + /// List of waypoints which the agent should visit in order. + /// + [Tooltip("List of waypoints which the agent should visit in order.")] [SerializeField] private List waypoints; + + /// + /// Waypoint which is visited with high priority. + /// + [Tooltip("Waypoint which is visited with high priority.")] [SerializeField] private Transform highPrioWaypoint; + + /// + /// If true, task shortcuts are used to create the tasks. If false, the tasks are created explicitly. + /// + [Tooltip("If true, task shortcuts are used to create the tasks. If false, the tasks are created explicitly.")] [SerializeField] private bool useTaskShortcuts; + + /// + /// If true, the agent walks to the waypoints. If false, the agent stays at the starting position. + /// + [Tooltip("If true, the agent walks to the waypoints. If false, the agent stays at the starting position.")] [SerializeField] private bool walk = true; + + /// + /// The target which the agent should aim at. + /// + [Tooltip("The target which the agent should aim at.")] [SerializeField] private GameObject target; + + /// + /// The time in seconds the agent should aim at the target. + /// + [Tooltip("The time in seconds the agent should aim at the target.")] [SerializeField] private int aimAtTime = 5; + /// + /// If true, the agent aims its head at the target. + /// + [Tooltip("If true, the agent aims its head at the target.")] [SerializeField] private bool aimHead = true; + + /// + /// If true, the agent aims its left arm at the target. + /// + [Tooltip("If true, the agent aims its left arm at the target.")] [SerializeField] private bool aimLeftArm = true; + + /// + /// If true, the agent aims its right arm at the target. + /// + [Tooltip("If true, the agent aims its right arm at the target.")] [SerializeField] private bool aimRightArm = true; + + /// + /// If true, the agent waves its right arm. + /// + [Tooltip("If true, the agent waves its right arm.")] [SerializeField] private bool waveRightArm = true; protected override void Start() diff --git a/Assets/Virtual Agents Framework/Samples/Aiming Sample/TargetController.cs b/Assets/Virtual Agents Framework/Samples/Aiming Sample/TargetController.cs index 13b23562..4240d8a0 100644 --- a/Assets/Virtual Agents Framework/Samples/Aiming Sample/TargetController.cs +++ b/Assets/Virtual Agents Framework/Samples/Aiming Sample/TargetController.cs @@ -6,7 +6,16 @@ namespace i5.VirtualAgents.Examples // controls the waypoint movement public class TargetController : MonoBehaviour { + /// + /// The time to wait between movements in seconds. + /// + [Tooltip("The time to wait between movements in seconds.")] [SerializeField] private float waitTime; + + /// + /// The distance to move left and right from the start position. + /// + [Tooltip("The distance to move left and right from the start position.")] [SerializeField] private float moveDistance = 3.5f; // Distance to move left and right from the start position private Vector3 startPos; diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample.meta new file mode 100644 index 00000000..bcfea317 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e5edfbf48eda1434da3d05b00a346b4a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs b/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs new file mode 100644 index 00000000..95c786d1 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs @@ -0,0 +1,33 @@ +using System.Collections; +using i5.VirtualAgents.ScheduleBasedExecution; +using System.Collections.Generic; +using i5.VirtualAgents.AgentTasks; +using UnityEngine; + +namespace i5.VirtualAgents.Examples +{ + public class AgentAudioController : SampleScheduleController + { + [SerializeField] private List audioClip; + protected override void Start() + { + base.Start(); + // Test audio reading out documentation entry + AgentAudioTask audioTask1 = new AgentAudioTask(audioClip[0]); + // Soundeffect + AgentAudioTask audioTask2 = new AgentAudioTask(audioClip[1]); + taskSystem.ScheduleTask(audioTask1); + StartCoroutine(PauseAndResumeAudio(audioTask1)); + taskSystem.ScheduleTask(audioTask2); + } + private IEnumerator PauseAndResumeAudio(AgentAudioTask audioTask) + { + yield return new WaitForSeconds(11); + // Pause Audio + audioTask.PauseAudio(); + yield return new WaitForSeconds(2); + // Continue Audio + audioTask.ContinueAudio(); + } + } +} \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs.meta new file mode 100644 index 00000000..cc491596 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/AgentAudioController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b2dd1dbbaa73a664e842c1499068aad3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.meta new file mode 100644 index 00000000..1e2953d8 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1794068a154db8941ab521de788ab45c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity new file mode 100644 index 00000000..a7a2e299 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity @@ -0,0 +1,2228 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.33 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.2 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.11000001 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 23800000, guid: a3c3fa849641a7d45aeefea69f26820e, type: 2} +--- !u!1 &1823995 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1823996} + - component: {fileID: 1823999} + - component: {fileID: 1823998} + - component: {fileID: 1823997} + m_Layer: 0 + m_Name: Cube (12) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!4 &1823996 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823995} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.2705, y: -0.411, z: 15.77} + m_LocalScale: {x: 0.08295599, y: 0.057385363, z: 2.903184} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2017876444} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1823997 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823995} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1823998 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823995} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1823999 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823995} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &52754172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 52754176} + - component: {fileID: 52754175} + - component: {fileID: 52754174} + - component: {fileID: 52754173} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &52754173 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &52754174 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0212149a25f2c2e46a91c52d81469af6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &52754175 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &52754176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.25, z: 0} + m_LocalScale: {x: 50, y: 0.5, z: 50} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &244015119 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 244015121} + - component: {fileID: 244015120} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &244015120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244015119} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a5ac11cc976e418e8d13136b07e1f52, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AgentTypeID: 0 + m_CollectObjects: 0 + m_Size: {x: 10, y: 10, z: 10} + m_Center: {x: 0, y: 2, z: 0} + m_LayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_UseGeometry: 0 + m_DefaultArea: 0 + m_GenerateLinks: 0 + m_IgnoreNavMeshAgent: 1 + m_IgnoreNavMeshObstacle: 1 + m_OverrideTileSize: 0 + m_TileSize: 256 + m_OverrideVoxelSize: 0 + m_VoxelSize: 0.11000001 + m_MinRegionArea: 2 + m_NavMeshData: {fileID: 23800000, guid: e882a88fe1e99a043aedc20cd1b6bfd4, type: 2} + m_BuildHeightMesh: 0 +--- !u!4 &244015121 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244015119} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -8.566866, y: -4.864487, z: 3.927935} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &501935480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 501935484} + - component: {fileID: 501935483} + - component: {fileID: 501935482} + - component: {fileID: 501935481} + m_Layer: 0 + m_Name: Cube (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &501935481 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &501935482 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &501935483 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &501935484 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 22.43673, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &548183202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 548183206} + - component: {fileID: 548183205} + - component: {fileID: 548183204} + - component: {fileID: 548183203} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &548183203 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &548183204 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &548183205 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &548183206 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 18.256731, y: 0.50851, z: -4.0889797} + m_LocalScale: {x: 32.21, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &627321545 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 627321549} + - component: {fileID: 627321548} + - component: {fileID: 627321547} + - component: {fileID: 627321546} + m_Layer: 0 + m_Name: Cube (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &627321546 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &627321547 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &627321548 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &627321549 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -4.3832693, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &683335273 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 683335275} + - component: {fileID: 683335274} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &683335274 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683335273} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &683335275 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683335273} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &717973401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 717973402} + m_Layer: 0 + m_Name: Waypoint3 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &717973402 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717973401} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -13.81, y: 0.5, z: -21.64} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &828182287 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 828182291} + - component: {fileID: 828182290} + - component: {fileID: 828182289} + - component: {fileID: 828182288} + m_Layer: 0 + m_Name: Cube (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &828182288 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &828182289 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &828182290 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &828182291 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 8.356731, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &1134850473 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1134850477} + - component: {fileID: 1134850476} + - component: {fileID: 1134850475} + - component: {fileID: 1134850474} + m_Layer: 0 + m_Name: Cube (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1134850474 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1134850475 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1134850476 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1134850477 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 15.376731, y: 0.50851, z: 16.15102} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1154611544 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1154611548} + - component: {fileID: 1154611547} + - component: {fileID: 1154611546} + - component: {fileID: 1154611545} + m_Layer: 0 + m_Name: Cube (10) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1154611545 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1154611546 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1154611547 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1154611548 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -16.873268, y: 0.50851, z: -10.21898} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &1165018408 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165018411} + - component: {fileID: 1165018410} + - component: {fileID: 1165018409} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1165018409 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + m_Enabled: 1 +--- !u!20 &1165018410 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1165018411 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + serializedVersion: 2 + m_LocalRotation: {x: 0.22875227, y: -0.6690833, z: 0.22875227, w: 0.6690833} + m_LocalPosition: {x: 22.72, y: 16.28, z: -0.42} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 37.75, y: -90, z: 0} +--- !u!1 &1264251850 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1264251852} + - component: {fileID: 1264251851} + m_Layer: 0 + m_Name: Documentation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1264251851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1264251850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6ba2ac043a0776a4d846aaf6ba38a734, type: 3} + m_Name: + m_EditorClassIdentifier: + title: + description: 'In the provided `Audio Sample` scene, the agent plays a recording + of the documentation page, pausing for a short time while doing so. + + Then + a short sound effect follows. ' + type: 0 + url: +--- !u!4 &1264251852 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1264251850} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 4.56, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1294797796 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1294797797} + m_Layer: 0 + m_Name: Obstacles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1294797797 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1294797796} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.7067308, y: 0.74149, z: 0.4589796} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1386483152} + - {fileID: 2046948657} + - {fileID: 548183206} + - {fileID: 1969051392} + - {fileID: 1134850477} + - {fileID: 2017876444} + - {fileID: 1872182313} + - {fileID: 627321549} + - {fileID: 828182291} + - {fileID: 501935484} + - {fileID: 1154611548} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1351748437 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1351748439} + - component: {fileID: 1351748440} + m_Layer: 0 + m_Name: Controller + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1351748439 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351748437} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -21.32297, y: 1.6174818, z: -18.973707} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1351748440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351748437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b2dd1dbbaa73a664e842c1499068aad3, type: 3} + m_Name: + m_EditorClassIdentifier: + agent: {fileID: 1747714761} + audioClip: + - {fileID: 8300000, guid: 0be992f902e208043a822f81d8f5c140, type: 3} + - {fileID: 8300000, guid: 8944584936419944983d72c2ee27b33c, type: 3} +--- !u!1 &1386483148 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1386483152} + - component: {fileID: 1386483151} + - component: {fileID: 1386483150} + - component: {fileID: 1386483149} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1386483149 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1386483150 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1386483151 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1386483152 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.7067308, y: 0.50851, z: -9.01898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1644641973 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1644641974} + m_Layer: 0 + m_Name: Waypoint2 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1644641974 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644641973} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.25, y: 2, z: -16.33} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1735457798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1735457799} + m_Layer: 0 + m_Name: Waypoint1 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1735457799 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735457798} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.46, y: -0.12, z: -1.93} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1747714758 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + m_PrefabInstance: {fileID: 1023428232005854918} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1747714761 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 718444495650295341, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + m_PrefabInstance: {fileID: 1023428232005854918} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1747714758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2eb11c02fcaa7fa40861161120bf3b98, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1784649917 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1784649918} + - component: {fileID: 1784649921} + - component: {fileID: 1784649920} + - component: {fileID: 1784649919} + m_Layer: 0 + m_Name: Cube (11) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!4 &1784649918 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784649917} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.3001, y: -0.464, z: 15.77} + m_LocalScale: {x: 0.08295599, y: 0.057385363, z: 2.903184} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2017876444} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1784649919 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784649917} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1784649920 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784649917} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1784649921 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784649917} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1787573991 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1787573992} + m_Layer: 0 + m_Name: High Prio Waypoint + m_TagString: Untagged + m_Icon: {fileID: 5132851093641282708, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1787573992 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787573991} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -11.926, y: 0.61, z: -0.78} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1872182309 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1872182313} + - component: {fileID: 1872182312} + - component: {fileID: 1872182311} + - component: {fileID: 1872182310} + m_Layer: 0 + m_Name: Cube (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1872182310 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1872182311 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1872182312 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1872182313 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 8.196731, y: 0.50851, z: -12.97898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1969051388 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1969051392} + - component: {fileID: 1969051391} + - component: {fileID: 1969051390} + - component: {fileID: 1969051389} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1969051389 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1969051390 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1969051391 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1969051392 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -13.64327, y: -0.49149, z: -0.4989796} + m_LocalScale: {x: 13.41, y: 0.5, z: 9.9} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2017876440 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017876444} + - component: {fileID: 2017876443} + - component: {fileID: 2017876442} + - component: {fileID: 2017876441} + m_Layer: 0 + m_Name: Cube (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &2017876441 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2017876442 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2017876443 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2017876444 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -10.803269, y: 0.50851, z: -17.38898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1784649918} + - {fileID: 1823996} + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2046948653 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2046948657} + - component: {fileID: 2046948656} + - component: {fileID: 2046948655} + - component: {fileID: 2046948654} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &2046948654 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2046948655 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2046948656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2046948657 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.7067308, y: 0.50851, z: 9.82102} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1023428232005854918 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_Name + value: AgentStandard + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2241099583876537163, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: panLevelCustomCurve.m_Curve.Array.data[0].value + value: 0.65 + objectReference: {fileID: 0} + - target: {fileID: 6870636111335835452, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_WarningMessage + value: + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + insertIndex: -1 + addedObject: {fileID: 1023428232005854926} + m_SourcePrefab: {fileID: 100100000, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} +--- !u!114 &1023428232005854926 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1747714758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2f315da5127e47a996e328f4ffff3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1264251852} + - {fileID: 1165018411} + - {fileID: 683335275} + - {fileID: 1351748439} + - {fileID: 52754176} + - {fileID: 1294797797} + - {fileID: 1735457799} + - {fileID: 1644641974} + - {fileID: 717973402} + - {fileID: 1787573992} + - {fileID: 1023428232005854918} + - {fileID: 244015121} diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity.meta new file mode 100644 index 00000000..77afed64 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62531eeb2e356cf49b630eb1b134895e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset new file mode 100644 index 00000000..59d461ca Binary files /dev/null and b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset differ diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset.meta new file mode 100644 index 00000000..dd9b11e5 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Audio Sample/NavMesh-GameObject.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e882a88fe1e99a043aedc20cd1b6bfd4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds.meta new file mode 100644 index 00000000..601732ef --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ec853ea9d4af2b448228495c7b4b126 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3 b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3 new file mode 100644 index 00000000..a38b011d Binary files /dev/null and b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3 differ diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3.meta new file mode 100644 index 00000000..9249c68e --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/AudioTaskVirtualAgentsFramework.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 0be992f902e208043a822f81d8f5c140 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3 b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3 new file mode 100644 index 00000000..b1cf7c71 Binary files /dev/null and b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3 differ diff --git a/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3.meta b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3.meta new file mode 100644 index 00000000..db905ae4 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/Audio Sample/Sounds/plop.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 8944584936419944983d72c2ee27b33c +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/DynamicNavigation/AgentDynamicNavigationController.cs b/Assets/Virtual Agents Framework/Samples/DynamicNavigation/AgentDynamicNavigationController.cs index 694ef768..cf243248 100644 --- a/Assets/Virtual Agents Framework/Samples/DynamicNavigation/AgentDynamicNavigationController.cs +++ b/Assets/Virtual Agents Framework/Samples/DynamicNavigation/AgentDynamicNavigationController.cs @@ -6,13 +6,16 @@ namespace i5.VirtualAgents.Examples { public class AgentDynamicNavigationController : SampleScheduleController { + /// + /// The waypoints which the agent should visit. + /// public List waypoints; protected override void Start() { base.Start(); // add walking tasks for each waypoint - // here, we use the TaskActions shortcut but we could also just create a new + // here, we use the TaskActions shortcut, but we could also just create a new // AgentMovementTask and schedule it using agent.ScheduleTask. for (int i = 0; i < waypoints.Count; i++) { diff --git a/Assets/Virtual Agents Framework/Samples/DynamicNavigation/WaypointController.cs b/Assets/Virtual Agents Framework/Samples/DynamicNavigation/WaypointController.cs index 83480274..e1e9ed69 100644 --- a/Assets/Virtual Agents Framework/Samples/DynamicNavigation/WaypointController.cs +++ b/Assets/Virtual Agents Framework/Samples/DynamicNavigation/WaypointController.cs @@ -6,7 +6,16 @@ namespace i5.VirtualAgents.Examples // controls the waypoint movement public class WaypointController : MonoBehaviour { + /// + /// The time to wait between movements in seconds. + /// + [Tooltip("The time to wait between movements in seconds.")] [SerializeField] private float waitTime; + + /// + /// The distance to move left and right from the start position. + /// + [Tooltip("The distance to move left and right from the start position.")] [SerializeField] private float moveDistance = 3.5f; // Distance to move left and right from the start position private Vector3 startPos; diff --git a/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemController.cs b/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemController.cs index a51f30d5..ff9ecbb2 100644 --- a/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemController.cs +++ b/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemController.cs @@ -7,8 +7,22 @@ namespace i5.VirtualAgents.Examples public class ItemController : MonoBehaviour { //Options related to the movement + /// + /// If true, the item moves. If false, the item stays still. + /// + [Tooltip("If true, the item moves. If false, the item stays still.")] [SerializeField] private bool doesMove = true; + + /// + /// The time to wait between movements in seconds. + /// + [Tooltip("The time to wait between movements in seconds.")] [SerializeField] private float WaitTime; // Time to wait before moving again + + /// + /// The distance to move in each direction. + /// + [Tooltip("The distance to move in each direction.")] [SerializeField] private float MoveDistance = 3.5f; // Distance to move in each direction private Item item; diff --git a/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemPickUpSampleController.cs b/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemPickUpSampleController.cs index bd42d811..127c40bf 100644 --- a/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemPickUpSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/ItemPickUpSample/ItemPickUpSampleController.cs @@ -5,10 +5,22 @@ namespace i5.VirtualAgents.Examples { public class ItemPickUpSampleController : SampleScheduleController { + /// + /// List of objects which should be picked up. + /// + [Tooltip("List of objects which should be picked up.")] [SerializeField] private List pickUpObjects; + /// + /// The position where the first item should be dropped. + /// + [Tooltip("The position where the first item should be dropped.")] [SerializeField] private Transform dropFirstItemHere; + /// + /// The position where all other items should be dropped. + /// + [Tooltip("The position where all other items should be dropped.")] [SerializeField] private Transform dropAllOtherItemsHere; protected override void Start() diff --git a/Assets/Virtual Agents Framework/Samples/Navigation Sample/AgentNavigationController.cs b/Assets/Virtual Agents Framework/Samples/Navigation Sample/AgentNavigationController.cs index 60cdbfaa..95cc016e 100644 --- a/Assets/Virtual Agents Framework/Samples/Navigation Sample/AgentNavigationController.cs +++ b/Assets/Virtual Agents Framework/Samples/Navigation Sample/AgentNavigationController.cs @@ -1,29 +1,48 @@ +using System.Collections; using i5.VirtualAgents.ScheduleBasedExecution; using System.Collections.Generic; +using i5.VirtualAgents.AgentTasks; using UnityEngine; namespace i5.VirtualAgents.Examples { public class AgentNavigationController : SampleScheduleController { + /// + /// List of waypoints which the agent should visit in order. + /// + [Tooltip("List of waypoints which the agent should visit in order.")] public List waypoints; - public Transform highPrioWaypoint; + /// + /// Waypoint with a high priority + /// + [Tooltip("Waypoint with a high priority")] + public Transform highPrioWaypoint; + private AgentBaseTask removeTask; protected override void Start() { base.Start(); // add walking tasks for each waypoint // here, we use the TaskActions shortcut but we could also just create a new // AgentMovementTask and schedule it using agent.ScheduleTask. - for (int i = 0; i < waypoints.Count; i++) + for (int i = 0; i < waypoints.Count-1; i++) { taskSystem.Tasks.GoTo(waypoints[i].position); } + // this task will never be executed, as we remove it before it is started + removeTask = taskSystem.Tasks.GoTo(waypoints[^1].position); // example for a different priority: // this waypoint is added last but has the highest priority, // so the agent will walk to it first taskSystem.Tasks.GoTo(highPrioWaypoint, Vector3.zero, 5); + + // we can retroactively remove tasks from the queue + // tasks that are already running will be aborted + // to remove all tasks one can use taskSystem.Clear() + taskSystem.RemoveTask(removeTask); } + } } \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Samples/Navigation Sample/Navigation Sample.unity b/Assets/Virtual Agents Framework/Samples/Navigation Sample/Navigation Sample.unity index 97ebc5e1..073c16bd 100644 --- a/Assets/Virtual Agents Framework/Samples/Navigation Sample/Navigation Sample.unity +++ b/Assets/Virtual Agents Framework/Samples/Navigation Sample/Navigation Sample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1395,6 +1395,7 @@ MonoBehaviour: - {fileID: 1735457799} - {fileID: 1644641974} - {fileID: 717973402} + - {fileID: 717973402} highPrioWaypoint: {fileID: 1787573992} --- !u!1 &1386483148 GameObject: @@ -1501,6 +1502,37 @@ Transform: m_Children: [] m_Father: {fileID: 1294797797} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1437308742 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1437308743} + m_Layer: 0 + m_Name: NeverVisitedWaypoint + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1437308743 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1437308742} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -22.56, y: 0.5, z: -23.94} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1644641973 GameObject: m_ObjectHideFlags: 0 @@ -2230,6 +2262,7 @@ SceneRoots: - {fileID: 1735457799} - {fileID: 1644641974} - {fileID: 717973402} + - {fileID: 1437308743} - {fileID: 1787573992} - {fileID: 1023428232005854918} - {fileID: 244015121} diff --git a/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Independent Tasks/IndependentTasksSampleController.cs b/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Independent Tasks/IndependentTasksSampleController.cs index 32dbf808..577cc8a0 100644 --- a/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Independent Tasks/IndependentTasksSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Independent Tasks/IndependentTasksSampleController.cs @@ -8,8 +8,21 @@ namespace i5.VirtualAgents.Examples { public class IndependentTasksSampleController : SampleScheduleController { + /// + /// List of waypoints which the agent should visit in order + /// + [Tooltip("List of waypoints which the agent should visit in order.")] public List waypoints; + + /// + /// Waypoint with a high priority + /// + [Tooltip("Waypoint with a high priority")] public Transform highPrioWaypoint; + + /// + /// If true, the agent uses task shortcuts to create the tasks + /// public bool useTaskShortcuts = true; protected override void Start() diff --git a/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Synchronized Tasks/SynchronizedTasksSampleController.cs b/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Synchronized Tasks/SynchronizedTasksSampleController.cs index dc5ac315..7c100fba 100644 --- a/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Synchronized Tasks/SynchronizedTasksSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Synchronized Tasks/SynchronizedTasksSampleController.cs @@ -8,10 +8,31 @@ namespace i5.VirtualAgents.Examples { public class SynchronizedTasksSampleController : SampleScheduleController { + /// + /// List of waypoints which the agent should visit in order + /// + [Tooltip("List of waypoints which the agent should visit in order.")] public List waypoints; + + /// + /// Waypoint with a high priority + /// + [Tooltip("Waypoint with a high priority")] public Transform highPrioWaypoint; + + /// + /// If true, the agent uses task shortcuts to create the tasks + /// public bool useTaskShortcuts; + + /// + /// If true, the agent walks to the waypoints. If false, the agent stays at the starting position. + /// public bool walk = true; + + /// + /// The time in seconds the agent should point at the target + /// public int pointAtTime = 5; protected override void Start() diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample.meta new file mode 100644 index 00000000..ee5cbfe0 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 133fdfc73fb9d384ab37c67684e96eed +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.meta new file mode 100644 index 00000000..356aa266 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 806f87508a3db354090d9248a61f6aa6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity new file mode 100644 index 00000000..67dcd372 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity @@ -0,0 +1,2005 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.33 + agentHeight: 1.8 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.11000001 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 23800000, guid: cbf0250cbf21aa546b20315a6f836a59, type: 2} +--- !u!1 &23964496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 23964498} + - component: {fileID: 23964497} + m_Layer: 0 + m_Name: NavMesh Surface + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &23964497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 23964496} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a5ac11cc976e418e8d13136b07e1f52, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AgentTypeID: 0 + m_CollectObjects: 0 + m_Size: {x: 10, y: 10, z: 10} + m_Center: {x: 0, y: 2, z: 0} + m_LayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_UseGeometry: 0 + m_DefaultArea: 0 + m_GenerateLinks: 0 + m_IgnoreNavMeshAgent: 1 + m_IgnoreNavMeshObstacle: 1 + m_OverrideTileSize: 0 + m_TileSize: 256 + m_OverrideVoxelSize: 0 + m_VoxelSize: 0.11000001 + m_MinRegionArea: 2 + m_NavMeshData: {fileID: 23800000, guid: 3f237ef9e4745b048a8bac7639d84958, type: 2} + m_BuildHeightMesh: 0 +--- !u!4 &23964498 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 23964496} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.9023142, y: 0.66258574, z: 0.43434882} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &52754172 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 52754176} + - component: {fileID: 52754175} + - component: {fileID: 52754174} + - component: {fileID: 52754173} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &52754173 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &52754174 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0212149a25f2c2e46a91c52d81469af6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &52754175 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &52754176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 52754172} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.25, z: 0} + m_LocalScale: {x: 50, y: 0.5, z: 50} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &501935480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 501935484} + - component: {fileID: 501935483} + - component: {fileID: 501935482} + - component: {fileID: 501935481} + m_Layer: 0 + m_Name: Cube (9) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &501935481 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &501935482 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &501935483 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &501935484 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 501935480} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 22.43673, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &548183202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 548183206} + - component: {fileID: 548183205} + - component: {fileID: 548183204} + - component: {fileID: 548183203} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &548183203 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &548183204 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &548183205 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &548183206 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548183202} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 18.256731, y: 0.50851, z: -4.0889797} + m_LocalScale: {x: 32.21, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &627321545 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 627321549} + - component: {fileID: 627321548} + - component: {fileID: 627321547} + - component: {fileID: 627321546} + m_Layer: 0 + m_Name: Cube (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &627321546 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &627321547 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &627321548 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &627321549 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 627321545} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -4.3832693, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &683335273 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 683335275} + - component: {fileID: 683335274} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &683335274 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683335273} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &683335275 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683335273} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &717973401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 717973402} + m_Layer: 0 + m_Name: Waypoint3 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &717973402 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717973401} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -13.81, y: 0.74149, z: -21.64} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &828182287 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 828182291} + - component: {fileID: 828182290} + - component: {fileID: 828182289} + - component: {fileID: 828182288} + m_Layer: 0 + m_Name: Cube (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &828182288 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &828182289 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &828182290 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &828182291 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 828182287} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 8.356731, y: 0.50851, z: 12.78102} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &1134850473 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1134850477} + - component: {fileID: 1134850476} + - component: {fileID: 1134850475} + - component: {fileID: 1134850474} + m_Layer: 0 + m_Name: Cube (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1134850474 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1134850475 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1134850476 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1134850477 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1134850473} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 15.376731, y: 0.50851, z: 16.15102} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1154611544 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1154611548} + - component: {fileID: 1154611547} + - component: {fileID: 1154611546} + - component: {fileID: 1154611545} + m_Layer: 0 + m_Name: Cube (10) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1154611545 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1154611546 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1154611547 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1154611548 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1154611544} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -16.873268, y: 0.50851, z: -10.21898} + m_LocalScale: {x: 13.410001, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &1165018408 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165018411} + - component: {fileID: 1165018410} + - component: {fileID: 1165018409} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1165018409 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + m_Enabled: 1 +--- !u!20 &1165018410 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1165018411 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165018408} + serializedVersion: 2 + m_LocalRotation: {x: 0.22875227, y: -0.6690833, z: 0.22875227, w: 0.6690833} + m_LocalPosition: {x: 22.72, y: 16.28, z: -0.42} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 37.75, y: -90, z: 0} +--- !u!1 &1264251850 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1264251852} + - component: {fileID: 1264251851} + m_Layer: 0 + m_Name: Documentation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1264251851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1264251850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6ba2ac043a0776a4d846aaf6ba38a734, type: 3} + m_Name: + m_EditorClassIdentifier: + title: + description: 'In the `TaskBundleSample` the agent attempts to execute two TaskBundles, + of which only one''s preconditions are met. + + + + The `TaskBundleController` + has the option to add multiple waypoints where the agent should walk. + + ss + + At + the end of the execution of the first TaskBundle, the agent is close to the last + waypoint, which leads to the precondition of the second bundle to fail. + + TaskBundles + are a way to group multiple sub-tasks together. + + The resulting task bundle + can be added to a task system like any other task. + + A TaskBundle can also + include a list of boolean preconditions. + + They are checked beforehand and + determine if the TaskBundle prematurely finishes, in the event that one of the + preconditions is not met. + + Tasks in a TaskBundle are executed back to back + in sequence and cannot be interrupted by other tasks.' + type: 0 + url: +--- !u!4 &1264251852 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1264251850} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 4.56, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1294797796 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1294797797} + m_Layer: 0 + m_Name: Obstacles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1294797797 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1294797796} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.7067308, y: 0.74149, z: 0.4589796} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1386483152} + - {fileID: 2046948657} + - {fileID: 548183206} + - {fileID: 1969051392} + - {fileID: 1134850477} + - {fileID: 2017876444} + - {fileID: 1872182313} + - {fileID: 627321549} + - {fileID: 828182291} + - {fileID: 501935484} + - {fileID: 1154611548} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1351748437 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1351748439} + - component: {fileID: 1351748440} + m_Layer: 0 + m_Name: Controller + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1351748439 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351748437} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -21.32297, y: 1.6174818, z: -18.973707} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1351748440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351748437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbd7a8d475eaad04aa5925239e836a33, type: 3} + m_Name: + m_EditorClassIdentifier: + agent: {fileID: 1747714761} + waypoints: + - {fileID: 1735457799} + - {fileID: 1644641974} + - {fileID: 717973402} +--- !u!1 &1386483148 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1386483152} + - component: {fileID: 1386483151} + - component: {fileID: 1386483150} + - component: {fileID: 1386483149} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1386483149 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1386483150 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1386483151 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1386483152 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1386483148} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.7067308, y: 0.50851, z: -9.01898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1644641973 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1644641974} + m_Layer: 0 + m_Name: Waypoint2 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1644641974 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644641973} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 11.29, y: 0.74149, z: -10.14} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1735457798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1735457799} + m_Layer: 0 + m_Name: Waypoint1 + m_TagString: Untagged + m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1735457799 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735457798} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -7.05, y: 0.74149, z: -3.77} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1747714758 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + m_PrefabInstance: {fileID: 1023428232005854918} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1747714761 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 718444495650295341, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + m_PrefabInstance: {fileID: 1023428232005854918} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1747714758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2eb11c02fcaa7fa40861161120bf3b98, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1872182309 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1872182313} + - component: {fileID: 1872182312} + - component: {fileID: 1872182311} + - component: {fileID: 1872182310} + m_Layer: 0 + m_Name: Cube (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1872182310 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1872182311 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1872182312 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1872182313 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872182309} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 8.196731, y: 0.50851, z: -12.97898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1969051388 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1969051392} + - component: {fileID: 1969051391} + - component: {fileID: 1969051390} + - component: {fileID: 1969051389} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &1969051389 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1969051390 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1969051391 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1969051392 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1969051388} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -13.64327, y: -0.49149, z: -0.4989796} + m_LocalScale: {x: 13.41, y: 0.5, z: 9.9} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2017876440 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017876444} + - component: {fileID: 2017876443} + - component: {fileID: 2017876442} + - component: {fileID: 2017876441} + m_Layer: 0 + m_Name: Cube (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &2017876441 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2017876442 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2017876443 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2017876444 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017876440} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -10.803269, y: 0.50851, z: -17.38898} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2046948653 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2046948657} + - component: {fileID: 2046948656} + - component: {fileID: 2046948655} + - component: {fileID: 2046948654} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 8 + m_IsActive: 1 +--- !u!65 &2046948654 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2046948655 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 803c66af4a7d766479e1e21d4feedbe2, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2046948656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2046948657 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046948653} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.7067308, y: 0.50851, z: 9.82102} + m_LocalScale: {x: 13.41, y: 2.5, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1294797797} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1023428232005854918 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_Name + value: AgentStandard + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 700674713753034054, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6870636111335835452, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + propertyPath: m_WarningMessage + value: + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 212402951927973884, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} + insertIndex: -1 + addedObject: {fileID: 1023428232005854926} + m_SourcePrefab: {fileID: 100100000, guid: 2962848ab48f0e4459691ff3d6d1eed0, type: 3} +--- !u!114 &1023428232005854926 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1747714758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2f315da5127e47a996e328f4ffff3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1264251852} + - {fileID: 1165018411} + - {fileID: 683335275} + - {fileID: 1351748439} + - {fileID: 52754176} + - {fileID: 1294797797} + - {fileID: 1735457799} + - {fileID: 1644641974} + - {fileID: 717973402} + - {fileID: 1023428232005854918} + - {fileID: 23964498} diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity.meta new file mode 100644 index 00000000..2d8807b5 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1246ffacfdef9ed499357bc0464db6a4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset new file mode 100644 index 00000000..728d4881 Binary files /dev/null and b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset differ diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset.meta new file mode 100644 index 00000000..0d36980a --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh-NavMesh Surface.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f237ef9e4745b048a8bac7639d84958 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset new file mode 100644 index 00000000..08527d2e Binary files /dev/null and b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset differ diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset.meta new file mode 100644 index 00000000..8b8cd046 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample/NavMesh.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cbf0250cbf21aa546b20315a6f836a59 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs new file mode 100644 index 00000000..3c452821 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs @@ -0,0 +1,72 @@ +using i5.VirtualAgents.ScheduleBasedExecution; +using System.Collections.Generic; +using i5.VirtualAgents.AgentTasks; +using UnityEngine; + +namespace i5.VirtualAgents.Examples +{ + public class TaskBundleController : SampleScheduleController + { + public List waypoints; + + protected override void Start() + { + base.Start(); + // Create a TaskBundle consisting of a task list and a list of preconditions + + // Create a list of tasks + List tasks = new List(); + + // Create a list of preconditions + List> preconditions = new List>(); + + // Preconditions can be added with a lambda function + // The lambda function returns a boolean value + // () => {...} syntax is a lambda expression that defines an anonymous function inline. + // Parameters can be added in brackets on the left side of the arrow + preconditions.Add(() => + { + // This lambda function checks if the agent is close to the last waypoint + // If a precondition is not met, the TaskBundle will not be executed + // Compare vectors equality with accuracy of 0.5 + float distance = Vector3.Distance(waypoints[waypoints.Count - 1].position, agent.transform.position); + return distance > 1.0f; + }); + + // Add Tasks to the tasks List before creating the TaskBundle + // TaskActions also add the task to the taskSystem therefore cannot be used here + for (int i = 0; i < waypoints.Count; i++) + { + tasks.Add(new AgentMovementTask(waypoints[i].position)); + } + + // Create a new TaskBundle with the tasks and preconditions + // This TaskBundle will be executed because the agent is not close to the last waypoint + TaskBundle taskBundleSuccess = new TaskBundle(tasks, preconditions); + + // Create a TaskBundle with empty tasks and preconditions first + // This TaskBundle will not be executed + // because after executing the taskBundleSuccess the agent is close to the last waypoint + TaskBundle taskBundleFail = new TaskBundle(); + + // Add Tasks to the tasks List after creating the TaskBundle + for (int i = 0; i < waypoints.Count; i++) + { + taskBundleFail.AddTask(new AgentMovementTask(waypoints[i].position)); + } + + // Add the same precondition to the second TaskBundle, but after the TaskBundle was created + taskBundleFail.AddPrecondition( () => + { + float distance = Vector3.Distance(waypoints[waypoints.Count - 1].position, agent.transform.position); + return distance > 1.0f; + }); + + + // Schedule the TaskBundles to the taskSystem + taskSystem.ScheduleTask(taskBundleSuccess, 0); + taskSystem.ScheduleTask(taskBundleFail, 0); + Debug.Log("Two TaskBundles scheduled. The first one should succeed, the second one should fail."); + } + } +} \ No newline at end of file diff --git a/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs.meta b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs.meta new file mode 100644 index 00000000..35536359 --- /dev/null +++ b/Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundleController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fbd7a8d475eaad04aa5925239e836a33 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Virtual Agents Framework/Samples/Wait Sample/WaitSampleController.cs b/Assets/Virtual Agents Framework/Samples/Wait Sample/WaitSampleController.cs index 011806e9..0a8b5fc0 100644 --- a/Assets/Virtual Agents Framework/Samples/Wait Sample/WaitSampleController.cs +++ b/Assets/Virtual Agents Framework/Samples/Wait Sample/WaitSampleController.cs @@ -6,6 +6,10 @@ namespace i5.VirtualAgents.Examples { public class WaitSampleController : SampleScheduleController { + /// + /// The waypoints which the agent should visit in order. + /// + [Tooltip("The waypoints which the agent should visit in order.")] public Transform[] waypoints; protected override void Start() diff --git a/Assets/Virtual Agents Framework/Tests/Runtime/TestAllSamples.cs b/Assets/Virtual Agents Framework/Tests/Runtime/TestAllSamples.cs index e8e68b32..0f2ef8b3 100644 --- a/Assets/Virtual Agents Framework/Tests/Runtime/TestAllSamples.cs +++ b/Assets/Virtual Agents Framework/Tests/Runtime/TestAllSamples.cs @@ -29,6 +29,7 @@ public class TestAllSamples { "Independent Tasks", "Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Independent Tasks/Independent Tasks Sample.unity" }, { "Synchronized Tasks", "Assets/Virtual Agents Framework/Samples/Parallel Tasks Sample/Synchronized Tasks/Synchronized Tasks Sample.unity" }, { "Wait", "Assets/Virtual Agents Framework/Samples/Wait Sample/Wait Sample.unity" }, + { "TaskBundle", "Assets/Virtual Agents Framework/Samples/TaskBundle Sample/TaskBundle Sample.unity" }, { "Behaviour", "Assets/Virtual Agents Framework/Tests/Runtime/BehaviourTreeTestScene/BehaviourTreeSampleScene.unity" } }; @@ -254,9 +255,31 @@ public IEnumerator VerifySceneWait() //Check if the agent has stopped moving isMoving = Agent.GetComponent().velocity != Vector3.zero; Assert.That(isMoving, Is.False); - //TODO: Add more sample specific asserts + //TODO: Add more sample specific asserts + } + + [UnityTest] + public IEnumerator VerifyTaskBundle() + { + pathToScenes.TryGetValue("TaskBundle", out string path); + AsyncOperation sceneLoaded = SceneManager.LoadSceneAsync(path); + while (!sceneLoaded.isDone) + { + yield return null; + } + var Agent = GameObject.Find("AgentStandard"); + Assert.That(Agent, Is.Not.Null); + + yield return new WaitForSeconds(5); + bool isMoving = Agent.GetComponent().velocity != Vector3.zero; + Assert.That(isMoving, Is.True); + + yield return new WaitForSeconds(30); + + //TODO: Add more sample specific asserts } + [UnityTest] public IEnumerator VerifyBehaviourTree() { @@ -276,7 +299,7 @@ public IEnumerator VerifyBehaviourTree() yield return new WaitForSeconds(45); - //TODO: Add more sample specific asserts + //TODO: Add more sample specific asserts } #endif } diff --git a/Documentation/manual/audio.md b/Documentation/manual/audio.md new file mode 100644 index 00000000..14e3e8b7 --- /dev/null +++ b/Documentation/manual/audio.md @@ -0,0 +1,43 @@ +# Audio Tasks +`AgentAudioTask` is a task that plays an audio clip. It can be used to add sound effects or speech to the agent's actions. +The `PauseAudio()` and `ContinueAudio()` functions can be used to pause and continue the audio playback. +One can use the SpatialBlend property of the AudioSource component to adjust how much differently the audio sounds, depending on angle and distance towards the agent, meaning how "3D" it sounds. +When set to 0, the audio sounds the same, regardless of camera position. When set to 1, it can only be heard when near and directly facing the agent. + +# Construct an Audio Task +For an audio task the following prerequisites are necessary: +- The agent needs an AudioSource component. This should already be set up in the agent prefab. +- An audio file to be played. You can use all file types supported by Unity's Audio Clip type, see [here](https://docs.unity3d.com/Manual/class-AudioClip.html). +- To receive the audio, you need a GameObject with an AudioListener component, typically the camera. + +Then simply create an AgentAudioTask object and pass the audio clip to its constructor. + +Example: +```csharp +// Add your audio file in the editor +[SerializeField] private AudioClip audioClip; + +public void Start() + { + AgentAudioTask audioTask = new AgentAudioTask(audioClip); + // The audio should play as soon as the scheduler starts the task + taskSystem.ScheduleTask(audioTask); + StartCoroutine(PauseAndResumeAudio(audioTask)); + } + // Pause and resume the audio after a few seconds + private IEnumerator PauseAndResumeAudio(AgentAudioTask audioTask) + { + yield return new WaitForSeconds(5); + // Pause Audio + audioTask.PauseAudio(); + yield return new WaitForSeconds(2); + // Continue Audio + audioTask.ContinueAudio(); + } +``` + + +# Example Scene + +In the provided `Audio Sample` scene, the agent plays a recording of the documentation page, pausing for a short time while doing so. +Then a short sound effect follows. \ No newline at end of file diff --git a/Documentation/manual/quickstart-guide.md b/Documentation/manual/quickstart-guide.md index 48891ddc..d8cc477d 100644 --- a/Documentation/manual/quickstart-guide.md +++ b/Documentation/manual/quickstart-guide.md @@ -54,10 +54,12 @@ Going from least to most complex, it is recommended to look at the samples in th 1. Navigation Sample 2. Wait Sample 3. Dynamic Navigation Sample -4. Parallel Task Sample ([manual page](parallel-tasks.md)) -5. Aiming Sample ([manual page](aiming.md)) -6. Adaptive Gaze Sample ([manual page](adaptive-gaze.md)) -7. Item Pickup Sample ([manual page](items.md)) +4. Audio Sample ([manual page](audio.md)) +5. TaskBundle Sample ([manual page](task-bundle.md)) +6. Parallel Task Sample ([manual page](parallel-tasks.md)) +7. Aiming Sample ([manual page](aiming.md)) +8. Adaptive Gaze Sample ([manual page](adaptive-gaze.md)) +9. Item Pickup Sample ([manual page](items.md)) ## Alternative to code Instead of relying on dedicated code to schedule tasks for the agent, a newer feature allows tasks to be scheduled by creating a behaviour tree through a user-friendly interface. To learn more about this, visit the Behaviour Tree [manual page](behaviour-tree.md). diff --git a/Documentation/manual/task-bundle.md b/Documentation/manual/task-bundle.md new file mode 100644 index 00000000..64e67b5e --- /dev/null +++ b/Documentation/manual/task-bundle.md @@ -0,0 +1,52 @@ +# TaskBundles +TaskBundles are a way to group multiple sub-tasks together. +The resulting task bundle can be added to a task system like any other task. +A TaskBundle can also include a list of boolean preconditions. +They are checked beforehand and determine if the TaskBundle prematurely finishes, in the event that one of the preconditions is not met. +Tasks in a TaskBundle are executed back to back in sequence and cannot be interrupted by other tasks. + +# Construct a TaskBundle +The are three TaskBundle constructors, that can be used to create a TaskBundle: +1. `TaskBundle()` +2. `TaskBundle(List tasks)` +3. `TaskBundle(List tasks, List> preconditions)` + +`tasks` is a list of subtasks. Of note is, that TaskActions cannot be used here, as they would also add the sub-tasks to the regular scheduler. +`preconditions` is a list of boolean functions, so in particular lambda expressions can be used. +Other functions may be evaluated beforehand, so are not suitable for this purpose. +The lambda functions must return a boolean value. `() => {...}` syntax is a lambda expression that defines an anonymous function inline. +Parameters can be added in brackets on the left side of the arrow. + +You can add tasks and preconditions to the TaskBundle after its initialisation. This is possible through the `AddTask`, `AddTasks` and `AddPrecondition` methods. +Note, that preconditions are checked before the TaskBundle execudes its tasks. If a precondition is added after the TaskBundle has started executing, it will not be checked. + +Example: +```csharp +public List waypoints; +List tasks = new List(); +List> preconditions = new List>(); + +// In this example we add tasks via the constructor by passing a list +for (int i = 0; i < waypoints.Count; i++) + { + tasks.Add(new AgentMovementTask(waypoints[i].position)); + } +TaskBundle myTaskBundle = new TaskBundle(tasks); +// In this example we add a precondition after the initialisation +myTaskBundle.AddPrecondition(() => + { + // This lambda function checks if the agent is close to the last waypoint + // Compare vectors equality with accuracy of 0.5 + float distance = Vector3.Distance(waypoints[waypoints.Count -1].position, agent.transform.position); + return distance > 1.0f; + }); +``` + + +# Example Scene + +The framework contains one example scene that more comprehensively demonstrates the use of TaskBundles. +In the `TaskBundleSample` the agent attempts to execute two TaskBundles, of which only one's preconditions are met. + +The `TaskBundleController` has the option to add multiple waypoints where the agent should walk. +At the end of the execution of the first TaskBundle, the agent is close to the last waypoint, which leads to the precondition of the second bundle to fail. \ No newline at end of file diff --git a/Documentation/manual/task-system.md b/Documentation/manual/task-system.md index 7e3bcc3a..6a5fc228 100644 --- a/Documentation/manual/task-system.md +++ b/Documentation/manual/task-system.md @@ -78,4 +78,12 @@ Specifying a GameObject as an `aimTarget` for the animation, will start inverse - : Drop the specified item if it is currently hold be the agent, if no item is specified, all items are dropped. - : Schedules an GoTo Task that makes the agent walk to the specified coordinates or transform before dropping the specified item or all items, if no item is specified. - : Start or stops adaptive gazing until it is stopped or started again. This is realized with a task that only runs once. This also automatically adds a component if the agent doesn't have one. -- : Schedule a task that starts adaptive gazing for the specified time and then deactivates it by scheduling a wait task between a start and stop task. \ No newline at end of file +- : Schedule a task that starts adaptive gazing for the specified time and then deactivates it by scheduling a wait task between a start and stop task. + +### Removing Tasks +The following functions can be used to remove tasks from the agent: +- : Remove a task from the agent by specifying the task instance and its layer. +- : Clear all tasks on a layer. You can specify the layer and whether the current task should be aborted. By default, the Base Layer is used and the current task is aborted. +- : Clear all tasks on all layers. You can specify whether the current task should be aborted. By default, the current task is aborted. +- : Abort the current task on a layer. You can specify the layer. By default, the Base Layer is used. +- : Abort the current task on all layers. \ No newline at end of file diff --git a/Documentation/manual/toc.yml b/Documentation/manual/toc.yml index e8eba859..b5f7a6f8 100644 --- a/Documentation/manual/toc.yml +++ b/Documentation/manual/toc.yml @@ -14,6 +14,8 @@ href: adaptive-gaze.md - name: Aiming and Pointing href: aiming.md + - name: TaskBundles + href: task-bundle.md - name: Customization items: - name: Adding Own Agent Models and Animations diff --git a/Documentation/readme.txt b/Documentation/readme.txt index a1fbab26..016e8235 100644 --- a/Documentation/readme.txt +++ b/Documentation/readme.txt @@ -1 +1,2 @@ -Documentation was generated using DocFx 2.61.0 \ No newline at end of file +Documentation was generated using DocFx 2.61.0 +Command: docfx docfx.json --serve \ No newline at end of file