Mobile: save and share a screenshot (Scene Capture Component 2D)

Hi :smiley:

I am developing a mobile game on UE5 in which the player can take a screenshot of the scene thanks to a “Scene Capture Component 2D”.

Once the screenshot is taken, I want the player to be able to do 2 things:

  • Save the screenshot inside the photo gallery of its phone
  • Share it on Twitter via a pre-filled Tweet

I can’t find any information on the internet or any node in UE that could help me.

Any ideas?

Thanks for your help! :smile:

ps: also, when I save the render target image as a .png on PC, the image do opens, but it is empty (even if it weight like 2Mb), like if the Alpha was at 0 (and it’s not the case). Do you know where it comes from?

Hey there @Herlehos! Welcome back to the community! If I’m correct I believe twitter’s API is a REST api so it should be relatively easy to setup once you get accustomed to using APIs. The VaRest plugin makes it a bit easier to call REST api’s from UE. I’ve also got a video to help you get a bit more accustomed to calling an external API but it’s for an AI voice thing, not specifically twitter, you’ll still need to learn what you need to connect on twitter’s side.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

As for the image saving, this thread might help you out:

Hopefully this will help you out!