duplicated Resources are not shown in the inspector

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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():

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?

:bust_in_silhouette: Reply From: Lopy

Try yielding a frame before your break to see if it manages to update? If it still doesn’t, you might have found a bug. Check on the git that it was not filed already, and if it was not, add it.

Im not quite sure how to yield a frame.
I tried this:
yield(get_tree(), “idle_frame”)
before and after duplicating the resource in _ready().
i also tried it out to duplicate the resource in _process():
Both times the behaviour didn’t change. Was this what you meant or is there
another way to yuild a frame?

Nazzaroth | 2020-12-30 05:33