Raildex
(Raildex)
July 21, 2016, 12:47pm
1
I have a menu that should take the current Screen as a background Image.
I attached a SceneCaptureComponent2D to my CameraManager
This Camera Manager has a function called “get currentFrameImage” that returns a newly created Texture Target:
This Texture Target is fed as a parameter to a material instance
But the Texture still gets captured every frame!
My conclusion after using SceneCapture2D was that it’s updated every time you move it.
I was having such issue some time ago and I was only able to create a TextureTarget2D at runtime with the Victory Plugin Library. It has a function that creates a TextureTarget2D at runtime, specially because it (apparently) does not work using the default engine’s functions. Try adding the plugin and then use create texture render target 2D function:
Raildex
(Raildex)
July 21, 2016, 5:23pm
4
Yeah, except that my component doesnt move at all.
I was having such issue some time ago and I was only able to create a TextureTarget2D at runtime with the Victory Plugin Library. It has a function that creates a TextureTarget2D at runtime, specially because it (apparently) does not work using the default engine’s functions. Try adding the plugin and then use create texture render target 2D function:
Doesn’t work though. Still Captures every frame
€dit:
I made it work.
I simply set the Component to hidden after capturing a frame.
Before I take a snapshot I unhide it.
Nice trick! Thank you for sharing