Exemplo n.º 1
0
    void UnzipFromBytes(byte[] bytes)
    {
        System.IO.MemoryStream zipStream = new System.IO.MemoryStream(bytes);
        ZipUtility.UnzipFromStream(zipStream, materialPath);
        string jsonPath = Path.Combine(materialPath, "materials/" + jsonFileName);
        string jsonText = System.IO.File.ReadAllText(jsonPath);

        material = JsonUtility.FromJson <Material>(jsonText);
    }