Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource.local_to_scene in an array or dictionary does not work for child nodes that have been instantiated in PackedScene or at runtime #97400

Open
luuuuyang opened this issue Sep 24, 2024 · 2 comments

Comments

@luuuuyang
Copy link

Tested versions

v4.3.stable.official [77dcf97]

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 GRE (Advanced Micro Devices, Inc.; 32.0.11037.4004) - AMD Ryzen 7 7800X3D 8-Core Processor (16 Threads)

Issue description

Although #71578 #87268 fixes some similar issues, I'm still experiencing other issues.

  1. The resources on the parent node are independent and as expected, whether stored in a variable or in an array or dictionary, whether they have been instantiated in the packedscene or at runtime.

  2. The resources on the child nodes stored in a variable are independent, while stored in array or dictionary are not independent, whether they have been instantiated in the packedscene or at runtime.

  3. Also during testing, I found that in addition to the second issue, the get_local_scene method of a resource that has been instantiated in packedscene points to the node that was instantiated at runtime, and which confused me.

Output

Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
Vulkan 1.3.287 - Forward+ - Using Device #0: AMD - AMD Radeon RX 7900 GRE

Comparison of parent nodes already in the packedscene
Node:<Node#28806481158>	-9223372008031517431
Node:<Node#28806481158>	-9223372007914076908
Node:<Node#28806481158>	-9223372007897299696
--------------------------------------------------------
Node2:<Node#28974253335>	-9223372007863745269
Node2:<Node#28974253335>	-9223372007746304758
Node2:<Node#28974253335>	-9223372007729527521


Comparison of child nodes already in the packedscene
Node:<Node#28806481158>	-9223372007964408546
InstantiatedNode2:<Node#29326574884>	-9223372007427537624
InstantiatedNode2:<Node#29326574884>	-9223372007410760407
--------------------------------------------------------
Node2:<Node#28974253335>	-9223372007796636382
InstantiatedNode2:<Node#29326574884>	-9223372007427537624
InstantiatedNode2:<Node#29326574884>	-9223372007410760407


Comparison of instantiated parent nodes
InstantiatedNode:<Node#29192357147>	-9223372007645641444
InstantiatedNode2:<Node#29326574884>	-9223372007494646493
InstantiatedNode2:<Node#29326574884>	-9223372007477869293
--------------------------------------------------------
InstantiatedNode2:<Node#29326574884>	-9223372007511423727
InstantiatedNode2:<Node#29326574884>	-9223372007494646493
InstantiatedNode2:<Node#29326574884>	-9223372007477869293


Comparison of instantiated child nodes
InstantiatedNode:<Node#29192357147>	-9223372007578532576
InstantiatedNode2:<Node#29326574884>	-9223372007427537624
InstantiatedNode2:<Node#29326574884>	-9223372007410760407
--------------------------------------------------------
InstantiatedNode2:<Node#29326574884>	-9223372007444314841
InstantiatedNode2:<Node#29326574884>	-9223372007427537624
InstantiatedNode2:<Node#29326574884>	-9223372007410760407


--- Debugging process stopped ---

Steps to reproduce

  1. Run project (F5).
  2. Observe the console output.

Minimal reproduction project (MRP)

resource-local-to-scene-test.zip

@luuuuyang luuuuyang changed the title The local_to_scene does not work for Resources exported either in the PackedScene or in instantiated child node Resource.local_to_scene in an array or dictionary does not work for child nodes that have been instantiated in PackedScene or at runtime Sep 24, 2024
@LuciaSelvlysende
Copy link

I think I'm also having this exact issue.

@LuciaSelvlysende
Copy link

I did a little bit of testing for this, duplicating the resources manually also does not seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants