Skip to content

Instantly share code, notes, and snippets.

@GK-GreyGhost
Created October 28, 2021 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GK-GreyGhost/486895e00828882b1ca2350305a944b4 to your computer and use it in GitHub Desktop.
Save GK-GreyGhost/486895e00828882b1ca2350305a944b4 to your computer and use it in GitHub Desktop.
save image to dated folder
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())
@GK-GreyGhost
Copy link
Author

screen capture code here Godot Demo Project -> Screen Capture

@GK-GreyGhost
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment