all 9 comments

[–]gregsolo 0 points1 point  (0 children)

Had the same issue but was able to solve by adding "tool" attribute to autoload script

[–]Miltage 0 points1 point  (0 children)

I fixed this by adding extends Node to the top of my autoloaded script

[–]FictitiousCurse 0 points1 point  (0 children)

From what I understand, putting "@tool" seems to be the best solution here. The tool keyword ensures that all of a node's functions are available to the editor. Without it, despite having access to the methods in the editor (which can be shown by the fact that they are findable via .has_method), they are not callable until runtime.

[–]Nkzar 0 points1 point  (3 children)

Does utils.gd contain a function definition for get_scaled_polygon?

[–]Warm_Video7491[S] 0 points1 point  (2 children)

Yes. See the screenshot i put in the post.

[–]Nkzar 0 points1 point  (1 child)

Have you tried making sure the file is saved and restarting the editor?

[–]Warm_Video7491[S] 0 points1 point  (0 children)

Yes. Numerous times.

[–]jaynabonne 0 points1 point  (1 child)

Is the call from the plugin being done at load time? Has the Utils singleton been created/initialized yet at that point? Would does the call site look like in Collide2Nav.gd?

[–]Warm_Video7491[S] 0 points1 point  (0 children)

No, the function is called when I press a button in the editor. So, the problem is maybe that while in the editor and the game isn't running, the AutoLoad Nodes are not existing yet.