Question: Q . 1 . ( i ) Write a C# Monobehaviour script to attach to a Unity 3 D game object which automatically destroys the
Qi Write a C# Monobehaviour script to attach to a UnityD game object which automatically destroys the object as soon as it is either behind the camera or more than a defined distance away from it This defined distance should be available as a value that can be edited in the inspector. ii What are C# Coroutines? iii Write a Coroutine which carries out a sequence of actions over time: Gradually frame by frame moves its local game object at a speed of metre per second towards a Vector position. After the game object arrives at the position, waits seconds. Then moves the game object in the same way to a second Vector position. Your Coroutine should use the following signature: IEnumerator MoveBetweenVector pos Vector posiv Write a generalpurpose version of your Coroutine which: Moves the game object between each position in a List rather than just two positions. After arriving at each position, waits for the time defined in the Float, before continuing to the next Vector in the List. Your Coroutine should use the following signature: IEnumerator MoveBetweenList positions, float waitTime
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
