Godot Version
4.2
Question
I created a script, extends Resource, added some exports and a function. When I create a resource with it and add it as an export to a Node, I’m not able to call the functions or variables or anything.
I can’t find anything that I’m doing wrong from reading about custom resources online.
Any ideas?
make a class in the custom resources script
classname myClass
In the script your Trying to call it from make a variable
var MyClass = myClass
#make sure the variable name and class name are not
#exactly the same
Call your Functions
MyClass.myFunction()
Yeah that’s exactly how I was doing it.
Oh well, I was hoping it was a known problem.
Decided to just put all my custom functions on a single node and call that lol. I’ll make it into an autoload and worry about needing resources later.
Can you show the code where you are trying to call the resources-method? Are there error messages?