You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two instances of a scene are included in the root. On the second instance, all field values are *= 2. All resources that are in arrays and dictionaries are modified on both instances, while the modifications should all only affect one of the two instances.
Following is the current output log showing resource_local_to_scene, the field's integer value and get_local_scene():
Output Log
pre-modified first ---------
simple:
true 1 LocalToSceneTests1:<Node#26491224610>
array:
true 2 <Object#null>
true 3 <Object#null>
dict:
true 4 <Object#null>
sub:
true 5 LocalToSceneTests1:<Node#26491224610>
sub array:
true 6 <Object#null>
sub dict:
true 20 <Object#null>
check first --------- (should be same as above)
simple:
true 1 LocalToSceneTests1:<Node#26491224610>
array:
true 4 <Object#null>
true 6 <Object#null>
dict:
true 8 <Object#null>
sub:
true 5 LocalToSceneTests1:<Node#26491224610>
sub array:
true 12 <Object#null>
sub dict:
true 40 <Object#null>
check second --------- (should be *= 2 on each field)
simple:
true 2 LocalToSceneTests2:<Node#26575111315>
array:
true 4 <Object#null>
true 6 <Object#null>
dict:
true 8 <Object#null>
sub:
true 10 LocalToSceneTests2:<Node#26575111315>
sub array:
true 12 <Object#null>
sub dict:
true 40 <Object#null>
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Resource local to scene is ignored for arrays and dictionaries
Resource local to scene is ignored for arrays and dictionaries (including surface materials)
Jan 17, 2023
Godot version
Tested again on 4.2 beta 2
System information
Windows 10
Issue description
Exporting a resource that is marked as local to scene works as expected, both when exposed on a node and on a sub-resource.
But when the resource is a part of an array or dictionary, local to scene no longer works. The resource instances are shared.
Steps to reproduce
get_local_scene() == null
and modifications are shared between instances, despiteresource_local_to_scene == true
.Minimal reproduction project
CustomLocalToScene.zip
Two instances of a scene are included in the root. On the second instance, all field values are
*= 2
. All resources that are in arrays and dictionaries are modified on both instances, while the modifications should all only affect one of the two instances.Following is the current output log showing
resource_local_to_scene
, the field's integer value andget_local_scene()
:Output Log
The text was updated successfully, but these errors were encountered: