-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Regression in InstancePlaceholder behavior, instanced scene missing Node property values #88662
Comments
I think PR #83343 introduced the problem. |
Tested with the latest release, the issue is present on 4.3.dev4 |
I can confirm the issue described in the OP with 4.3-dev1 to 4.3-dev4 and current |
Reproduced the bug, I have this pr open #87387 that maybe will fix this issue. I’ll test at home if I can reproduce this bug with it. If I can then I’ll try to fix this issue in the same pr. |
In that case I’ll have to integrate the fix into the pr |
godot/scene/property_utils.cpp Line 84 in f2045ba
Found the place that causes this regression. Commenting the if-statement fixes it though it introduces another bug in Edit: It will brake node duplication since it relies on variant’s type being object. |
What's progress on a solution for this issue? |
Not at the moment. I haven't had that mich to take a look further how to resolve the issue. I only know that somewhere the value changes to null because of the changes that I have made in property_utils.cpp |
It seems there are a couple of problems with InstancePlaceholders being instantiated.
This is as far as I've gotten with this for now. But it's smelling more and more to me that InstancePlaceholders will need a bit more information to properly set everything up. Naturally, I barely know what I'm doing 🤷♂️ Here is my little experimental fork that works with internal node references, but breaks on arrays and external nodes TheOrioli@fe34765 Here is a modified test project that includes even more test cases. I've added both external node references, as well as Node and Nodepath arrays. One of the arrays is mixed, containing both internal nodes and external nodes. As a user I would expect all those references to remain. |
Tested versions
System information
Godot v4.3.dev3.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)
Issue description
When instantiating a node using
InstancePlaceholder.create_instance()
the newly instantiated node is missing exported Node properties.This is the expected result ( viewed in Remote tab)
this is what happens instead
( number change is due to me changing it in between screenshots 😅)
Nested scenes are not affected and seem to instantiate with all properties set. Issue appears in both GDScript and C#.
Everything works as expected on 4.2.1
Steps to reproduce
Open the attached MRP, and run
main.tscn
Check the Remote tab and see the properties missing.
For ease of comparison the
Main
node has a boolwhich will trigger loading the same scene manually using
InstancePlaceholder.get_instance_path()
instead. This approach works fine.Minimal reproduction project (MRP)
PlaceholderInstanceRepro.zip
The text was updated successfully, but these errors were encountered: