![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Nazzaroth |
I use resources in my rpg-template-project so i want to export a resource, so later people can slot in their own resources.
But to make sure diffrent Objects have unique resources i wanted to use .duplicate() (i have solved that problem with local_to_scene so no worries here)
Cause of some bugs i used the debugger and then noticed this behaviour(exampleCode below):
extends Control
export (Resource) var resourceExport
onready var resourceDuplicate = resourceExport.duplicate()
func _ready():
print(resourceExport)
print()
print(resourceDuplicate)
print(resourceDuplicate.amount)
when i use the debugger i get this result in the editor:
as you can see the duplicated resource exists in the debugger and also prints out its own variables, but on the right side in the inspector the resourceDuplicate-Member is empty. Is this expected behaviour?