0 votes

Hi,
Now, that I am able to save a screenshot in the file system, how do I preload it as the texture of a textureRect when the I play the game the next?

Godot version 3.2.2
related to an answer for: How to save a screenshot
in Engine by (100 points)

1 Answer

+1 vote
Best answer

When You saved it into the file system , You can see it as resource and use it as all of your images. Just like you insert any .png file into your sprite. So You should take path where you saved your screenshot and preload it with it.

Unless You didn't save it into "res" folder and don't see it ?

Or do You mean You want to preload this image right after taking screenschot, when the project is still running ? If so You should use load(), but when You create image You don't need to load it again, just make sure to keep reference to it on creation.

by (7,285 points)
selected by

Thanks a lot.
I did use "res://screenshot.png".
Clears a few more things than just the question that I asked.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.