You have two options.
-
You could extend SceneCaptureComponent2D C++ class and override some function in the chain of functions responsible for updating the texture, and put an if statement on it. You’ll add a boolean member to the class whose default is false, and which is used as the if statement’s condition. Within the result of the if statement you’ll set the bool to false again. Then you’ll make a new ufunction which will allow a designer to set the bool to true using a blueprint. Viola, you have a snap camera. It will only capture one frame of the scene when prompted.
-
An alternative would be to have the blueprint responsible for taking a picture, do so by spawning the SceneCaptureComponent2D, doing what it needs to do with it, and then destroying it. This would be less optimal, but would produce more or less the same end result.