Media player/file media source/media material, objects created at runtime do not work properly

I need to play an indefinite amount of video in my game, so I implemented it by creating a media player at runtime, as shown below.

But it doesn’t work, the media texture can only output white textures.

If I change to using prefabricated assets, it works fine, but it doesn’t meet my needs.

Hello,

I was attempting to do a similar thing and I found this post: Failed to set media texture to a media texture which is from "Construct object from class" - Asset Creation - Unreal Engine Forums

The trick is to create the media texture in your construction script. Doing this fixed my issues. I hope it might fix yours a s well.

1 Like