Skip to content

Instantly share code, notes, and snippets.

Forked from GK-GreyGhost/
Created October 7, 2022 13:09
What would you like to do?
Create a folder in the format year-month-day and save the screenshot
func screenshot():
var img = get_viewport().get_texture().get_data()
var dir:Directory =
var now = OS.get_date()
var folder:String = 'user://screenshots/%s-%s-%s' % [now.year,now.month,]
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