How it works...
This script class makes the Video Player objects output their videos to Render Texture's asset file, myRenderTexture. This is used by both 3D cube and the UI Raw Image for their surface display.
The videoClips variable is a public array of video clip references.
The instance object of the C# script class VideoSequenceRenderTexture was added as a component to GameObject's video-object. This script will create child GameObjects of GameObject video-object, each containing a VideoPlayer and AudioSource component, ready to play each of the video clips assigned in the public array's videoClips variables.
The SetupObjectArrays() method initializes videoPlayers to be an array the same length as videoClips. It then loops for each item, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access