Replies: 2 comments 1 reply
-
What kind of signals are you suggesting? I don't see any signals in your example |
Beta Was this translation helpful? Give feedback.
0 replies
-
I meant like a ref_change signal that is emitted when it increments or decreases. That way, this code doesn't have to run in process and runs |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This would open up new possibilities while handling resources and similar classes that inherit from RefCounted
eg:
func _process(_delta): if inventory_holder_weak_ref: var holder: Object = inventory_holder_weak_ref.get_ref() if holder and holder.inventory != inventory: inventory = holder.inventory
Can all be linked to a signal instead.
Beta Was this translation helpful? Give feedback.
All reactions