Home page

Tags

Latest Posts

Compile Godot Export Templates

The basic command to compile an export template is:

scons platform=linuxbsd target=template_release

Where platform could also be windows, android… instead of linuxbsd. Both templates can be compiled at the same time using template_debug/template_release.

Load Json Into Dictionary

To load a json into a dictionary we can use the following code:

var data: Dictionary
var file: File = File.new()
if file.open("res://assets/weapons.json", File.READ):
	printerr("Error opening weapons json")
data = JSON.parse(file.get_as_text()).result
file.close()
up arrow