If I have multiple levels with objects with the same name and I use the "Assign Unique Keys" tool, is there a very low chance 2 savers will get assigned the same identifier key number? (Example: "SAVER_931386"), or does the system know how to check if a key has already been used in the whole entire project?
Might be a very small chance for now, but if I duplicated 1000 scenes that contain that "SAVER" gameobject, the chance of overriding a past key would become much larger.
Saver keys
Re: Saver keys
Hi,
Yes, there's a very, very low chance of duplicates -- not as low as using GUIDs, but still very low, and these key values are shorter than GUIDs. You can assign keys manually if you're concerned.
Yes, there's a very, very low chance of duplicates -- not as low as using GUIDs, but still very low, and these key values are shorter than GUIDs. You can assign keys manually if you're concerned.
Re: Saver keys
Right now, chance is 1 in a Million because the saver keys generate with 6 digits.
Is there a script where I could easily add 1-2 more digits to the "Assign unique keys" tool, so that the chance becomes 1 in 100 Million?
Is there a script where I could easily add 1-2 more digits to the "Assign unique keys" tool, so that the chance becomes 1 in 100 Million?
Re: Saver keys
You could assign keys manually or tick the savers' Append Saver Type checkbox. Or you could duplicate SaveSystemEditorUtility.cs, change the class name, and modify the AssignNewKey method to use something like System.Guid.NewGuid() instead of saver.GetInstanceID() to generate the key.