The basic task stymies me. Put it in code:
class Foo:
func _init():
pass
func some_func():
var foo = Foo.new()
Will not work, because Foo
identifier is not visible in some_func
and in Foo
class itself.
What have I missed? Or how to overcome the trouble?
First way I found for myself is to move class in singleton script, so one can access class identifier through singleton object. But I don't want to put my class into singleton for such a silly cause.
Second way is (probably) to create private function which returns Foo as load("Foo path"), but this trick is a dirty one.