Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
304 B
10
Indexable
extends Control

func _ready():
	var code = """extends Control\nstatic func test():\n\tprint(2 * 3)"""
	the_eval(code)

func the_eval(script_code:String):
	var compiled_script = GDScript.new()
	compiled_script.set_source_code(script_code)
	compiled_script.reload()
	compiled_script.call("test")