|Topic was automatically imported from the old Question2Answer platform.
So, this question isn’t too important because I found a way that works, but I was wondering why my original attempt didn’t work.
I was trying to simply print a variable from a resource but was having a lot of issues at first.
When I tried writing out that the monster var equaled the resource, like this:
onready var monster = “res://Monsters/test.tres”
it wouldn’t work and I kept getting an “Invalid get index” error. But then once I exported the monster var like this:
export(Resource) var monster
and then just dragged the resource into the var, it worked perfectly.
I was just wondering for future reference why the first attempt didn’t work. Shouldn’t both ways have gotten the same result?