Godot Version
4.7
Question
I’m creating a Resource in GDExtension. I need to validate all the parameters I’m using in this resource before I set it up, so I need to pass in all the parameters I need in the constructor. Is there a way to do this?
Alternately, I could use a static method, but I’m not sure how to set it up:
static Ref<CyDataBuffer> create(DataType _type, int _size, int _tuple_size = 1) {
CyDataBuffer a(_type, _size, _tuple_size);
return a;
}
The return a is not valid syntax. Not sure how I can turn my object into a reference.