PIP (Picture-in-Picture) Actor and Following Mouse

Hello ZyllosF, +1 for describing your case well, and adding the code.
also +1 for the TObjectPtr, you might want to also check at the meta tag Transient for some of your members (like GameInstance, and maybe rendertarget)

some comments:

  • you don’t necessarily need to subclass a SceneCapture, you can just add a component for scene capture. (though subclassing seems the ideal way to me).

  • you don’t need to set the texture via code. you can just assign it to the material instance (that would be the most common workflow). just open that “BPBinocu…Inst” and set the correct render target. done.

  • you don’t need to create a render target via code. just create it on the browser. right click, create render target. then assign in your scenecapture and material. you do that statically, on the browser, not via code.

  • also take a look at ConstructorHelpers::FObjectFinder is easier to use than the objectlibrary. though they differ in capabilities a bit.