- Edited
Hey guys
I've got some custom Resource class. It is used to hold the data for some custom editor property. Everything is working as expected in the inspector, and when there is only one instance of the scene in the level.
Now let's say I make a scene using that property. I set up things in the inspector, and then add a bunch of instances to the level. I get unexpected behavior because the resource class behind that property is shared between instances. How can I make it local through code? I did search and found resource_local_to_scene. But it doesn't seem to be working.
EDIT: To be more specific, there is a function inside the custom Resource class which I'm connecting to some signal of some other resource. The main problem is this: when there are multiple instances, the resource containing the function is shared and only one function is connected to the signal. If I emit the signal, only one instance will call the function and the rest will ignore it because I have:
if ReuseLogicNexus.global_signal_list.has_signal(global_signal.signal_name):
ReuseLogicNexus.global_signal_list.emit_signal(global_signal.signal_name, data)
This code only works once, because it's only ONE resource shared between all the instances.