• 1 Post
  • 1 Comment
Joined 1 year ago
cake
Cake day: July 23rd, 2023

help-circle
  • I’ve thought about this problem creating a system to save game state. The issue with assigning a UUID works until you have dynamic scenes added to the game at runtime. The nodes in those scenes will all have the same UUID. In the end I ended up just using the paths and saving the fact that the scene that data is being saved for is dynamic. Then the system sees this and re-instances the scene and adds it back to the tree. (A slight adjustment to the path must be made as Godot will create nodes with the at (@) symbol in them, but you can’t do that yourself.)

    You can see this in action at my demo repo on github.