Node unique ID for saving and loading
Node unique ID for saving and loading
Is there something like a node ID which is specific to that node and will be the same no matter how often I execute the game? That would be super useful for saving and loading games.
What is your use case? That would help narrow down a good solution. Node path could likely work. You could also add a uuid or similar (there's an extension that provides a uuid implementation). Might be hacky, but you could tap into this and see if it suits your needs https://docs.godotengine.org/en/stable/classes/class_resourceuid.html
I want to use this unique value as a key for a dictionary, which will have some data in it (positions, rotations and some custom values)
Is there a reason you don't want to serialize that data with the nodes that use them? Are those values intended to change when the entity isn't loaded into a scene (like a background simulation or something)?
Seems like adding your own uuid or tapping into the ResourceUid class might be your best option