[UE5.4] How to ensure materials are loaded on spawned actors?

Hi, wanted to give an update on how I solved this. I have 3 different ways when spawning an actor.

  1. I set bCaptureEveryFrame to true when using the capture camera.

This lets the image update, but it does take a LOT more GPU processing power. Your framerate will potentially be cut in half. And your capture camera must be near your main camera or you will get flickering of shadows and other things as each camera is fighting for resources for their own views.

  1. If it’s a fullscreen UI, preload the assets in the viewport. The UI will hide everything behind it so you cannot see the assets, but it will load them all in. This only works if the user must take an action to show the asset in the UI. If the asset is displayed right away, you need option 1 or 3.

  2. Wait until HasActorBegunPlay() returns true.

If the actor is already in the level, I have another post where I indicate how to check if a level is loaded. It is somewhat complicated so HasActorBegunPlay() is probably easier.