Console Command Node not working on packaged builds

I am currently making a game where the player takes pictures with the in-game camera. I am trying to utilize the blueprint node “Execute Console Command”. I have attempted to use both Shot and HighResShot 1 and niether work on packaged builds of the game (target platforms are Windows and Mobile)

Any suggestions on how to fix this preferablly without using C++?

Out of curiosity, does hitting the console key and typing HighResShot 1 work for you when entered in the packaged build? The file should be saved to the “Saved/Screenshots/” folder.

It works if I manually type the console command in a packaged build (Both mobile and PC) but the Blueprint node fails to trigger.

Can you post a screenshot of your BP code for that functionality?

Theres a screenshot. It’s a photo taking game so it repositions the capture 2d element and then takes the screenshot

A couple things here. Have you confirmed that the Is Valid node is firing as intended? Are you seeing that Print String at the end of the execution fire properly? I also noticed you were using Scene Capture 2D instead of a regular Camera Component. Unless this Scene Capture is piping directly into your view, the “shot” command probably won’t work as you intend it. However, there’s actually some functionality built into the render target system that allows you to export images from the output of your SceneCapture2D components directly to a file, and it would provide much more control than the shot / HighResShot console commands would offer. Check out the node “Export Render Target”. This will allow you to select the texture render target file that your scene capture writes to and export it as a .png file directly to whatever file path you like! I think this may be a better solution for your situation, considering that the SceneCaptures are the source of the screenshot and not your regular game viewport. I’ve also attached a image below showing the node setup I have for this in one of my own projects. You can ignore most of the code here, as in my situation, I am exporting out a render target file for every frame rather than once on command-- but it shows you how you can use the Append node to build the filename strings dynamically, something that would likely be useful for you if you don’t want to keep overwriting the same image on disk.

So the Scene Capture 2D is used to write to a Render Target Texture so that the “pictures” can be used later in a photo gallery. I did just test the valid node on both mobile and desktop and it is reading out as invalid for some reason. Another thing that happens is the player camera is moved into a first person perspective and then capture component gets snapped to that location when the shutter button is pressed.

I would try testing with the above method of capturing the file to disk. However, if the IsValid node is returning false, there’s definitely a problem there. Are you referencing the SceneCapture2D component that is being used to take the snapshots? How are you getting that reference?

Ok I figured it out. You were right it wasn’t able to identify the capture 2d component because it wasn’t being identified so i swapped the is valid node with the get all actors node and now it is working fine on both platforms. I will try your export render method though to try and save the photos so the player can restart the game later with them.

Awesome, let me know how it works!