Videos will be referenced by name in the CSV data. The app will look in the Resources folder for the files. As with images, we could use the video URL instead.
The video name is the fifth column in your database (index 3). We can capture it when the file is loaded.
To InstructionStep.cs, add the following:
public string VideoName; And, private const int VideoColumn = 4; And then add to the InstructionStep constructor function, if (values.IndexOf(item) == VideoColumn) { VideoName = item; }
Now we create a UI element component. In your Scripts/UIElements/ folder, create a C# script named VideoGraphic and write it as follows:
File: VideoGraphic.cs using UnityEngine; using UnityEngine.UI; using ...