Interactive Media

Mohamed Al-Kaf - Media Explorations

Adding video Clips (update)

Written by: Mohamed Al-Kaf | Posted on: | Category:

I added video clips of actual drone strike footage at the end of the level. I wanted something to remind the player especially the Pilot of the reality of they type of warfare. I felt like it was enough to make the player think about the issues with this type of warfare. Screenshot 2019-05-02 at 9.21.47 am.png

for the script i did not find something available with in the component setting that would allow to change the scene with video end. So i thought about added a timer , and setting it same length of the video. The only problem i thought about is if the video doesn't load some slow down happens the timer would skip the video. For what i need this works.

using UnityEngine;
using UnityEngine.SceneManagement;

public class LoadLevelTimer : MonoBehaviour
{

    [SerializeField] private float delayBeforeLoad = 10f;
    [SerializeField] private float timeElapased;

private void Update()
    {
        timeElapased += Time.deltaTime;
      if (timeElapased > delayBeforeLoad)
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        }

    }
}