|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.IO; |
| 4 | +using System.Numerics; |
| 5 | + |
| 6 | +namespace UnityDataTools.Analyzer.Build |
| 7 | +{ |
| 8 | + public class BuildLayout |
| 9 | + { |
| 10 | + /// <summary> |
| 11 | + /// Build Platform Addressables build is targeting |
| 12 | + /// </summary> |
| 13 | + public int BuildTarget; |
| 14 | + |
| 15 | + /// <summary> |
| 16 | + /// Hash of the build results |
| 17 | + /// </summary> |
| 18 | + public string BuildResultHash; |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// If the build was a new build or an update for a previous build |
| 22 | + /// </summary> |
| 23 | + public int BuildType; |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// DateTime at the start of building Addressables |
| 27 | + /// </summary> |
| 28 | + public string BuildStartTime; |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// Time in seconds taken to build Addressables Content |
| 32 | + /// </summary> |
| 33 | + public double Duration; |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Null or Empty if the build completed successfully, else contains error causing the failure |
| 37 | + /// </summary> |
| 38 | + public string BuildError; |
| 39 | + |
| 40 | + /// <summary> |
| 41 | + /// Version of the Unity edtior used to perform the build. |
| 42 | + /// </summary> |
| 43 | + public string UnityVersion; |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// Version of the Addressables package used to perform the build. |
| 47 | + /// </summary> |
| 48 | + public string PackageVersion; |
| 49 | + |
| 50 | + /// <summary> |
| 51 | + /// Player build version for the build, this is a timestamp if PlayerVersionOverride is not set in the settings |
| 52 | + /// </summary> |
| 53 | + public string PlayerBuildVersion; |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// Name of the build script to build |
| 57 | + /// </summary> |
| 58 | + public string BuildScript; |
| 59 | + |
| 60 | + public References references; |
| 61 | + |
| 62 | + } |
| 63 | + |
| 64 | + public class References |
| 65 | + { |
| 66 | + public List<Reference> RefIds = new(); |
| 67 | + } |
| 68 | + |
| 69 | + public class ReferenceId |
| 70 | + { |
| 71 | + public int rid; |
| 72 | + } |
| 73 | + |
| 74 | + public class Reference : ReferenceId |
| 75 | + { |
| 76 | + public ReferenceData data; |
| 77 | + |
| 78 | + public ReferenceType type; |
| 79 | + } |
| 80 | + |
| 81 | + public class ReferenceData |
| 82 | + { |
| 83 | + public ReferenceId Bundle; |
| 84 | + public ReferenceId File; |
| 85 | + public AssetHash AssetHash; |
| 86 | + public string AssetPath; |
| 87 | + public string AddressableName; |
| 88 | + public string AddressableGuid; |
| 89 | + public ReferenceId[] ExternallyReferencedAssets; |
| 90 | + public string GroupGuid; |
| 91 | + public string Guid; |
| 92 | + public string InternalId; |
| 93 | + public ReferenceId[] InternalReferencedExplicitAssets; |
| 94 | + public ReferenceId[] InternalReferencedOtherAssets; |
| 95 | + public string[] Labels; |
| 96 | + public int MainAssetType; |
| 97 | + public int StreamedSize; |
| 98 | + public int SerializedSize; |
| 99 | + public string Name; |
| 100 | + public string CRC; |
| 101 | + |
| 102 | + // For BuildLayout/Bundle |
| 103 | + public int AssetCount; |
| 104 | + public int BuildStatus; |
| 105 | + public ReferenceId[] BundleDependencies; |
| 106 | + public string Compression; |
| 107 | + public ReferenceId[] Dependencies; |
| 108 | + public int DependencyFileSize; |
| 109 | + public ReferenceId[] DependentBundles; |
| 110 | + public ReferenceId[] ExpandedDependencies; |
| 111 | + public int ExpandedDependencyFileSize; |
| 112 | + public int FileSize; |
| 113 | + public ReferenceId[] Files; |
| 114 | + public ReferenceId Group; |
| 115 | + public object Hash; // Complex object containing Hash and serializedVersion |
| 116 | + public string InternalName; |
| 117 | + public string LoadPath; |
| 118 | + public string Provider; |
| 119 | + public string ResultType; |
| 120 | + |
| 121 | + // For BuildLayout/DataFromOtherAsset |
| 122 | + public string AssetGuid; |
| 123 | + public int ObjectCount; |
| 124 | + public AssetObject[] Objects; // Array of object data |
| 125 | + public ReferenceId[] ReferencingAssets; |
| 126 | + |
| 127 | + // For BuildLayout/File |
| 128 | + public ReferenceId[] Assets; |
| 129 | + public BundleObjectInfo BundleObjectInfo; // Object with Size property |
| 130 | + public ReferenceId[] ExternalReferences; |
| 131 | + public int MonoScriptCount; |
| 132 | + public int MonoScriptSize; |
| 133 | + public ReferenceId[] OtherAssets; |
| 134 | + public int PreloadInfoSize; |
| 135 | + public ReferenceId[] SubFiles; |
| 136 | + public string WriteResultFilename; |
| 137 | + |
| 138 | + // For BuildLayout/Group |
| 139 | + public ReferenceId[] Bundles; |
| 140 | + public string PackingMode; |
| 141 | + public ReferenceId[] Schemas; |
| 142 | + |
| 143 | + // For BuildLayout/SchemaData |
| 144 | + public SchemaDataPair[] SchemaDataPairs; // Array of Key-Value pairs |
| 145 | + public string Type; |
| 146 | + |
| 147 | + // For BuildLayout/SubFile |
| 148 | + public bool IsSerializedFile; |
| 149 | + public int Size; |
| 150 | + } |
| 151 | + |
| 152 | + public class ReferenceType |
| 153 | + { |
| 154 | + public string Asm; |
| 155 | + public string Class; |
| 156 | + public string NS; |
| 157 | + } |
| 158 | + |
| 159 | + public class AssetHash |
| 160 | + { |
| 161 | + public string Hash; |
| 162 | + public string serializedVersion; |
| 163 | + } |
| 164 | + |
| 165 | + public class BundleObjectInfo |
| 166 | + { |
| 167 | + public int Size; |
| 168 | + } |
| 169 | + |
| 170 | + public class AssetObject |
| 171 | + { |
| 172 | + public int AssetType; |
| 173 | + public string ComponentName; |
| 174 | + public long LocalIdentifierInFile; |
| 175 | + public string ObjectName; |
| 176 | + public int SerializedSize; |
| 177 | + public ObjectReference[] References; // Array of object references |
| 178 | + public int StreamedSize; |
| 179 | + } |
| 180 | + |
| 181 | + public class ObjectReference |
| 182 | + { |
| 183 | + public int AssetId; |
| 184 | + public int ObjectId; |
| 185 | + } |
| 186 | + |
| 187 | + public class SchemaDataPair |
| 188 | + { |
| 189 | + public string Key; |
| 190 | + public string Value; |
| 191 | + } |
| 192 | +} |
0 commit comments