Created
October 28, 2021 17:26
-
-
Save GK-GreyGhost/486895e00828882b1ca2350305a944b4 to your computer and use it in GitHub Desktop.
save image to dated folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dir:Directory = Directory.new() | |
var now = OS.get_date() | |
var folder:String = 'user://screenshots/%s-%s-%s' % [now.year,now.month,now.day] | |
dir.make_dir_recursive(folder) | |
img.save_png(folder+'/%d.png' % OS.get_unix_time()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
screen capture code here Godot Demo Project -> Screen Capture