godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.82k stars 19.43k forks source link

[Regression] Script classes instantiated manually in a variable can't call their own instance functions anymore #93715

Closed reflexguru closed 2 days ago

reflexguru commented 2 weeks ago

Tested versions

System information

Linux - Freedesktop SDK 23.08 (Flatpak runtime) - Wayland - Vulkan (Mobile) - dedicated AMD Radeon RX 6700 XT (RADV NAVI22) () - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)

Issue description

Starting from 4.3 beta 1, there's a weird issue that prevents the scripts instantiated in a variable from calling their own instance functions (method not found error). However, it "works" when you make the function static. Our project relies on that and doesn't work at all now.

While the functions can't be called in 4.3 beta 1 and newer, they can be printed to console just fine.

I have searched for a similar issue here, but with no results. If it's a duplicate, please close the issue.

Screenshots and minimal reproduction project are attached below

4.3 dev 6, works fine: Screenshot from 2024-06-28 22-40-32

4.3 beta 2: Screenshot from 2024-06-28 22-40-59

Steps to reproduce

Minimal reproduction project (MRP)

gd-bug-reproduction.zip

This project is built in 4.2.2 stable, so you can test it in 4.2.x as well

matheusmdx commented 2 weeks ago

Tested on latest master [811ce36c6] and this issue was already fixed, probably was the same problem from #92610 and was fixed by https://github.com/godotengine/godot/pull/92609

reflexguru commented 2 days ago

tested in beta 3, works fine now