forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildCompression.cs
More file actions
74 lines (65 loc) · 2.33 KB
/
Copy pathBuildCompression.cs
File metadata and controls
74 lines (65 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using UnityEngine.Scripting;
using UnityEngine.Bindings;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine
{
public enum CompressionType
{
None,
Lzma,
Lz4,
Lz4HC,
}
public enum CompressionLevel
{
None,
Fastest,
Fast,
Normal,
High,
Maximum,
}
[Serializable]
[UsedByNativeCode]
public partial struct BuildCompression
{
public static readonly BuildCompression Uncompressed = new BuildCompression(CompressionType.None, CompressionLevel.Maximum, 128 * 1024);
public static readonly BuildCompression LZ4 = new BuildCompression(CompressionType.Lz4HC, CompressionLevel.Maximum, 128 * 1024);
public static readonly BuildCompression LZMA = new BuildCompression(CompressionType.Lzma, CompressionLevel.Maximum, 128 * 1024);
//Supported [[BuildCompression]] modes for runtime recompression of [[AssetBundles]] in AssetBundle.RecompressAssetBundleAsync
public static readonly BuildCompression UncompressedRuntime = Uncompressed;
public static readonly BuildCompression LZ4Runtime = new BuildCompression(CompressionType.Lz4, CompressionLevel.Maximum, 128 * 1024);
[NativeName("compression")]
private CompressionType _compression;
public CompressionType compression
{
get { return _compression; }
private set { _compression = value; }
}
[NativeName("level")]
private CompressionLevel _level;
public CompressionLevel level
{
get { return _level; }
private set { _level = value; }
}
[NativeName("blockSize")]
private uint _blockSize;
public uint blockSize
{
get { return _blockSize; }
private set { _blockSize = value; }
}
//Custom versions of this struct are not currently supported
private BuildCompression(CompressionType in_compression, CompressionLevel in_level, uint in_blockSize) : this()
{
compression = in_compression;
level = in_level;
blockSize = in_blockSize;
}
}
}