コード例 #1
0
        private void RandomizeEncryption()
        {
            if (!Application.isPlaying && !EditorUtility.DisplayDialog(
                    "Randomize encryption keys confirmation",
                    "This action will break your persistant saves",
                    "Confirm", "Cancel"))
            {
                return;
            }

            _hashSalt   = RandomExt.Random.Next();
            _encryptKey = RandomExt.NextString(16);
            if (!Application.isPlaying)
            {
                if (EditorUtility.DisplayDialog(
                        "Ecryption keys changed",
                        "We recomend clear persistan saves",
                        "Clear", "Cancel"))
                {
                    Tools.ClearPersistantSave.Clear();
                }
            }
        }