-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathBuildLayout.cs
More file actions
194 lines (165 loc) · 5.56 KB
/
BuildLayout.cs
File metadata and controls
194 lines (165 loc) · 5.56 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
using System.Collections.Generic;
// this file comes from Addressables and is used to serialize and deserialize
// build layout information to JSON
namespace UnityDataTools.Analyzer.SQLite.Parsers.Models
{
public class BuildLayout
{
/// <summary>
/// Build Platform Addressables build is targeting
/// </summary>
public int BuildTarget;
/// <summary>
/// Hash of the build results
/// </summary>
public string BuildResultHash;
/// <summary>
/// If the build was a new build or an update for a previous build
/// </summary>
public int BuildType;
/// <summary>
/// DateTime at the start of building Addressables
/// </summary>
public string BuildStartTime;
/// <summary>
/// Time in seconds taken to build Addressables Content
/// </summary>
public double Duration;
/// <summary>
/// Null or Empty if the build completed successfully, else contains error causing the failure
/// </summary>
public string BuildError;
/// <summary>
/// Version of the Unity editor used to perform the build.
/// </summary>
public string UnityVersion;
/// <summary>
/// Version of the Addressables package used to perform the build.
/// </summary>
public string PackageVersion;
/// <summary>
/// Player build version for the build, this is a timestamp if PlayerVersionOverride is not set in the settings
/// </summary>
public string PlayerBuildVersion;
/// <summary>
/// Name of the build script to build
/// </summary>
public string BuildScript;
public References references;
}
public class References
{
public List<Reference> RefIds = new();
}
public class ReferenceId
{
public int rid;
}
public class Reference : ReferenceId
{
public ReferenceData data;
public ReferenceType type;
}
// This is a grab bag of data because Unity's built-in serialization system
// (used for MonoBehaviours, ScriptableObjects, etc.) does not support polymorphism.
// To maintain compatibility, all possible fields are listed in the ReferenceData class.
public class ReferenceData
{
public ReferenceId Bundle;
public ReferenceId File;
public AssetHash AssetHash;
public string AssetPath;
public string AddressableName;
public string AddressableGuid;
public ReferenceId[] ExternallyReferencedAssets;
public string GroupGuid;
public string Guid;
public string InternalId;
public ReferenceId[] InternalReferencedExplicitAssets;
public ReferenceId[] InternalReferencedOtherAssets;
public string[] Labels;
public int MainAssetType;
public long StreamedSize;
public long SerializedSize;
public string Name;
public string CRC;
// For BuildLayout/Bundle
public int AssetCount;
public int BuildStatus;
public ReferenceId[] BundleDependencies;
public string Compression;
public ReferenceId[] Dependencies;
public long DependencyFileSize;
public ReferenceId[] DependentBundles;
public ReferenceId[] ExpandedDependencies;
public long ExpandedDependencyFileSize;
public long FileSize;
public ReferenceId[] Files;
public ReferenceId Group;
public object Hash; // Complex object containing Hash and serializedVersion
public string InternalName;
public string LoadPath;
public string Provider;
public string ResultType;
// For BuildLayout/DataFromOtherAsset
public string AssetGuid;
public int ObjectCount;
public AssetObject[] Objects; // Array of object data
public ReferenceId[] ReferencingAssets;
// For BuildLayout/File
public ReferenceId[] Assets;
public BundleObjectInfo BundleObjectInfo; // Object with Size property
public ReferenceId[] ExternalReferences;
public int MonoScriptCount;
public long MonoScriptSize;
public ReferenceId[] OtherAssets;
public long PreloadInfoSize;
public ReferenceId[] SubFiles;
public string WriteResultFilename;
// For BuildLayout/Group
public ReferenceId[] Bundles;
public string PackingMode;
public ReferenceId[] Schemas;
// For BuildLayout/SchemaData
public SchemaDataPair[] SchemaDataPairs; // Array of Key-Value pairs
public string Type;
// For BuildLayout/SubFile
public bool IsSerializedFile;
public long Size;
}
public class ReferenceType
{
public string Asm;
public string Class;
public string NS;
}
public class AssetHash
{
public string Hash;
public string serializedVersion;
}
public class BundleObjectInfo
{
public long Size;
}
public class AssetObject
{
public int AssetType;
public string ComponentName;
public long LocalIdentifierInFile;
public string ObjectName;
public long SerializedSize;
public ObjectReference[] References; // Array of object references
public int StreamedSize;
}
public class ObjectReference
{
public int AssetId;
public int ObjectId;
}
public class SchemaDataPair
{
public string Key;
public string Value;
}
}