Hello.
TL;DR I have a statement in gdscript: return self, which seems to return Nil. What am I doing wrong?
Long version:
I have a script which is not extending a Node (it's a reference) which I am instancing. It contains a method that is supposed to return a reference to itself, so that I can assign it to multiple other objects, but after calling it and trying to use it I get Nil reference error, which leads me to believe that returning self either does not work as I expect or that I need to change something. Can you please explain how I should tackle this? I could return new instance (probably) but in some cases I'd like to share a single one among few objects.