- Home /
Can't get video to play on Render Texture (no code used)
I'm trying to get a video to play on my game's canvas, and it shows up frozen on the first frame. Here is what I'm doing:
-Make a video player with a video clip as its source
i. Settings: Play on Awake, Wait for First Frame, Loop
ii. Render Mode: Render Texture
iii. Target Texture: newly created "VideoTexture" object with default settings
-Make a flat cube mesh on the UI
-Assign that cube to have a new material called "Video Material"
i. Albedo: VideoTexture
ii. Emission: checked
iii. Emission color: VideoTexture
I followed this from a unity tutorial and the texture is being rendered, but it is not playing. What did I do wrong? Is there something different that needs to be done in Unity 2018?
Answer by gunboldb · Jan 10, 2019 at 05:22 AM
Create an empty canvas game object, set desired size, add raw image component. Set raw image texture to the VideoTexture, and set the target texture of your video player to again VideoTexture.