iI have 26 video files which iI have to put in an array and play for different objects. soSo far iI have written this from what iI know:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
public class videomanager : MonoBehaviour {
public VideoClip[] vids;
private VideoPlayer vp;
// Use this for initialization
void Start () {
vids = new VideoClip[25];
vp = gameObject.GetComponent<VideoPlayer> ();
}
// Update is called once per frame
void Update () {
}
}
iI have attached this script on a plane ion which I am playing the video on. before
Before that i, I had 26 different planes each, one for each different video, but iI think it would be better if iI could play them on a single plane and change the video according to logic. i
I am not sure how I should i load them into my player and play them.