Ejemplo n.º 1
0
        public UnitPacker(string targetDir)
        {
            this.targetDir    = targetDir;
            resFileListReader = new ResFileListReader();

            fakeUUID = UUIDManager.MakeUUID();
            UUID     = UUIDManager.ConvertUUID(fakeUUID);
        }
Ejemplo n.º 2
0
        private static byte[] _readUUID(Stream stream)
        {
            byte[] rawUUID = new byte[64];

            stream.Read(rawUUID, 0, rawUUID.Length);

            return(UUIDManager.ConvertUUID(rawUUID));
        }
Ejemplo n.º 3
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Debug.LogError("More than once instance of the UUIDManager Singleton. Deleting the old instance.");
            DestroyImmediate(instance);

            instance = this;
        }

        // Make sure this UUID works through out all subsequent sessions
        DontDestroyOnLoad(gameObject);

        uuidString = "";
    }
Ejemplo n.º 4
0
        public static void SaveSettingData(string data)
        {
            logger.Info(inst, "Saving SaveFile... SaveFile dir = " + saveFileDir);
            byte[] fakeUUID = UUIDManager.MakeUUID();

            byte[] UUID = UUIDManager.ConvertUUID(fakeUUID);

            string rawData = AES256Manager.encode(data, UUID);

            if (File.Exists(saveFileDir))
            {
                File.Delete(saveFileDir);
            }

            StreamWriter writer = new StreamWriter(saveFileDir);

            writer.Write(fakeUUID);
            byteBoundaryWork(writer.BaseStream, true);
            writer.Write(rawData);

            writer.Close();
            logger.Info(inst, "Loading SaveFile Success!");
        }