About using GUIDs in saves, in general. I had a conversation about migrating save data with somebody several years ago, and they also proposed to use GUIDs for all things instead of relying on ScriptNames.
I was thinking about it, and came to a thought that using guids has one non-obvious downside.
When you have a ScriptName, it's easy to understand and edit by a human. GUIDs are not, they are suited for a one-time automatic assignment.
I imagined a situation, where user made a mistake and deleted a game object. Realizing this mistake, a user then recreated that object with the same script name. But if GUIDs are generated, the recreated object will have a different GUID. If guids are used to match data from restored saves, that action will unexpectedly break all older saves. In order to fix this, user will have to find out the GUID used before, and manually insert it into the data.
There may be a opposite situation: a user decided to use a game object for another role, and changed its script name, looks, and so on. But if saves rely on guids, then old data will "unexpectedly" load into the same object again.
Relying on ScriptNames seems to be simpler, because you may have to do manual instruction like "read data with name X into object with name Y" in case of a complex data migration. Of course you can do same with GUID, both are strings, but ScriptNames are human-readable, while GUIDs are not.
In a broader sense this is a topic of "how to tell what loads into what", and how to make this convenient for both engine and users.
I was thinking about it, and came to a thought that using guids has one non-obvious downside.
When you have a ScriptName, it's easy to understand and edit by a human. GUIDs are not, they are suited for a one-time automatic assignment.
I imagined a situation, where user made a mistake and deleted a game object. Realizing this mistake, a user then recreated that object with the same script name. But if GUIDs are generated, the recreated object will have a different GUID. If guids are used to match data from restored saves, that action will unexpectedly break all older saves. In order to fix this, user will have to find out the GUID used before, and manually insert it into the data.
There may be a opposite situation: a user decided to use a game object for another role, and changed its script name, looks, and so on. But if saves rely on guids, then old data will "unexpectedly" load into the same object again.
Relying on ScriptNames seems to be simpler, because you may have to do manual instruction like "read data with name X into object with name Y" in case of a complex data migration. Of course you can do same with GUID, both are strings, but ScriptNames are human-readable, while GUIDs are not.
In a broader sense this is a topic of "how to tell what loads into what", and how to make this convenient for both engine and users.