Using the new Video Player with submeshes
Hello,
For a project I'm working on I've been procedurally generating a tunnel that surrounds the player/camera. When I generate this tunnel I also generate two sub-meshes that contain movie textures that are wrapped along the sides of the tunnel.
Currently I did this with movie textures in the sub-meshes materials and play/loop them, which has bad performance if there are many movie textures being generated and running at once. I wanted to try the new VideoPlayer that comes with 5.6, except I can't figure out how to apply the video player to a specific material/sub-mesh.
Obviously I'll be using the material override render mode for the player, but the only way I can see to choose what material to pick is based on targetMaterialProperty. I'm somewhat new to Unity Materials and couldn't find a way to change/select this for the materials that I generate.
So the question is, is there an easier way to pick which material the video player overrides? If not, how can I manipulate the Material Properties so that I can create VideoPlayers for 2 submeshes, and leave the main mesh alone? Right now they all have the _MainTex property.
Thanks, Brendan