@cobbfan9/asset-studio-web 2.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,69 @@
1
+ // src/Util/logger.ts
2
+ var LOG_LEVELS = {
3
+ trace: 0,
4
+ debug: 1,
5
+ info: 2,
6
+ warn: 3,
7
+ error: 4
8
+ };
9
+ var Logger = class _Logger {
10
+ level;
11
+ prefix;
12
+ constructor(options = {}) {
13
+ this.level = options.level ?? "info";
14
+ this.prefix = options.prefix ?? "AssetStudioWeb";
15
+ }
16
+ log(level, message, ...args) {
17
+ if (LOG_LEVELS[level] < LOG_LEVELS[this.level]) {
18
+ return;
19
+ }
20
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
21
+ const formatted = `[${timestamp}] [${this.prefix}] [${level.toUpperCase()}]`;
22
+ switch (level) {
23
+ case "debug":
24
+ console.debug(formatted, message, ...args);
25
+ break;
26
+ case "info":
27
+ console.info(formatted, message, ...args);
28
+ break;
29
+ case "warn":
30
+ console.warn(formatted, message, ...args);
31
+ break;
32
+ case "error":
33
+ console.error(formatted, message, ...args);
34
+ break;
35
+ }
36
+ }
37
+ debug(message, ...args) {
38
+ this.log("debug", message, ...args);
39
+ }
40
+ info(message, ...args) {
41
+ this.log("info", message, ...args);
42
+ }
43
+ warn(message, ...args) {
44
+ this.log("warn", message, ...args);
45
+ }
46
+ error(message, ...args) {
47
+ this.log("error", message, ...args);
48
+ }
49
+ setLevel(level) {
50
+ this.level = level;
51
+ }
52
+ child(prefix) {
53
+ return new _Logger({
54
+ level: this.level,
55
+ prefix: `${this.prefix}:${prefix}`
56
+ });
57
+ }
58
+ trace(value) {
59
+ if (LOG_LEVELS.trace < LOG_LEVELS[this.level]) return;
60
+ console.log(value);
61
+ }
62
+ };
63
+
64
+ // src/global.ts
65
+ var logger = new Logger();
66
+
1
67
  // src/Util/EndianBinaryReader.ts
2
68
  var EndianBinaryReader = class _EndianBinaryReader {
3
69
  view;
@@ -671,404 +737,6 @@ function Uint8ArrayCompare(a, b) {
671
737
  return true;
672
738
  }
673
739
 
674
- // src/Enums/ClassIDType.ts
675
- var ClassIDType = /* @__PURE__ */ ((ClassIDType3) => {
676
- ClassIDType3[ClassIDType3["UnknownType"] = -1] = "UnknownType";
677
- ClassIDType3[ClassIDType3["Object"] = 0] = "Object";
678
- ClassIDType3[ClassIDType3["GameObject"] = 1] = "GameObject";
679
- ClassIDType3[ClassIDType3["Component"] = 2] = "Component";
680
- ClassIDType3[ClassIDType3["LevelGameManager"] = 3] = "LevelGameManager";
681
- ClassIDType3[ClassIDType3["Transform"] = 4] = "Transform";
682
- ClassIDType3[ClassIDType3["TimeManager"] = 5] = "TimeManager";
683
- ClassIDType3[ClassIDType3["GlobalGameManager"] = 6] = "GlobalGameManager";
684
- ClassIDType3[ClassIDType3["Behaviour"] = 8] = "Behaviour";
685
- ClassIDType3[ClassIDType3["GameManager"] = 9] = "GameManager";
686
- ClassIDType3[ClassIDType3["AudioManager"] = 11] = "AudioManager";
687
- ClassIDType3[ClassIDType3["ParticleAnimator"] = 12] = "ParticleAnimator";
688
- ClassIDType3[ClassIDType3["InputManager"] = 13] = "InputManager";
689
- ClassIDType3[ClassIDType3["EllipsoidParticleEmitter"] = 15] = "EllipsoidParticleEmitter";
690
- ClassIDType3[ClassIDType3["Pipeline"] = 17] = "Pipeline";
691
- ClassIDType3[ClassIDType3["EditorExtension"] = 18] = "EditorExtension";
692
- ClassIDType3[ClassIDType3["Physics2DSettings"] = 19] = "Physics2DSettings";
693
- ClassIDType3[ClassIDType3["Camera"] = 20] = "Camera";
694
- ClassIDType3[ClassIDType3["Material"] = 21] = "Material";
695
- ClassIDType3[ClassIDType3["MeshRenderer"] = 23] = "MeshRenderer";
696
- ClassIDType3[ClassIDType3["Renderer"] = 25] = "Renderer";
697
- ClassIDType3[ClassIDType3["ParticleRenderer"] = 26] = "ParticleRenderer";
698
- ClassIDType3[ClassIDType3["Texture"] = 27] = "Texture";
699
- ClassIDType3[ClassIDType3["Texture2D"] = 28] = "Texture2D";
700
- ClassIDType3[ClassIDType3["OcclusionCullingSettings"] = 29] = "OcclusionCullingSettings";
701
- ClassIDType3[ClassIDType3["GraphicsSettings"] = 30] = "GraphicsSettings";
702
- ClassIDType3[ClassIDType3["MeshFilter"] = 33] = "MeshFilter";
703
- ClassIDType3[ClassIDType3["OcclusionPortal"] = 41] = "OcclusionPortal";
704
- ClassIDType3[ClassIDType3["Mesh"] = 43] = "Mesh";
705
- ClassIDType3[ClassIDType3["Skybox"] = 45] = "Skybox";
706
- ClassIDType3[ClassIDType3["QualitySettings"] = 47] = "QualitySettings";
707
- ClassIDType3[ClassIDType3["Shader"] = 48] = "Shader";
708
- ClassIDType3[ClassIDType3["TextAsset"] = 49] = "TextAsset";
709
- ClassIDType3[ClassIDType3["Rigidbody2D"] = 50] = "Rigidbody2D";
710
- ClassIDType3[ClassIDType3["Physics2DManager"] = 51] = "Physics2DManager";
711
- ClassIDType3[ClassIDType3["Collider2D"] = 53] = "Collider2D";
712
- ClassIDType3[ClassIDType3["Rigidbody"] = 54] = "Rigidbody";
713
- ClassIDType3[ClassIDType3["PhysicsManager"] = 55] = "PhysicsManager";
714
- ClassIDType3[ClassIDType3["Collider"] = 56] = "Collider";
715
- ClassIDType3[ClassIDType3["Joint"] = 57] = "Joint";
716
- ClassIDType3[ClassIDType3["CircleCollider2D"] = 58] = "CircleCollider2D";
717
- ClassIDType3[ClassIDType3["HingeJoint"] = 59] = "HingeJoint";
718
- ClassIDType3[ClassIDType3["PolygonCollider2D"] = 60] = "PolygonCollider2D";
719
- ClassIDType3[ClassIDType3["BoxCollider2D"] = 61] = "BoxCollider2D";
720
- ClassIDType3[ClassIDType3["PhysicsMaterial2D"] = 62] = "PhysicsMaterial2D";
721
- ClassIDType3[ClassIDType3["MeshCollider"] = 64] = "MeshCollider";
722
- ClassIDType3[ClassIDType3["BoxCollider"] = 65] = "BoxCollider";
723
- ClassIDType3[ClassIDType3["CompositeCollider2D"] = 66] = "CompositeCollider2D";
724
- ClassIDType3[ClassIDType3["EdgeCollider2D"] = 68] = "EdgeCollider2D";
725
- ClassIDType3[ClassIDType3["CapsuleCollider2D"] = 70] = "CapsuleCollider2D";
726
- ClassIDType3[ClassIDType3["ComputeShader"] = 72] = "ComputeShader";
727
- ClassIDType3[ClassIDType3["AnimationClip"] = 74] = "AnimationClip";
728
- ClassIDType3[ClassIDType3["ConstantForce"] = 75] = "ConstantForce";
729
- ClassIDType3[ClassIDType3["WorldParticleCollider"] = 76] = "WorldParticleCollider";
730
- ClassIDType3[ClassIDType3["TagManager"] = 78] = "TagManager";
731
- ClassIDType3[ClassIDType3["AudioListener"] = 81] = "AudioListener";
732
- ClassIDType3[ClassIDType3["AudioSource"] = 82] = "AudioSource";
733
- ClassIDType3[ClassIDType3["AudioClip"] = 83] = "AudioClip";
734
- ClassIDType3[ClassIDType3["RenderTexture"] = 84] = "RenderTexture";
735
- ClassIDType3[ClassIDType3["CustomRenderTexture"] = 86] = "CustomRenderTexture";
736
- ClassIDType3[ClassIDType3["MeshParticleEmitter"] = 87] = "MeshParticleEmitter";
737
- ClassIDType3[ClassIDType3["ParticleEmitter"] = 88] = "ParticleEmitter";
738
- ClassIDType3[ClassIDType3["Cubemap"] = 89] = "Cubemap";
739
- ClassIDType3[ClassIDType3["Avatar"] = 90] = "Avatar";
740
- ClassIDType3[ClassIDType3["AnimatorController"] = 91] = "AnimatorController";
741
- ClassIDType3[ClassIDType3["GUILayer"] = 92] = "GUILayer";
742
- ClassIDType3[ClassIDType3["RuntimeAnimatorController"] = 93] = "RuntimeAnimatorController";
743
- ClassIDType3[ClassIDType3["ScriptMapper"] = 94] = "ScriptMapper";
744
- ClassIDType3[ClassIDType3["Animator"] = 95] = "Animator";
745
- ClassIDType3[ClassIDType3["TrailRenderer"] = 96] = "TrailRenderer";
746
- ClassIDType3[ClassIDType3["DelayedCallManager"] = 98] = "DelayedCallManager";
747
- ClassIDType3[ClassIDType3["TextMesh"] = 102] = "TextMesh";
748
- ClassIDType3[ClassIDType3["RenderSettings"] = 104] = "RenderSettings";
749
- ClassIDType3[ClassIDType3["Light"] = 108] = "Light";
750
- ClassIDType3[ClassIDType3["CGProgram"] = 109] = "CGProgram";
751
- ClassIDType3[ClassIDType3["BaseAnimationTrack"] = 110] = "BaseAnimationTrack";
752
- ClassIDType3[ClassIDType3["Animation"] = 111] = "Animation";
753
- ClassIDType3[ClassIDType3["MonoBehaviour"] = 114] = "MonoBehaviour";
754
- ClassIDType3[ClassIDType3["MonoScript"] = 115] = "MonoScript";
755
- ClassIDType3[ClassIDType3["MonoManager"] = 116] = "MonoManager";
756
- ClassIDType3[ClassIDType3["Texture3D"] = 117] = "Texture3D";
757
- ClassIDType3[ClassIDType3["NewAnimationTrack"] = 118] = "NewAnimationTrack";
758
- ClassIDType3[ClassIDType3["Projector"] = 119] = "Projector";
759
- ClassIDType3[ClassIDType3["LineRenderer"] = 120] = "LineRenderer";
760
- ClassIDType3[ClassIDType3["Flare"] = 121] = "Flare";
761
- ClassIDType3[ClassIDType3["Halo"] = 122] = "Halo";
762
- ClassIDType3[ClassIDType3["LensFlare"] = 123] = "LensFlare";
763
- ClassIDType3[ClassIDType3["FlareLayer"] = 124] = "FlareLayer";
764
- ClassIDType3[ClassIDType3["HaloLayer"] = 125] = "HaloLayer";
765
- ClassIDType3[ClassIDType3["NavMeshAreas"] = 126] = "NavMeshAreas";
766
- ClassIDType3[ClassIDType3["NavMeshProjectSettings"] = 126] = "NavMeshProjectSettings";
767
- ClassIDType3[ClassIDType3["HaloManager"] = 127] = "HaloManager";
768
- ClassIDType3[ClassIDType3["Font"] = 128] = "Font";
769
- ClassIDType3[ClassIDType3["PlayerSettings"] = 129] = "PlayerSettings";
770
- ClassIDType3[ClassIDType3["NamedObject"] = 130] = "NamedObject";
771
- ClassIDType3[ClassIDType3["GUITexture"] = 131] = "GUITexture";
772
- ClassIDType3[ClassIDType3["GUIText"] = 132] = "GUIText";
773
- ClassIDType3[ClassIDType3["GUIElement"] = 133] = "GUIElement";
774
- ClassIDType3[ClassIDType3["PhysicMaterial"] = 134] = "PhysicMaterial";
775
- ClassIDType3[ClassIDType3["SphereCollider"] = 135] = "SphereCollider";
776
- ClassIDType3[ClassIDType3["CapsuleCollider"] = 136] = "CapsuleCollider";
777
- ClassIDType3[ClassIDType3["SkinnedMeshRenderer"] = 137] = "SkinnedMeshRenderer";
778
- ClassIDType3[ClassIDType3["FixedJoint"] = 138] = "FixedJoint";
779
- ClassIDType3[ClassIDType3["RaycastCollider"] = 140] = "RaycastCollider";
780
- ClassIDType3[ClassIDType3["BuildSettings"] = 141] = "BuildSettings";
781
- ClassIDType3[ClassIDType3["AssetBundle"] = 142] = "AssetBundle";
782
- ClassIDType3[ClassIDType3["CharacterController"] = 143] = "CharacterController";
783
- ClassIDType3[ClassIDType3["CharacterJoint"] = 144] = "CharacterJoint";
784
- ClassIDType3[ClassIDType3["SpringJoint"] = 145] = "SpringJoint";
785
- ClassIDType3[ClassIDType3["WheelCollider"] = 146] = "WheelCollider";
786
- ClassIDType3[ClassIDType3["ResourceManager"] = 147] = "ResourceManager";
787
- ClassIDType3[ClassIDType3["NetworkView"] = 148] = "NetworkView";
788
- ClassIDType3[ClassIDType3["NetworkManager"] = 149] = "NetworkManager";
789
- ClassIDType3[ClassIDType3["PreloadData"] = 150] = "PreloadData";
790
- ClassIDType3[ClassIDType3["MovieTexture"] = 152] = "MovieTexture";
791
- ClassIDType3[ClassIDType3["ConfigurableJoint"] = 153] = "ConfigurableJoint";
792
- ClassIDType3[ClassIDType3["TerrainCollider"] = 154] = "TerrainCollider";
793
- ClassIDType3[ClassIDType3["MasterServerInterface"] = 155] = "MasterServerInterface";
794
- ClassIDType3[ClassIDType3["TerrainData"] = 156] = "TerrainData";
795
- ClassIDType3[ClassIDType3["LightmapSettings"] = 157] = "LightmapSettings";
796
- ClassIDType3[ClassIDType3["WebCamTexture"] = 158] = "WebCamTexture";
797
- ClassIDType3[ClassIDType3["EditorSettings"] = 159] = "EditorSettings";
798
- ClassIDType3[ClassIDType3["InteractiveCloth"] = 160] = "InteractiveCloth";
799
- ClassIDType3[ClassIDType3["ClothRenderer"] = 161] = "ClothRenderer";
800
- ClassIDType3[ClassIDType3["EditorUserSettings"] = 162] = "EditorUserSettings";
801
- ClassIDType3[ClassIDType3["SkinnedCloth"] = 163] = "SkinnedCloth";
802
- ClassIDType3[ClassIDType3["AudioReverbFilter"] = 164] = "AudioReverbFilter";
803
- ClassIDType3[ClassIDType3["AudioHighPassFilter"] = 165] = "AudioHighPassFilter";
804
- ClassIDType3[ClassIDType3["AudioChorusFilter"] = 166] = "AudioChorusFilter";
805
- ClassIDType3[ClassIDType3["AudioReverbZone"] = 167] = "AudioReverbZone";
806
- ClassIDType3[ClassIDType3["AudioEchoFilter"] = 168] = "AudioEchoFilter";
807
- ClassIDType3[ClassIDType3["AudioLowPassFilter"] = 169] = "AudioLowPassFilter";
808
- ClassIDType3[ClassIDType3["AudioDistortionFilter"] = 170] = "AudioDistortionFilter";
809
- ClassIDType3[ClassIDType3["SparseTexture"] = 171] = "SparseTexture";
810
- ClassIDType3[ClassIDType3["AudioBehaviour"] = 180] = "AudioBehaviour";
811
- ClassIDType3[ClassIDType3["AudioFilter"] = 181] = "AudioFilter";
812
- ClassIDType3[ClassIDType3["WindZone"] = 182] = "WindZone";
813
- ClassIDType3[ClassIDType3["Cloth"] = 183] = "Cloth";
814
- ClassIDType3[ClassIDType3["SubstanceArchive"] = 184] = "SubstanceArchive";
815
- ClassIDType3[ClassIDType3["ProceduralMaterial"] = 185] = "ProceduralMaterial";
816
- ClassIDType3[ClassIDType3["ProceduralTexture"] = 186] = "ProceduralTexture";
817
- ClassIDType3[ClassIDType3["Texture2DArray"] = 187] = "Texture2DArray";
818
- ClassIDType3[ClassIDType3["Texture2DArrayImage"] = -187] = "Texture2DArrayImage";
819
- ClassIDType3[ClassIDType3["CubemapArray"] = 188] = "CubemapArray";
820
- ClassIDType3[ClassIDType3["OffMeshLink"] = 191] = "OffMeshLink";
821
- ClassIDType3[ClassIDType3["OcclusionArea"] = 192] = "OcclusionArea";
822
- ClassIDType3[ClassIDType3["Tree"] = 193] = "Tree";
823
- ClassIDType3[ClassIDType3["NavMeshObsolete"] = 194] = "NavMeshObsolete";
824
- ClassIDType3[ClassIDType3["NavMeshAgent"] = 195] = "NavMeshAgent";
825
- ClassIDType3[ClassIDType3["NavMeshSettings"] = 196] = "NavMeshSettings";
826
- ClassIDType3[ClassIDType3["LightProbesLegacy"] = 197] = "LightProbesLegacy";
827
- ClassIDType3[ClassIDType3["ParticleSystem"] = 198] = "ParticleSystem";
828
- ClassIDType3[ClassIDType3["ParticleSystemRenderer"] = 199] = "ParticleSystemRenderer";
829
- ClassIDType3[ClassIDType3["ShaderVariantCollection"] = 200] = "ShaderVariantCollection";
830
- ClassIDType3[ClassIDType3["LODGroup"] = 205] = "LODGroup";
831
- ClassIDType3[ClassIDType3["BlendTree"] = 206] = "BlendTree";
832
- ClassIDType3[ClassIDType3["Motion"] = 207] = "Motion";
833
- ClassIDType3[ClassIDType3["NavMeshObstacle"] = 208] = "NavMeshObstacle";
834
- ClassIDType3[ClassIDType3["SortingGroup"] = 210] = "SortingGroup";
835
- ClassIDType3[ClassIDType3["SpriteRenderer"] = 212] = "SpriteRenderer";
836
- ClassIDType3[ClassIDType3["Sprite"] = 213] = "Sprite";
837
- ClassIDType3[ClassIDType3["CachedSpriteAtlas"] = 214] = "CachedSpriteAtlas";
838
- ClassIDType3[ClassIDType3["ReflectionProbe"] = 215] = "ReflectionProbe";
839
- ClassIDType3[ClassIDType3["ReflectionProbes"] = 216] = "ReflectionProbes";
840
- ClassIDType3[ClassIDType3["Terrain"] = 218] = "Terrain";
841
- ClassIDType3[ClassIDType3["LightProbeGroup"] = 220] = "LightProbeGroup";
842
- ClassIDType3[ClassIDType3["AnimatorOverrideController"] = 221] = "AnimatorOverrideController";
843
- ClassIDType3[ClassIDType3["CanvasRenderer"] = 222] = "CanvasRenderer";
844
- ClassIDType3[ClassIDType3["Canvas"] = 223] = "Canvas";
845
- ClassIDType3[ClassIDType3["RectTransform"] = 224] = "RectTransform";
846
- ClassIDType3[ClassIDType3["CanvasGroup"] = 225] = "CanvasGroup";
847
- ClassIDType3[ClassIDType3["BillboardAsset"] = 226] = "BillboardAsset";
848
- ClassIDType3[ClassIDType3["BillboardRenderer"] = 227] = "BillboardRenderer";
849
- ClassIDType3[ClassIDType3["SpeedTreeWindAsset"] = 228] = "SpeedTreeWindAsset";
850
- ClassIDType3[ClassIDType3["AnchoredJoint2D"] = 229] = "AnchoredJoint2D";
851
- ClassIDType3[ClassIDType3["Joint2D"] = 230] = "Joint2D";
852
- ClassIDType3[ClassIDType3["SpringJoint2D"] = 231] = "SpringJoint2D";
853
- ClassIDType3[ClassIDType3["DistanceJoint2D"] = 232] = "DistanceJoint2D";
854
- ClassIDType3[ClassIDType3["HingeJoint2D"] = 233] = "HingeJoint2D";
855
- ClassIDType3[ClassIDType3["SliderJoint2D"] = 234] = "SliderJoint2D";
856
- ClassIDType3[ClassIDType3["WheelJoint2D"] = 235] = "WheelJoint2D";
857
- ClassIDType3[ClassIDType3["ClusterInputManager"] = 236] = "ClusterInputManager";
858
- ClassIDType3[ClassIDType3["BaseVideoTexture"] = 237] = "BaseVideoTexture";
859
- ClassIDType3[ClassIDType3["NavMeshData"] = 238] = "NavMeshData";
860
- ClassIDType3[ClassIDType3["AudioMixer"] = 240] = "AudioMixer";
861
- ClassIDType3[ClassIDType3["AudioMixerController"] = 241] = "AudioMixerController";
862
- ClassIDType3[ClassIDType3["AudioMixerGroupController"] = 243] = "AudioMixerGroupController";
863
- ClassIDType3[ClassIDType3["AudioMixerEffectController"] = 244] = "AudioMixerEffectController";
864
- ClassIDType3[ClassIDType3["AudioMixerSnapshotController"] = 245] = "AudioMixerSnapshotController";
865
- ClassIDType3[ClassIDType3["PhysicsUpdateBehaviour2D"] = 246] = "PhysicsUpdateBehaviour2D";
866
- ClassIDType3[ClassIDType3["ConstantForce2D"] = 247] = "ConstantForce2D";
867
- ClassIDType3[ClassIDType3["Effector2D"] = 248] = "Effector2D";
868
- ClassIDType3[ClassIDType3["AreaEffector2D"] = 249] = "AreaEffector2D";
869
- ClassIDType3[ClassIDType3["PointEffector2D"] = 250] = "PointEffector2D";
870
- ClassIDType3[ClassIDType3["PlatformEffector2D"] = 251] = "PlatformEffector2D";
871
- ClassIDType3[ClassIDType3["SurfaceEffector2D"] = 252] = "SurfaceEffector2D";
872
- ClassIDType3[ClassIDType3["BuoyancyEffector2D"] = 253] = "BuoyancyEffector2D";
873
- ClassIDType3[ClassIDType3["RelativeJoint2D"] = 254] = "RelativeJoint2D";
874
- ClassIDType3[ClassIDType3["FixedJoint2D"] = 255] = "FixedJoint2D";
875
- ClassIDType3[ClassIDType3["FrictionJoint2D"] = 256] = "FrictionJoint2D";
876
- ClassIDType3[ClassIDType3["TargetJoint2D"] = 257] = "TargetJoint2D";
877
- ClassIDType3[ClassIDType3["LightProbes"] = 258] = "LightProbes";
878
- ClassIDType3[ClassIDType3["LightProbeProxyVolume"] = 259] = "LightProbeProxyVolume";
879
- ClassIDType3[ClassIDType3["SampleClip"] = 271] = "SampleClip";
880
- ClassIDType3[ClassIDType3["AudioMixerSnapshot"] = 272] = "AudioMixerSnapshot";
881
- ClassIDType3[ClassIDType3["AudioMixerGroup"] = 273] = "AudioMixerGroup";
882
- ClassIDType3[ClassIDType3["NScreenBridge"] = 280] = "NScreenBridge";
883
- ClassIDType3[ClassIDType3["AssetBundleManifest"] = 290] = "AssetBundleManifest";
884
- ClassIDType3[ClassIDType3["UnityAdsManager"] = 292] = "UnityAdsManager";
885
- ClassIDType3[ClassIDType3["RuntimeInitializeOnLoadManager"] = 300] = "RuntimeInitializeOnLoadManager";
886
- ClassIDType3[ClassIDType3["CloudWebServicesManager"] = 301] = "CloudWebServicesManager";
887
- ClassIDType3[ClassIDType3["UnityAnalyticsManager"] = 303] = "UnityAnalyticsManager";
888
- ClassIDType3[ClassIDType3["CrashReportManager"] = 304] = "CrashReportManager";
889
- ClassIDType3[ClassIDType3["PerformanceReportingManager"] = 305] = "PerformanceReportingManager";
890
- ClassIDType3[ClassIDType3["UnityConnectSettings"] = 310] = "UnityConnectSettings";
891
- ClassIDType3[ClassIDType3["AvatarMask"] = 319] = "AvatarMask";
892
- ClassIDType3[ClassIDType3["PlayableDirector"] = 320] = "PlayableDirector";
893
- ClassIDType3[ClassIDType3["VideoPlayer"] = 328] = "VideoPlayer";
894
- ClassIDType3[ClassIDType3["VideoClip"] = 329] = "VideoClip";
895
- ClassIDType3[ClassIDType3["ParticleSystemForceField"] = 330] = "ParticleSystemForceField";
896
- ClassIDType3[ClassIDType3["SpriteMask"] = 331] = "SpriteMask";
897
- ClassIDType3[ClassIDType3["WorldAnchor"] = 362] = "WorldAnchor";
898
- ClassIDType3[ClassIDType3["OcclusionCullingData"] = 363] = "OcclusionCullingData";
899
- ClassIDType3[ClassIDType3["SmallestEditorClassID"] = 1e3] = "SmallestEditorClassID";
900
- ClassIDType3[ClassIDType3["PrefabInstance"] = 1001] = "PrefabInstance";
901
- ClassIDType3[ClassIDType3["EditorExtensionImpl"] = 1002] = "EditorExtensionImpl";
902
- ClassIDType3[ClassIDType3["AssetImporter"] = 1003] = "AssetImporter";
903
- ClassIDType3[ClassIDType3["AssetDatabaseV1"] = 1004] = "AssetDatabaseV1";
904
- ClassIDType3[ClassIDType3["Mesh3DSImporter"] = 1005] = "Mesh3DSImporter";
905
- ClassIDType3[ClassIDType3["TextureImporter"] = 1006] = "TextureImporter";
906
- ClassIDType3[ClassIDType3["ShaderImporter"] = 1007] = "ShaderImporter";
907
- ClassIDType3[ClassIDType3["ComputeShaderImporter"] = 1008] = "ComputeShaderImporter";
908
- ClassIDType3[ClassIDType3["AudioImporter"] = 1020] = "AudioImporter";
909
- ClassIDType3[ClassIDType3["HierarchyState"] = 1026] = "HierarchyState";
910
- ClassIDType3[ClassIDType3["GUIDSerializer"] = 1027] = "GUIDSerializer";
911
- ClassIDType3[ClassIDType3["AssetMetaData"] = 1028] = "AssetMetaData";
912
- ClassIDType3[ClassIDType3["DefaultAsset"] = 1029] = "DefaultAsset";
913
- ClassIDType3[ClassIDType3["DefaultImporter"] = 1030] = "DefaultImporter";
914
- ClassIDType3[ClassIDType3["TextScriptImporter"] = 1031] = "TextScriptImporter";
915
- ClassIDType3[ClassIDType3["SceneAsset"] = 1032] = "SceneAsset";
916
- ClassIDType3[ClassIDType3["NativeFormatImporter"] = 1034] = "NativeFormatImporter";
917
- ClassIDType3[ClassIDType3["MonoImporter"] = 1035] = "MonoImporter";
918
- ClassIDType3[ClassIDType3["AssetServerCache"] = 1037] = "AssetServerCache";
919
- ClassIDType3[ClassIDType3["LibraryAssetImporter"] = 1038] = "LibraryAssetImporter";
920
- ClassIDType3[ClassIDType3["ModelImporter"] = 1040] = "ModelImporter";
921
- ClassIDType3[ClassIDType3["FBXImporter"] = 1041] = "FBXImporter";
922
- ClassIDType3[ClassIDType3["TrueTypeFontImporter"] = 1042] = "TrueTypeFontImporter";
923
- ClassIDType3[ClassIDType3["MovieImporter"] = 1044] = "MovieImporter";
924
- ClassIDType3[ClassIDType3["EditorBuildSettings"] = 1045] = "EditorBuildSettings";
925
- ClassIDType3[ClassIDType3["DDSImporter"] = 1046] = "DDSImporter";
926
- ClassIDType3[ClassIDType3["InspectorExpandedState"] = 1048] = "InspectorExpandedState";
927
- ClassIDType3[ClassIDType3["AnnotationManager"] = 1049] = "AnnotationManager";
928
- ClassIDType3[ClassIDType3["PluginImporter"] = 1050] = "PluginImporter";
929
- ClassIDType3[ClassIDType3["EditorUserBuildSettings"] = 1051] = "EditorUserBuildSettings";
930
- ClassIDType3[ClassIDType3["PVRImporter"] = 1052] = "PVRImporter";
931
- ClassIDType3[ClassIDType3["ASTCImporter"] = 1053] = "ASTCImporter";
932
- ClassIDType3[ClassIDType3["KTXImporter"] = 1054] = "KTXImporter";
933
- ClassIDType3[ClassIDType3["IHVImageFormatImporter"] = 1055] = "IHVImageFormatImporter";
934
- ClassIDType3[ClassIDType3["AnimatorStateTransition"] = 1101] = "AnimatorStateTransition";
935
- ClassIDType3[ClassIDType3["AnimatorState"] = 1102] = "AnimatorState";
936
- ClassIDType3[ClassIDType3["HumanTemplate"] = 1105] = "HumanTemplate";
937
- ClassIDType3[ClassIDType3["AnimatorStateMachine"] = 1107] = "AnimatorStateMachine";
938
- ClassIDType3[ClassIDType3["PreviewAnimationClip"] = 1108] = "PreviewAnimationClip";
939
- ClassIDType3[ClassIDType3["AnimatorTransition"] = 1109] = "AnimatorTransition";
940
- ClassIDType3[ClassIDType3["SpeedTreeImporter"] = 1110] = "SpeedTreeImporter";
941
- ClassIDType3[ClassIDType3["AnimatorTransitionBase"] = 1111] = "AnimatorTransitionBase";
942
- ClassIDType3[ClassIDType3["SubstanceImporter"] = 1112] = "SubstanceImporter";
943
- ClassIDType3[ClassIDType3["LightmapParameters"] = 1113] = "LightmapParameters";
944
- ClassIDType3[ClassIDType3["LightingDataAsset"] = 1120] = "LightingDataAsset";
945
- ClassIDType3[ClassIDType3["GISRaster"] = 1121] = "GISRaster";
946
- ClassIDType3[ClassIDType3["GISRasterImporter"] = 1122] = "GISRasterImporter";
947
- ClassIDType3[ClassIDType3["CadImporter"] = 1123] = "CadImporter";
948
- ClassIDType3[ClassIDType3["SketchUpImporter"] = 1124] = "SketchUpImporter";
949
- ClassIDType3[ClassIDType3["BuildReport"] = 1125] = "BuildReport";
950
- ClassIDType3[ClassIDType3["PackedAssets"] = 1126] = "PackedAssets";
951
- ClassIDType3[ClassIDType3["VideoClipImporter"] = 1127] = "VideoClipImporter";
952
- ClassIDType3[ClassIDType3["ActivationLogComponent"] = 2e3] = "ActivationLogComponent";
953
- ClassIDType3[ClassIDType3["MonoObject"] = 100003] = "MonoObject";
954
- ClassIDType3[ClassIDType3["Collision"] = 100004] = "Collision";
955
- ClassIDType3[ClassIDType3["Vector3f"] = 100005] = "Vector3f";
956
- ClassIDType3[ClassIDType3["RootMotionData"] = 100006] = "RootMotionData";
957
- ClassIDType3[ClassIDType3["Collision2D"] = 100007] = "Collision2D";
958
- ClassIDType3[ClassIDType3["AudioMixerLiveUpdateFloat"] = 100008] = "AudioMixerLiveUpdateFloat";
959
- ClassIDType3[ClassIDType3["AudioMixerLiveUpdateBool"] = 100009] = "AudioMixerLiveUpdateBool";
960
- ClassIDType3[ClassIDType3["Polygon2D"] = 100010] = "Polygon2D";
961
- ClassIDType3[ClassIDType3["TilemapCollider2D"] = 19719996] = "TilemapCollider2D";
962
- ClassIDType3[ClassIDType3["AssetImporterLog"] = 41386430] = "AssetImporterLog";
963
- ClassIDType3[ClassIDType3["GraphicsStateCollection"] = 55640938] = "GraphicsStateCollection";
964
- ClassIDType3[ClassIDType3["VFXRenderer"] = 73398921] = "VFXRenderer";
965
- ClassIDType3[ClassIDType3["SerializableManagedRefTestClass"] = 76251197] = "SerializableManagedRefTestClass";
966
- ClassIDType3[ClassIDType3["Grid"] = 156049354] = "Grid";
967
- ClassIDType3[ClassIDType3["ScenesUsingAssets"] = 156483287] = "ScenesUsingAssets";
968
- ClassIDType3[ClassIDType3["ArticulationBody"] = 171741748] = "ArticulationBody";
969
- ClassIDType3[ClassIDType3["Preset"] = 181963792] = "Preset";
970
- ClassIDType3[ClassIDType3["EmptyObject"] = 277625683] = "EmptyObject";
971
- ClassIDType3[ClassIDType3["IConstraint"] = 285090594] = "IConstraint";
972
- ClassIDType3[ClassIDType3["TestObjectWithSpecialLayoutOne"] = 293259124] = "TestObjectWithSpecialLayoutOne";
973
- ClassIDType3[ClassIDType3["AssemblyDefinitionReferenceImporter"] = 294290339] = "AssemblyDefinitionReferenceImporter";
974
- ClassIDType3[ClassIDType3["SiblingDerived"] = 334799969] = "SiblingDerived";
975
- ClassIDType3[ClassIDType3["TestObjectWithSerializedMapStringNonAlignedStruct"] = 342846651] = "TestObjectWithSerializedMapStringNonAlignedStruct";
976
- ClassIDType3[ClassIDType3["AudioResource"] = 355983997] = "AudioResource";
977
- ClassIDType3[ClassIDType3["SubDerived"] = 367388927] = "SubDerived";
978
- ClassIDType3[ClassIDType3["AssetImportInProgressProxy"] = 369655926] = "AssetImportInProgressProxy";
979
- ClassIDType3[ClassIDType3["PluginBuildInfo"] = 382020655] = "PluginBuildInfo";
980
- ClassIDType3[ClassIDType3["MemorySettings"] = 387306366] = "MemorySettings";
981
- ClassIDType3[ClassIDType3["BuildMetaDataImporter"] = 403037116] = "BuildMetaDataImporter";
982
- ClassIDType3[ClassIDType3["BuildInstructionImporter"] = 403037117] = "BuildInstructionImporter";
983
- ClassIDType3[ClassIDType3["EditorProjectAccess"] = 426301858] = "EditorProjectAccess";
984
- ClassIDType3[ClassIDType3["PrefabImporter"] = 468431735] = "PrefabImporter";
985
- ClassIDType3[ClassIDType3["TestObjectWithSerializedArray"] = 478637458] = "TestObjectWithSerializedArray";
986
- ClassIDType3[ClassIDType3["TestObjectWithSerializedAnimationCurve"] = 478637459] = "TestObjectWithSerializedAnimationCurve";
987
- ClassIDType3[ClassIDType3["TilemapRenderer"] = 483693784] = "TilemapRenderer";
988
- ClassIDType3[ClassIDType3["ScriptableCamera"] = 488575907] = "ScriptableCamera";
989
- ClassIDType3[ClassIDType3["SpriteAtlasAsset"] = 612988286] = "SpriteAtlasAsset";
990
- ClassIDType3[ClassIDType3["SpriteAtlasDatabase"] = 638013454] = "SpriteAtlasDatabase";
991
- ClassIDType3[ClassIDType3["AudioBuildInfo"] = 641289076] = "AudioBuildInfo";
992
- ClassIDType3[ClassIDType3["CachedSpriteAtlasRuntimeData"] = 644342135] = "CachedSpriteAtlasRuntimeData";
993
- ClassIDType3[ClassIDType3["RendererFake"] = 646504946] = "RendererFake";
994
- ClassIDType3[ClassIDType3["MultiplayerManager"] = 655991488] = "MultiplayerManager";
995
- ClassIDType3[ClassIDType3["AssemblyDefinitionReferenceAsset"] = 662584278] = "AssemblyDefinitionReferenceAsset";
996
- ClassIDType3[ClassIDType3["BuiltAssetBundleInfoSet"] = 668709126] = "BuiltAssetBundleInfoSet";
997
- ClassIDType3[ClassIDType3["SpriteAtlas"] = 687078895] = "SpriteAtlas";
998
- ClassIDType3[ClassIDType3["RayTracingShaderImporter"] = 747330370] = "RayTracingShaderImporter";
999
- ClassIDType3[ClassIDType3["BuildArchiveImporter"] = 780535461] = "BuildArchiveImporter";
1000
- ClassIDType3[ClassIDType3["PreviewImporter"] = 815301076] = "PreviewImporter";
1001
- ClassIDType3[ClassIDType3["RayTracingShader"] = 825902497] = "RayTracingShader";
1002
- ClassIDType3[ClassIDType3["LightingSettings"] = 850595691] = "LightingSettings";
1003
- ClassIDType3[ClassIDType3["PlatformModuleSetup"] = 877146078] = "PlatformModuleSetup";
1004
- ClassIDType3[ClassIDType3["VersionControlSettings"] = 890905787] = "VersionControlSettings";
1005
- ClassIDType3[ClassIDType3["CustomCollider2D"] = 893571522] = "CustomCollider2D";
1006
- ClassIDType3[ClassIDType3["AimConstraint"] = 895512359] = "AimConstraint";
1007
- ClassIDType3[ClassIDType3["VFXManager"] = 937362698] = "VFXManager";
1008
- ClassIDType3[ClassIDType3["RoslynAnalyzerConfigAsset"] = 947337230] = "RoslynAnalyzerConfigAsset";
1009
- ClassIDType3[ClassIDType3["RuleSetFileAsset"] = 954905827] = "RuleSetFileAsset";
1010
- ClassIDType3[ClassIDType3["VisualEffectSubgraph"] = 994735392] = "VisualEffectSubgraph";
1011
- ClassIDType3[ClassIDType3["VisualEffectSubgraphOperator"] = 994735403] = "VisualEffectSubgraphOperator";
1012
- ClassIDType3[ClassIDType3["VisualEffectSubgraphBlock"] = 994735404] = "VisualEffectSubgraphBlock";
1013
- ClassIDType3[ClassIDType3["LocalizationImporter"] = 1027052791] = "LocalizationImporter";
1014
- ClassIDType3[ClassIDType3["Derived"] = 1091556383] = "Derived";
1015
- ClassIDType3[ClassIDType3["PropertyModificationsTargetTestObject"] = 1111377672] = "PropertyModificationsTargetTestObject";
1016
- ClassIDType3[ClassIDType3["ReferencesArtifactGenerator"] = 1114811875] = "ReferencesArtifactGenerator";
1017
- ClassIDType3[ClassIDType3["AssemblyDefinitionAsset"] = 1152215463] = "AssemblyDefinitionAsset";
1018
- ClassIDType3[ClassIDType3["SceneVisibilityState"] = 1154873562] = "SceneVisibilityState";
1019
- ClassIDType3[ClassIDType3["LookAtConstraint"] = 1183024399] = "LookAtConstraint";
1020
- ClassIDType3[ClassIDType3["SpriteAtlasImporter"] = 1210832254] = "SpriteAtlasImporter";
1021
- ClassIDType3[ClassIDType3["MultiArtifactTestImporter"] = 1223240404] = "MultiArtifactTestImporter";
1022
- ClassIDType3[ClassIDType3["AudioContainerElement"] = 1233149941] = "AudioContainerElement";
1023
- ClassIDType3[ClassIDType3["GameObjectRecorder"] = 1268269756] = "GameObjectRecorder";
1024
- ClassIDType3[ClassIDType3["AudioRandomContainer"] = 1307931743] = "AudioRandomContainer";
1025
- ClassIDType3[ClassIDType3["LightingDataAssetParent"] = 1325145578] = "LightingDataAssetParent";
1026
- ClassIDType3[ClassIDType3["PresetManager"] = 1386491679] = "PresetManager";
1027
- ClassIDType3[ClassIDType3["TestObjectWithSpecialLayoutTwo"] = 1392443030] = "TestObjectWithSpecialLayoutTwo";
1028
- ClassIDType3[ClassIDType3["StreamingManager"] = 1403656975] = "StreamingManager";
1029
- ClassIDType3[ClassIDType3["LowerResBlitTexture"] = 1480428607] = "LowerResBlitTexture";
1030
- ClassIDType3[ClassIDType3["VideoBuildInfo"] = 1521398425] = "VideoBuildInfo";
1031
- ClassIDType3[ClassIDType3["C4DImporter"] = 1541671625] = "C4DImporter";
1032
- ClassIDType3[ClassIDType3["StreamingController"] = 1542919678] = "StreamingController";
1033
- ClassIDType3[ClassIDType3["RenderPassAttachment"] = 1571458007] = "RenderPassAttachment";
1034
- ClassIDType3[ClassIDType3["TestObjectVectorPairStringBool"] = 1628831178] = "TestObjectVectorPairStringBool";
1035
- ClassIDType3[ClassIDType3["ShaderContainer"] = 1557264870] = "ShaderContainer";
1036
- ClassIDType3[ClassIDType3["RoslynAdditionalFileAsset"] = 1597193336] = "RoslynAdditionalFileAsset";
1037
- ClassIDType3[ClassIDType3["RoslynAdditionalFileImporter"] = 1642787288] = "RoslynAdditionalFileImporter";
1038
- ClassIDType3[ClassIDType3["MultiplayerRolesData"] = 1652712579] = "MultiplayerRolesData";
1039
- ClassIDType3[ClassIDType3["SceneRoots"] = 1660057539] = "SceneRoots";
1040
- ClassIDType3[ClassIDType3["BrokenPrefabAsset"] = 1731078267] = "BrokenPrefabAsset";
1041
- ClassIDType3[ClassIDType3["AndroidAssetPackImporter"] = 1736697216] = "AndroidAssetPackImporter";
1042
- ClassIDType3[ClassIDType3["VulkanDeviceFilterLists"] = 1740304944] = "VulkanDeviceFilterLists";
1043
- ClassIDType3[ClassIDType3["GridLayout"] = 1742807556] = "GridLayout";
1044
- ClassIDType3[ClassIDType3["AssemblyDefinitionImporter"] = 1766753193] = "AssemblyDefinitionImporter";
1045
- ClassIDType3[ClassIDType3["ParentConstraint"] = 1773428102] = "ParentConstraint";
1046
- ClassIDType3[ClassIDType3["FakeComponent"] = 1803986026] = "FakeComponent";
1047
- ClassIDType3[ClassIDType3["RuleSetFileImporter"] = 1777034230] = "RuleSetFileImporter";
1048
- ClassIDType3[ClassIDType3["PositionConstraint"] = 1818360608] = "PositionConstraint";
1049
- ClassIDType3[ClassIDType3["RotationConstraint"] = 1818360609] = "RotationConstraint";
1050
- ClassIDType3[ClassIDType3["ScaleConstraint"] = 1818360610] = "ScaleConstraint";
1051
- ClassIDType3[ClassIDType3["Tilemap"] = 1839735485] = "Tilemap";
1052
- ClassIDType3[ClassIDType3["PackageManifest"] = 1896753125] = "PackageManifest";
1053
- ClassIDType3[ClassIDType3["PackageManifestImporter"] = 1896753126] = "PackageManifestImporter";
1054
- ClassIDType3[ClassIDType3["RoslynAnalyzerConfigImporter"] = 1903396204] = "RoslynAnalyzerConfigImporter";
1055
- ClassIDType3[ClassIDType3["UIRenderer"] = 1931382933] = "UIRenderer";
1056
- ClassIDType3[ClassIDType3["TerrainLayer"] = 1953259897] = "TerrainLayer";
1057
- ClassIDType3[ClassIDType3["SpriteShapeRenderer"] = 1971053207] = "SpriteShapeRenderer";
1058
- ClassIDType3[ClassIDType3["NativeObjectType"] = 1977754360] = "NativeObjectType";
1059
- ClassIDType3[ClassIDType3["TestObjectWithSerializedMapStringBool"] = 1981279845] = "TestObjectWithSerializedMapStringBool";
1060
- ClassIDType3[ClassIDType3["SerializableManagedHost"] = 1995898324] = "SerializableManagedHost";
1061
- ClassIDType3[ClassIDType3["VisualEffectAsset"] = 2058629509] = "VisualEffectAsset";
1062
- ClassIDType3[ClassIDType3["VisualEffectImporter"] = 2058629510] = "VisualEffectImporter";
1063
- ClassIDType3[ClassIDType3["VisualEffectResource"] = 2058629511] = "VisualEffectResource";
1064
- ClassIDType3[ClassIDType3["VisualEffectObject"] = 2059678085] = "VisualEffectObject";
1065
- ClassIDType3[ClassIDType3["VisualEffect"] = 2083052967] = "VisualEffect";
1066
- ClassIDType3[ClassIDType3["LocalizationAsset"] = 2083778819] = "LocalizationAsset";
1067
- ClassIDType3[ClassIDType3["ScriptedImporter"] = 2089858483] = "ScriptedImporter";
1068
- ClassIDType3[ClassIDType3["ShaderIncludeImporter"] = 2103361453] = "ShaderIncludeImporter";
1069
- return ClassIDType3;
1070
- })(ClassIDType || {});
1071
-
1072
740
  // src/Util/UnityVersions.ts
1073
741
  var BuildTypes = {
1074
742
  Alpha: "a",
@@ -1185,6 +853,675 @@ var UnityVersion = class _UnityVersion {
1185
853
  }
1186
854
  };
1187
855
 
856
+ // src/Files/Serialized/Models/SerializedFileHeader.ts
857
+ var SerializedFileHeader = class {
858
+ m_MetadataSize = 0;
859
+ m_FileSize = 0n;
860
+ m_Version = 1 /* Unsupported */;
861
+ m_DataOffset = 0n;
862
+ m_Endianess = 0;
863
+ m_Reserved = new Uint8Array();
864
+ ReadHeader(reader) {
865
+ this.m_MetadataSize = reader.ReadUint32();
866
+ this.m_FileSize = BigInt(reader.ReadUint32());
867
+ this.m_Version = reader.ReadUint32();
868
+ this.m_DataOffset = BigInt(reader.ReadUint32());
869
+ if (this.m_Version >= 9 /* Unknown_9 */) {
870
+ this.m_Endianess = reader.ReadByte();
871
+ this.m_Reserved = new Uint8Array(reader.ReadBytes(3));
872
+ } else {
873
+ reader.offset = Number(this.m_FileSize - BigInt(this.m_MetadataSize));
874
+ this.m_Endianess = reader.ReadByte();
875
+ }
876
+ if (this.m_Version >= 22 /* LargeFilesSupport */) {
877
+ this.m_MetadataSize = reader.ReadUint32();
878
+ this.m_FileSize = reader.ReadUint64();
879
+ this.m_DataOffset = reader.ReadUint64();
880
+ reader.ReadInt64();
881
+ }
882
+ }
883
+ };
884
+
885
+ // src/Files/Serialized/Models/TypeTreeNode.ts
886
+ var TypeTreeNode = class {
887
+ m_Type = "";
888
+ m_Name = "";
889
+ m_ByteSize = 0;
890
+ m_Index = 0;
891
+ m_TypeFlags = 0;
892
+ m_Version = 0;
893
+ m_MetaFlag = 0;
894
+ m_Level = 0;
895
+ m_TypeStrOffset = 0;
896
+ m_NameStrOffset = 0;
897
+ m_RefTypeHash = 0n;
898
+ };
899
+
900
+ // src/Files/Serialized/Models/CommonStrings.ts
901
+ var CommonStrings = /* @__PURE__ */ new Map([
902
+ [0, "AABB"],
903
+ [5, "AnimationClip"],
904
+ [19, "AnimationCurve"],
905
+ [34, "AnimationState"],
906
+ [49, "Array"],
907
+ [55, "Base"],
908
+ [60, "BitField"],
909
+ [69, "bitset"],
910
+ [76, "bool"],
911
+ [81, "char"],
912
+ [86, "ColorRGBA"],
913
+ [96, "Component"],
914
+ [106, "data"],
915
+ [111, "deque"],
916
+ [117, "double"],
917
+ [124, "dynamic_array"],
918
+ [138, "FastPropertyName"],
919
+ [155, "first"],
920
+ [161, "float"],
921
+ [167, "Font"],
922
+ [172, "GameObject"],
923
+ [183, "Generic Mono"],
924
+ [196, "GradientNEW"],
925
+ [208, "GUID"],
926
+ [213, "GUIStyle"],
927
+ [222, "int"],
928
+ [226, "list"],
929
+ [231, "long long"],
930
+ [241, "map"],
931
+ [245, "Matrix4x4f"],
932
+ [256, "MdFour"],
933
+ [263, "MonoBehaviour"],
934
+ [277, "MonoScript"],
935
+ [288, "m_ByteSize"],
936
+ [299, "m_Curve"],
937
+ [307, "m_EditorClassIdentifier"],
938
+ [331, "m_EditorHideFlags"],
939
+ [349, "m_Enabled"],
940
+ [359, "m_ExtensionPtr"],
941
+ [374, "m_GameObject"],
942
+ [387, "m_Index"],
943
+ [395, "m_IsArray"],
944
+ [405, "m_IsStatic"],
945
+ [416, "m_MetaFlag"],
946
+ [427, "m_Name"],
947
+ [434, "m_ObjectHideFlags"],
948
+ [452, "m_PrefabInternal"],
949
+ [469, "m_PrefabParentObject"],
950
+ [490, "m_Script"],
951
+ [499, "m_StaticEditorFlags"],
952
+ [519, "m_Type"],
953
+ [526, "m_Version"],
954
+ [536, "Object"],
955
+ [543, "pair"],
956
+ [548, "PPtr<Component>"],
957
+ [564, "PPtr<GameObject>"],
958
+ [581, "PPtr<Material>"],
959
+ [596, "PPtr<MonoBehaviour>"],
960
+ [616, "PPtr<MonoScript>"],
961
+ [633, "PPtr<Object>"],
962
+ [646, "PPtr<Prefab>"],
963
+ [659, "PPtr<Sprite>"],
964
+ [672, "PPtr<TextAsset>"],
965
+ [688, "PPtr<Texture>"],
966
+ [702, "PPtr<Texture2D>"],
967
+ [718, "PPtr<Transform>"],
968
+ [734, "Prefab"],
969
+ [741, "Quaternionf"],
970
+ [753, "Rectf"],
971
+ [759, "RectInt"],
972
+ [767, "RectOffset"],
973
+ [778, "second"],
974
+ [785, "set"],
975
+ [789, "short"],
976
+ [795, "size"],
977
+ [800, "SInt16"],
978
+ [807, "SInt32"],
979
+ [814, "SInt64"],
980
+ [821, "SInt8"],
981
+ [827, "staticvector"],
982
+ [840, "string"],
983
+ [847, "TextAsset"],
984
+ [857, "TextMesh"],
985
+ [866, "Texture"],
986
+ [874, "Texture2D"],
987
+ [884, "Transform"],
988
+ [894, "TypelessData"],
989
+ [907, "UInt16"],
990
+ [914, "UInt32"],
991
+ [921, "UInt64"],
992
+ [928, "UInt8"],
993
+ [934, "unsigned int"],
994
+ [947, "unsigned long long"],
995
+ [966, "unsigned short"],
996
+ [981, "vector"],
997
+ [988, "Vector2f"],
998
+ [997, "Vector3f"],
999
+ [1006, "Vector4f"],
1000
+ [1015, "m_ScriptingClassIdentifier"],
1001
+ [1042, "Gradient"],
1002
+ [1051, "Type*"],
1003
+ [1057, "int2_storage"],
1004
+ [1070, "int3_storage"],
1005
+ [1083, "BoundsInt"],
1006
+ [1093, "m_CorrespondingSourceObject"],
1007
+ [1121, "m_PrefabInstance"],
1008
+ [1138, "m_PrefabAsset"],
1009
+ [1152, "FileSize"],
1010
+ [1161, "Hash128"],
1011
+ [1169, "RenderingLayerMask"],
1012
+ [1188, "fixed_array"],
1013
+ [1200, "EntityId"]
1014
+ ]);
1015
+
1016
+ // src/Files/Serialized/Models/TypeTree.ts
1017
+ var TypeTree = class {
1018
+ m_Nodes = [];
1019
+ m_StringBuffer = new Uint8Array();
1020
+ BlobRead(reader, m_Version) {
1021
+ const nodeCount = reader.ReadInt32();
1022
+ const stringBufferSize = reader.ReadInt32();
1023
+ for (let i = 0; i < nodeCount; i++) {
1024
+ const typeTreeNode = new TypeTreeNode();
1025
+ this.m_Nodes.push(typeTreeNode);
1026
+ typeTreeNode.m_Version = reader.ReadUint16();
1027
+ typeTreeNode.m_Level = reader.ReadByte();
1028
+ typeTreeNode.m_TypeFlags = reader.ReadByte();
1029
+ typeTreeNode.m_TypeStrOffset = reader.ReadUint32();
1030
+ typeTreeNode.m_NameStrOffset = reader.ReadUint32();
1031
+ typeTreeNode.m_ByteSize = reader.ReadInt32();
1032
+ typeTreeNode.m_Index = reader.ReadInt32();
1033
+ typeTreeNode.m_MetaFlag = reader.ReadInt32();
1034
+ if (m_Version >= 19 /* TypeTreeNodeWithTypeFlags */) {
1035
+ typeTreeNode.m_RefTypeHash = reader.ReadUint64();
1036
+ }
1037
+ }
1038
+ this.m_StringBuffer = new Uint8Array(reader.ReadBytes(stringBufferSize));
1039
+ for (let i = 0; i < nodeCount; i++) {
1040
+ this.m_Nodes[i].m_Type = this.ReadString(this.m_StringBuffer, this.m_Nodes[i].m_TypeStrOffset);
1041
+ this.m_Nodes[i].m_Name = this.ReadString(this.m_StringBuffer, this.m_Nodes[i].m_TypeStrOffset);
1042
+ }
1043
+ }
1044
+ ReadString(bytes, value) {
1045
+ const isOffset = (value & 2147483648) === 0;
1046
+ if (isOffset) {
1047
+ return this.ReadNullTerminatedString(bytes, value);
1048
+ }
1049
+ const offset = value & 2147483647;
1050
+ const str = CommonStrings.get(offset);
1051
+ if (str !== void 0) {
1052
+ return str;
1053
+ }
1054
+ return offset.toString();
1055
+ }
1056
+ ReadNullTerminatedString(bytes, offset) {
1057
+ const start = offset;
1058
+ while (bytes[offset] !== 0) {
1059
+ offset++;
1060
+ }
1061
+ return new TextDecoder().decode(bytes.slice(start, offset));
1062
+ }
1063
+ ReadTypeTree(reader, m_Version, level = 0) {
1064
+ const typeTreeNode = new TypeTreeNode();
1065
+ this.m_Nodes.push(typeTreeNode);
1066
+ typeTreeNode.m_Level = level;
1067
+ typeTreeNode.m_Type = reader.ReadStringToNull();
1068
+ typeTreeNode.m_Name = reader.ReadStringToNull();
1069
+ typeTreeNode.m_ByteSize = reader.ReadInt32();
1070
+ if (m_Version == 2 /* Unknown_2 */) {
1071
+ reader.ReadInt32();
1072
+ }
1073
+ if (m_Version != 3 /* Unknown_3 */) {
1074
+ typeTreeNode.m_Index = reader.ReadInt32();
1075
+ }
1076
+ typeTreeNode.m_TypeFlags = reader.ReadInt32();
1077
+ typeTreeNode.m_Version = reader.ReadInt32();
1078
+ if (m_Version != 3 /* Unknown_3 */) {
1079
+ typeTreeNode.m_MetaFlag = reader.ReadInt32();
1080
+ }
1081
+ const childCount = reader.ReadInt32();
1082
+ for (let i = 0; i < childCount; i++) {
1083
+ this.ReadTypeTree(reader, m_Version, ++level);
1084
+ }
1085
+ }
1086
+ };
1087
+
1088
+ // src/Files/Serialized/Models/SerializedType.ts
1089
+ var SerializedType = class {
1090
+ classID = 0;
1091
+ m_IsStrippedType = false;
1092
+ m_ScriptTypeIndex = -1;
1093
+ m_Type = new TypeTree();
1094
+ m_ScriptID = new Uint8Array();
1095
+ m_OldTypeHash = new Uint8Array();
1096
+ m_TypeDependencies = [];
1097
+ m_KlassName = "";
1098
+ m_NameSpace = "";
1099
+ m_AsmName = "";
1100
+ };
1101
+
1102
+ // src/Files/Serialized/Models/ObjectInfo.ts
1103
+ var ObjectInfo = class {
1104
+ byteStart = 0n;
1105
+ byteSize = 0;
1106
+ typeID = 0;
1107
+ classID = 0;
1108
+ isDestroyed = 0;
1109
+ stripped = 0;
1110
+ m_PathID = 0n;
1111
+ serializedType = new SerializedType();
1112
+ };
1113
+
1114
+ // src/Files/Serialized/Models/LocalSerializedObjectIdentifier.ts
1115
+ var LocalSerializedObjectIdentifier = class {
1116
+ localSerializedFileIndex = 0;
1117
+ localIdentifierInFile = 0n;
1118
+ };
1119
+
1120
+ // src/Files/Serialized/Models/FileIdentifier.ts
1121
+ var FileIdentifier = class {
1122
+ guid = "";
1123
+ type = 0;
1124
+ pathName = "";
1125
+ };
1126
+
1127
+ // src/Enums/ClassIDType.ts
1128
+ var ClassIDType = /* @__PURE__ */ ((ClassIDType3) => {
1129
+ ClassIDType3[ClassIDType3["UnknownType"] = -1] = "UnknownType";
1130
+ ClassIDType3[ClassIDType3["Object"] = 0] = "Object";
1131
+ ClassIDType3[ClassIDType3["GameObject"] = 1] = "GameObject";
1132
+ ClassIDType3[ClassIDType3["Component"] = 2] = "Component";
1133
+ ClassIDType3[ClassIDType3["LevelGameManager"] = 3] = "LevelGameManager";
1134
+ ClassIDType3[ClassIDType3["Transform"] = 4] = "Transform";
1135
+ ClassIDType3[ClassIDType3["TimeManager"] = 5] = "TimeManager";
1136
+ ClassIDType3[ClassIDType3["GlobalGameManager"] = 6] = "GlobalGameManager";
1137
+ ClassIDType3[ClassIDType3["Behaviour"] = 8] = "Behaviour";
1138
+ ClassIDType3[ClassIDType3["GameManager"] = 9] = "GameManager";
1139
+ ClassIDType3[ClassIDType3["AudioManager"] = 11] = "AudioManager";
1140
+ ClassIDType3[ClassIDType3["ParticleAnimator"] = 12] = "ParticleAnimator";
1141
+ ClassIDType3[ClassIDType3["InputManager"] = 13] = "InputManager";
1142
+ ClassIDType3[ClassIDType3["EllipsoidParticleEmitter"] = 15] = "EllipsoidParticleEmitter";
1143
+ ClassIDType3[ClassIDType3["Pipeline"] = 17] = "Pipeline";
1144
+ ClassIDType3[ClassIDType3["EditorExtension"] = 18] = "EditorExtension";
1145
+ ClassIDType3[ClassIDType3["Physics2DSettings"] = 19] = "Physics2DSettings";
1146
+ ClassIDType3[ClassIDType3["Camera"] = 20] = "Camera";
1147
+ ClassIDType3[ClassIDType3["Material"] = 21] = "Material";
1148
+ ClassIDType3[ClassIDType3["MeshRenderer"] = 23] = "MeshRenderer";
1149
+ ClassIDType3[ClassIDType3["Renderer"] = 25] = "Renderer";
1150
+ ClassIDType3[ClassIDType3["ParticleRenderer"] = 26] = "ParticleRenderer";
1151
+ ClassIDType3[ClassIDType3["Texture"] = 27] = "Texture";
1152
+ ClassIDType3[ClassIDType3["Texture2D"] = 28] = "Texture2D";
1153
+ ClassIDType3[ClassIDType3["OcclusionCullingSettings"] = 29] = "OcclusionCullingSettings";
1154
+ ClassIDType3[ClassIDType3["GraphicsSettings"] = 30] = "GraphicsSettings";
1155
+ ClassIDType3[ClassIDType3["MeshFilter"] = 33] = "MeshFilter";
1156
+ ClassIDType3[ClassIDType3["OcclusionPortal"] = 41] = "OcclusionPortal";
1157
+ ClassIDType3[ClassIDType3["Mesh"] = 43] = "Mesh";
1158
+ ClassIDType3[ClassIDType3["Skybox"] = 45] = "Skybox";
1159
+ ClassIDType3[ClassIDType3["QualitySettings"] = 47] = "QualitySettings";
1160
+ ClassIDType3[ClassIDType3["Shader"] = 48] = "Shader";
1161
+ ClassIDType3[ClassIDType3["TextAsset"] = 49] = "TextAsset";
1162
+ ClassIDType3[ClassIDType3["Rigidbody2D"] = 50] = "Rigidbody2D";
1163
+ ClassIDType3[ClassIDType3["Physics2DManager"] = 51] = "Physics2DManager";
1164
+ ClassIDType3[ClassIDType3["Collider2D"] = 53] = "Collider2D";
1165
+ ClassIDType3[ClassIDType3["Rigidbody"] = 54] = "Rigidbody";
1166
+ ClassIDType3[ClassIDType3["PhysicsManager"] = 55] = "PhysicsManager";
1167
+ ClassIDType3[ClassIDType3["Collider"] = 56] = "Collider";
1168
+ ClassIDType3[ClassIDType3["Joint"] = 57] = "Joint";
1169
+ ClassIDType3[ClassIDType3["CircleCollider2D"] = 58] = "CircleCollider2D";
1170
+ ClassIDType3[ClassIDType3["HingeJoint"] = 59] = "HingeJoint";
1171
+ ClassIDType3[ClassIDType3["PolygonCollider2D"] = 60] = "PolygonCollider2D";
1172
+ ClassIDType3[ClassIDType3["BoxCollider2D"] = 61] = "BoxCollider2D";
1173
+ ClassIDType3[ClassIDType3["PhysicsMaterial2D"] = 62] = "PhysicsMaterial2D";
1174
+ ClassIDType3[ClassIDType3["MeshCollider"] = 64] = "MeshCollider";
1175
+ ClassIDType3[ClassIDType3["BoxCollider"] = 65] = "BoxCollider";
1176
+ ClassIDType3[ClassIDType3["CompositeCollider2D"] = 66] = "CompositeCollider2D";
1177
+ ClassIDType3[ClassIDType3["EdgeCollider2D"] = 68] = "EdgeCollider2D";
1178
+ ClassIDType3[ClassIDType3["CapsuleCollider2D"] = 70] = "CapsuleCollider2D";
1179
+ ClassIDType3[ClassIDType3["ComputeShader"] = 72] = "ComputeShader";
1180
+ ClassIDType3[ClassIDType3["AnimationClip"] = 74] = "AnimationClip";
1181
+ ClassIDType3[ClassIDType3["ConstantForce"] = 75] = "ConstantForce";
1182
+ ClassIDType3[ClassIDType3["WorldParticleCollider"] = 76] = "WorldParticleCollider";
1183
+ ClassIDType3[ClassIDType3["TagManager"] = 78] = "TagManager";
1184
+ ClassIDType3[ClassIDType3["AudioListener"] = 81] = "AudioListener";
1185
+ ClassIDType3[ClassIDType3["AudioSource"] = 82] = "AudioSource";
1186
+ ClassIDType3[ClassIDType3["AudioClip"] = 83] = "AudioClip";
1187
+ ClassIDType3[ClassIDType3["RenderTexture"] = 84] = "RenderTexture";
1188
+ ClassIDType3[ClassIDType3["CustomRenderTexture"] = 86] = "CustomRenderTexture";
1189
+ ClassIDType3[ClassIDType3["MeshParticleEmitter"] = 87] = "MeshParticleEmitter";
1190
+ ClassIDType3[ClassIDType3["ParticleEmitter"] = 88] = "ParticleEmitter";
1191
+ ClassIDType3[ClassIDType3["Cubemap"] = 89] = "Cubemap";
1192
+ ClassIDType3[ClassIDType3["Avatar"] = 90] = "Avatar";
1193
+ ClassIDType3[ClassIDType3["AnimatorController"] = 91] = "AnimatorController";
1194
+ ClassIDType3[ClassIDType3["GUILayer"] = 92] = "GUILayer";
1195
+ ClassIDType3[ClassIDType3["RuntimeAnimatorController"] = 93] = "RuntimeAnimatorController";
1196
+ ClassIDType3[ClassIDType3["ScriptMapper"] = 94] = "ScriptMapper";
1197
+ ClassIDType3[ClassIDType3["Animator"] = 95] = "Animator";
1198
+ ClassIDType3[ClassIDType3["TrailRenderer"] = 96] = "TrailRenderer";
1199
+ ClassIDType3[ClassIDType3["DelayedCallManager"] = 98] = "DelayedCallManager";
1200
+ ClassIDType3[ClassIDType3["TextMesh"] = 102] = "TextMesh";
1201
+ ClassIDType3[ClassIDType3["RenderSettings"] = 104] = "RenderSettings";
1202
+ ClassIDType3[ClassIDType3["Light"] = 108] = "Light";
1203
+ ClassIDType3[ClassIDType3["CGProgram"] = 109] = "CGProgram";
1204
+ ClassIDType3[ClassIDType3["BaseAnimationTrack"] = 110] = "BaseAnimationTrack";
1205
+ ClassIDType3[ClassIDType3["Animation"] = 111] = "Animation";
1206
+ ClassIDType3[ClassIDType3["MonoBehaviour"] = 114] = "MonoBehaviour";
1207
+ ClassIDType3[ClassIDType3["MonoScript"] = 115] = "MonoScript";
1208
+ ClassIDType3[ClassIDType3["MonoManager"] = 116] = "MonoManager";
1209
+ ClassIDType3[ClassIDType3["Texture3D"] = 117] = "Texture3D";
1210
+ ClassIDType3[ClassIDType3["NewAnimationTrack"] = 118] = "NewAnimationTrack";
1211
+ ClassIDType3[ClassIDType3["Projector"] = 119] = "Projector";
1212
+ ClassIDType3[ClassIDType3["LineRenderer"] = 120] = "LineRenderer";
1213
+ ClassIDType3[ClassIDType3["Flare"] = 121] = "Flare";
1214
+ ClassIDType3[ClassIDType3["Halo"] = 122] = "Halo";
1215
+ ClassIDType3[ClassIDType3["LensFlare"] = 123] = "LensFlare";
1216
+ ClassIDType3[ClassIDType3["FlareLayer"] = 124] = "FlareLayer";
1217
+ ClassIDType3[ClassIDType3["HaloLayer"] = 125] = "HaloLayer";
1218
+ ClassIDType3[ClassIDType3["NavMeshAreas"] = 126] = "NavMeshAreas";
1219
+ ClassIDType3[ClassIDType3["NavMeshProjectSettings"] = 126] = "NavMeshProjectSettings";
1220
+ ClassIDType3[ClassIDType3["HaloManager"] = 127] = "HaloManager";
1221
+ ClassIDType3[ClassIDType3["Font"] = 128] = "Font";
1222
+ ClassIDType3[ClassIDType3["PlayerSettings"] = 129] = "PlayerSettings";
1223
+ ClassIDType3[ClassIDType3["NamedObject"] = 130] = "NamedObject";
1224
+ ClassIDType3[ClassIDType3["GUITexture"] = 131] = "GUITexture";
1225
+ ClassIDType3[ClassIDType3["GUIText"] = 132] = "GUIText";
1226
+ ClassIDType3[ClassIDType3["GUIElement"] = 133] = "GUIElement";
1227
+ ClassIDType3[ClassIDType3["PhysicMaterial"] = 134] = "PhysicMaterial";
1228
+ ClassIDType3[ClassIDType3["SphereCollider"] = 135] = "SphereCollider";
1229
+ ClassIDType3[ClassIDType3["CapsuleCollider"] = 136] = "CapsuleCollider";
1230
+ ClassIDType3[ClassIDType3["SkinnedMeshRenderer"] = 137] = "SkinnedMeshRenderer";
1231
+ ClassIDType3[ClassIDType3["FixedJoint"] = 138] = "FixedJoint";
1232
+ ClassIDType3[ClassIDType3["RaycastCollider"] = 140] = "RaycastCollider";
1233
+ ClassIDType3[ClassIDType3["BuildSettings"] = 141] = "BuildSettings";
1234
+ ClassIDType3[ClassIDType3["AssetBundle"] = 142] = "AssetBundle";
1235
+ ClassIDType3[ClassIDType3["CharacterController"] = 143] = "CharacterController";
1236
+ ClassIDType3[ClassIDType3["CharacterJoint"] = 144] = "CharacterJoint";
1237
+ ClassIDType3[ClassIDType3["SpringJoint"] = 145] = "SpringJoint";
1238
+ ClassIDType3[ClassIDType3["WheelCollider"] = 146] = "WheelCollider";
1239
+ ClassIDType3[ClassIDType3["ResourceManager"] = 147] = "ResourceManager";
1240
+ ClassIDType3[ClassIDType3["NetworkView"] = 148] = "NetworkView";
1241
+ ClassIDType3[ClassIDType3["NetworkManager"] = 149] = "NetworkManager";
1242
+ ClassIDType3[ClassIDType3["PreloadData"] = 150] = "PreloadData";
1243
+ ClassIDType3[ClassIDType3["MovieTexture"] = 152] = "MovieTexture";
1244
+ ClassIDType3[ClassIDType3["ConfigurableJoint"] = 153] = "ConfigurableJoint";
1245
+ ClassIDType3[ClassIDType3["TerrainCollider"] = 154] = "TerrainCollider";
1246
+ ClassIDType3[ClassIDType3["MasterServerInterface"] = 155] = "MasterServerInterface";
1247
+ ClassIDType3[ClassIDType3["TerrainData"] = 156] = "TerrainData";
1248
+ ClassIDType3[ClassIDType3["LightmapSettings"] = 157] = "LightmapSettings";
1249
+ ClassIDType3[ClassIDType3["WebCamTexture"] = 158] = "WebCamTexture";
1250
+ ClassIDType3[ClassIDType3["EditorSettings"] = 159] = "EditorSettings";
1251
+ ClassIDType3[ClassIDType3["InteractiveCloth"] = 160] = "InteractiveCloth";
1252
+ ClassIDType3[ClassIDType3["ClothRenderer"] = 161] = "ClothRenderer";
1253
+ ClassIDType3[ClassIDType3["EditorUserSettings"] = 162] = "EditorUserSettings";
1254
+ ClassIDType3[ClassIDType3["SkinnedCloth"] = 163] = "SkinnedCloth";
1255
+ ClassIDType3[ClassIDType3["AudioReverbFilter"] = 164] = "AudioReverbFilter";
1256
+ ClassIDType3[ClassIDType3["AudioHighPassFilter"] = 165] = "AudioHighPassFilter";
1257
+ ClassIDType3[ClassIDType3["AudioChorusFilter"] = 166] = "AudioChorusFilter";
1258
+ ClassIDType3[ClassIDType3["AudioReverbZone"] = 167] = "AudioReverbZone";
1259
+ ClassIDType3[ClassIDType3["AudioEchoFilter"] = 168] = "AudioEchoFilter";
1260
+ ClassIDType3[ClassIDType3["AudioLowPassFilter"] = 169] = "AudioLowPassFilter";
1261
+ ClassIDType3[ClassIDType3["AudioDistortionFilter"] = 170] = "AudioDistortionFilter";
1262
+ ClassIDType3[ClassIDType3["SparseTexture"] = 171] = "SparseTexture";
1263
+ ClassIDType3[ClassIDType3["AudioBehaviour"] = 180] = "AudioBehaviour";
1264
+ ClassIDType3[ClassIDType3["AudioFilter"] = 181] = "AudioFilter";
1265
+ ClassIDType3[ClassIDType3["WindZone"] = 182] = "WindZone";
1266
+ ClassIDType3[ClassIDType3["Cloth"] = 183] = "Cloth";
1267
+ ClassIDType3[ClassIDType3["SubstanceArchive"] = 184] = "SubstanceArchive";
1268
+ ClassIDType3[ClassIDType3["ProceduralMaterial"] = 185] = "ProceduralMaterial";
1269
+ ClassIDType3[ClassIDType3["ProceduralTexture"] = 186] = "ProceduralTexture";
1270
+ ClassIDType3[ClassIDType3["Texture2DArray"] = 187] = "Texture2DArray";
1271
+ ClassIDType3[ClassIDType3["Texture2DArrayImage"] = -187] = "Texture2DArrayImage";
1272
+ ClassIDType3[ClassIDType3["CubemapArray"] = 188] = "CubemapArray";
1273
+ ClassIDType3[ClassIDType3["OffMeshLink"] = 191] = "OffMeshLink";
1274
+ ClassIDType3[ClassIDType3["OcclusionArea"] = 192] = "OcclusionArea";
1275
+ ClassIDType3[ClassIDType3["Tree"] = 193] = "Tree";
1276
+ ClassIDType3[ClassIDType3["NavMeshObsolete"] = 194] = "NavMeshObsolete";
1277
+ ClassIDType3[ClassIDType3["NavMeshAgent"] = 195] = "NavMeshAgent";
1278
+ ClassIDType3[ClassIDType3["NavMeshSettings"] = 196] = "NavMeshSettings";
1279
+ ClassIDType3[ClassIDType3["LightProbesLegacy"] = 197] = "LightProbesLegacy";
1280
+ ClassIDType3[ClassIDType3["ParticleSystem"] = 198] = "ParticleSystem";
1281
+ ClassIDType3[ClassIDType3["ParticleSystemRenderer"] = 199] = "ParticleSystemRenderer";
1282
+ ClassIDType3[ClassIDType3["ShaderVariantCollection"] = 200] = "ShaderVariantCollection";
1283
+ ClassIDType3[ClassIDType3["LODGroup"] = 205] = "LODGroup";
1284
+ ClassIDType3[ClassIDType3["BlendTree"] = 206] = "BlendTree";
1285
+ ClassIDType3[ClassIDType3["Motion"] = 207] = "Motion";
1286
+ ClassIDType3[ClassIDType3["NavMeshObstacle"] = 208] = "NavMeshObstacle";
1287
+ ClassIDType3[ClassIDType3["SortingGroup"] = 210] = "SortingGroup";
1288
+ ClassIDType3[ClassIDType3["SpriteRenderer"] = 212] = "SpriteRenderer";
1289
+ ClassIDType3[ClassIDType3["Sprite"] = 213] = "Sprite";
1290
+ ClassIDType3[ClassIDType3["CachedSpriteAtlas"] = 214] = "CachedSpriteAtlas";
1291
+ ClassIDType3[ClassIDType3["ReflectionProbe"] = 215] = "ReflectionProbe";
1292
+ ClassIDType3[ClassIDType3["ReflectionProbes"] = 216] = "ReflectionProbes";
1293
+ ClassIDType3[ClassIDType3["Terrain"] = 218] = "Terrain";
1294
+ ClassIDType3[ClassIDType3["LightProbeGroup"] = 220] = "LightProbeGroup";
1295
+ ClassIDType3[ClassIDType3["AnimatorOverrideController"] = 221] = "AnimatorOverrideController";
1296
+ ClassIDType3[ClassIDType3["CanvasRenderer"] = 222] = "CanvasRenderer";
1297
+ ClassIDType3[ClassIDType3["Canvas"] = 223] = "Canvas";
1298
+ ClassIDType3[ClassIDType3["RectTransform"] = 224] = "RectTransform";
1299
+ ClassIDType3[ClassIDType3["CanvasGroup"] = 225] = "CanvasGroup";
1300
+ ClassIDType3[ClassIDType3["BillboardAsset"] = 226] = "BillboardAsset";
1301
+ ClassIDType3[ClassIDType3["BillboardRenderer"] = 227] = "BillboardRenderer";
1302
+ ClassIDType3[ClassIDType3["SpeedTreeWindAsset"] = 228] = "SpeedTreeWindAsset";
1303
+ ClassIDType3[ClassIDType3["AnchoredJoint2D"] = 229] = "AnchoredJoint2D";
1304
+ ClassIDType3[ClassIDType3["Joint2D"] = 230] = "Joint2D";
1305
+ ClassIDType3[ClassIDType3["SpringJoint2D"] = 231] = "SpringJoint2D";
1306
+ ClassIDType3[ClassIDType3["DistanceJoint2D"] = 232] = "DistanceJoint2D";
1307
+ ClassIDType3[ClassIDType3["HingeJoint2D"] = 233] = "HingeJoint2D";
1308
+ ClassIDType3[ClassIDType3["SliderJoint2D"] = 234] = "SliderJoint2D";
1309
+ ClassIDType3[ClassIDType3["WheelJoint2D"] = 235] = "WheelJoint2D";
1310
+ ClassIDType3[ClassIDType3["ClusterInputManager"] = 236] = "ClusterInputManager";
1311
+ ClassIDType3[ClassIDType3["BaseVideoTexture"] = 237] = "BaseVideoTexture";
1312
+ ClassIDType3[ClassIDType3["NavMeshData"] = 238] = "NavMeshData";
1313
+ ClassIDType3[ClassIDType3["AudioMixer"] = 240] = "AudioMixer";
1314
+ ClassIDType3[ClassIDType3["AudioMixerController"] = 241] = "AudioMixerController";
1315
+ ClassIDType3[ClassIDType3["AudioMixerGroupController"] = 243] = "AudioMixerGroupController";
1316
+ ClassIDType3[ClassIDType3["AudioMixerEffectController"] = 244] = "AudioMixerEffectController";
1317
+ ClassIDType3[ClassIDType3["AudioMixerSnapshotController"] = 245] = "AudioMixerSnapshotController";
1318
+ ClassIDType3[ClassIDType3["PhysicsUpdateBehaviour2D"] = 246] = "PhysicsUpdateBehaviour2D";
1319
+ ClassIDType3[ClassIDType3["ConstantForce2D"] = 247] = "ConstantForce2D";
1320
+ ClassIDType3[ClassIDType3["Effector2D"] = 248] = "Effector2D";
1321
+ ClassIDType3[ClassIDType3["AreaEffector2D"] = 249] = "AreaEffector2D";
1322
+ ClassIDType3[ClassIDType3["PointEffector2D"] = 250] = "PointEffector2D";
1323
+ ClassIDType3[ClassIDType3["PlatformEffector2D"] = 251] = "PlatformEffector2D";
1324
+ ClassIDType3[ClassIDType3["SurfaceEffector2D"] = 252] = "SurfaceEffector2D";
1325
+ ClassIDType3[ClassIDType3["BuoyancyEffector2D"] = 253] = "BuoyancyEffector2D";
1326
+ ClassIDType3[ClassIDType3["RelativeJoint2D"] = 254] = "RelativeJoint2D";
1327
+ ClassIDType3[ClassIDType3["FixedJoint2D"] = 255] = "FixedJoint2D";
1328
+ ClassIDType3[ClassIDType3["FrictionJoint2D"] = 256] = "FrictionJoint2D";
1329
+ ClassIDType3[ClassIDType3["TargetJoint2D"] = 257] = "TargetJoint2D";
1330
+ ClassIDType3[ClassIDType3["LightProbes"] = 258] = "LightProbes";
1331
+ ClassIDType3[ClassIDType3["LightProbeProxyVolume"] = 259] = "LightProbeProxyVolume";
1332
+ ClassIDType3[ClassIDType3["SampleClip"] = 271] = "SampleClip";
1333
+ ClassIDType3[ClassIDType3["AudioMixerSnapshot"] = 272] = "AudioMixerSnapshot";
1334
+ ClassIDType3[ClassIDType3["AudioMixerGroup"] = 273] = "AudioMixerGroup";
1335
+ ClassIDType3[ClassIDType3["NScreenBridge"] = 280] = "NScreenBridge";
1336
+ ClassIDType3[ClassIDType3["AssetBundleManifest"] = 290] = "AssetBundleManifest";
1337
+ ClassIDType3[ClassIDType3["UnityAdsManager"] = 292] = "UnityAdsManager";
1338
+ ClassIDType3[ClassIDType3["RuntimeInitializeOnLoadManager"] = 300] = "RuntimeInitializeOnLoadManager";
1339
+ ClassIDType3[ClassIDType3["CloudWebServicesManager"] = 301] = "CloudWebServicesManager";
1340
+ ClassIDType3[ClassIDType3["UnityAnalyticsManager"] = 303] = "UnityAnalyticsManager";
1341
+ ClassIDType3[ClassIDType3["CrashReportManager"] = 304] = "CrashReportManager";
1342
+ ClassIDType3[ClassIDType3["PerformanceReportingManager"] = 305] = "PerformanceReportingManager";
1343
+ ClassIDType3[ClassIDType3["UnityConnectSettings"] = 310] = "UnityConnectSettings";
1344
+ ClassIDType3[ClassIDType3["AvatarMask"] = 319] = "AvatarMask";
1345
+ ClassIDType3[ClassIDType3["PlayableDirector"] = 320] = "PlayableDirector";
1346
+ ClassIDType3[ClassIDType3["VideoPlayer"] = 328] = "VideoPlayer";
1347
+ ClassIDType3[ClassIDType3["VideoClip"] = 329] = "VideoClip";
1348
+ ClassIDType3[ClassIDType3["ParticleSystemForceField"] = 330] = "ParticleSystemForceField";
1349
+ ClassIDType3[ClassIDType3["SpriteMask"] = 331] = "SpriteMask";
1350
+ ClassIDType3[ClassIDType3["WorldAnchor"] = 362] = "WorldAnchor";
1351
+ ClassIDType3[ClassIDType3["OcclusionCullingData"] = 363] = "OcclusionCullingData";
1352
+ ClassIDType3[ClassIDType3["SmallestEditorClassID"] = 1e3] = "SmallestEditorClassID";
1353
+ ClassIDType3[ClassIDType3["PrefabInstance"] = 1001] = "PrefabInstance";
1354
+ ClassIDType3[ClassIDType3["EditorExtensionImpl"] = 1002] = "EditorExtensionImpl";
1355
+ ClassIDType3[ClassIDType3["AssetImporter"] = 1003] = "AssetImporter";
1356
+ ClassIDType3[ClassIDType3["AssetDatabaseV1"] = 1004] = "AssetDatabaseV1";
1357
+ ClassIDType3[ClassIDType3["Mesh3DSImporter"] = 1005] = "Mesh3DSImporter";
1358
+ ClassIDType3[ClassIDType3["TextureImporter"] = 1006] = "TextureImporter";
1359
+ ClassIDType3[ClassIDType3["ShaderImporter"] = 1007] = "ShaderImporter";
1360
+ ClassIDType3[ClassIDType3["ComputeShaderImporter"] = 1008] = "ComputeShaderImporter";
1361
+ ClassIDType3[ClassIDType3["AudioImporter"] = 1020] = "AudioImporter";
1362
+ ClassIDType3[ClassIDType3["HierarchyState"] = 1026] = "HierarchyState";
1363
+ ClassIDType3[ClassIDType3["GUIDSerializer"] = 1027] = "GUIDSerializer";
1364
+ ClassIDType3[ClassIDType3["AssetMetaData"] = 1028] = "AssetMetaData";
1365
+ ClassIDType3[ClassIDType3["DefaultAsset"] = 1029] = "DefaultAsset";
1366
+ ClassIDType3[ClassIDType3["DefaultImporter"] = 1030] = "DefaultImporter";
1367
+ ClassIDType3[ClassIDType3["TextScriptImporter"] = 1031] = "TextScriptImporter";
1368
+ ClassIDType3[ClassIDType3["SceneAsset"] = 1032] = "SceneAsset";
1369
+ ClassIDType3[ClassIDType3["NativeFormatImporter"] = 1034] = "NativeFormatImporter";
1370
+ ClassIDType3[ClassIDType3["MonoImporter"] = 1035] = "MonoImporter";
1371
+ ClassIDType3[ClassIDType3["AssetServerCache"] = 1037] = "AssetServerCache";
1372
+ ClassIDType3[ClassIDType3["LibraryAssetImporter"] = 1038] = "LibraryAssetImporter";
1373
+ ClassIDType3[ClassIDType3["ModelImporter"] = 1040] = "ModelImporter";
1374
+ ClassIDType3[ClassIDType3["FBXImporter"] = 1041] = "FBXImporter";
1375
+ ClassIDType3[ClassIDType3["TrueTypeFontImporter"] = 1042] = "TrueTypeFontImporter";
1376
+ ClassIDType3[ClassIDType3["MovieImporter"] = 1044] = "MovieImporter";
1377
+ ClassIDType3[ClassIDType3["EditorBuildSettings"] = 1045] = "EditorBuildSettings";
1378
+ ClassIDType3[ClassIDType3["DDSImporter"] = 1046] = "DDSImporter";
1379
+ ClassIDType3[ClassIDType3["InspectorExpandedState"] = 1048] = "InspectorExpandedState";
1380
+ ClassIDType3[ClassIDType3["AnnotationManager"] = 1049] = "AnnotationManager";
1381
+ ClassIDType3[ClassIDType3["PluginImporter"] = 1050] = "PluginImporter";
1382
+ ClassIDType3[ClassIDType3["EditorUserBuildSettings"] = 1051] = "EditorUserBuildSettings";
1383
+ ClassIDType3[ClassIDType3["PVRImporter"] = 1052] = "PVRImporter";
1384
+ ClassIDType3[ClassIDType3["ASTCImporter"] = 1053] = "ASTCImporter";
1385
+ ClassIDType3[ClassIDType3["KTXImporter"] = 1054] = "KTXImporter";
1386
+ ClassIDType3[ClassIDType3["IHVImageFormatImporter"] = 1055] = "IHVImageFormatImporter";
1387
+ ClassIDType3[ClassIDType3["AnimatorStateTransition"] = 1101] = "AnimatorStateTransition";
1388
+ ClassIDType3[ClassIDType3["AnimatorState"] = 1102] = "AnimatorState";
1389
+ ClassIDType3[ClassIDType3["HumanTemplate"] = 1105] = "HumanTemplate";
1390
+ ClassIDType3[ClassIDType3["AnimatorStateMachine"] = 1107] = "AnimatorStateMachine";
1391
+ ClassIDType3[ClassIDType3["PreviewAnimationClip"] = 1108] = "PreviewAnimationClip";
1392
+ ClassIDType3[ClassIDType3["AnimatorTransition"] = 1109] = "AnimatorTransition";
1393
+ ClassIDType3[ClassIDType3["SpeedTreeImporter"] = 1110] = "SpeedTreeImporter";
1394
+ ClassIDType3[ClassIDType3["AnimatorTransitionBase"] = 1111] = "AnimatorTransitionBase";
1395
+ ClassIDType3[ClassIDType3["SubstanceImporter"] = 1112] = "SubstanceImporter";
1396
+ ClassIDType3[ClassIDType3["LightmapParameters"] = 1113] = "LightmapParameters";
1397
+ ClassIDType3[ClassIDType3["LightingDataAsset"] = 1120] = "LightingDataAsset";
1398
+ ClassIDType3[ClassIDType3["GISRaster"] = 1121] = "GISRaster";
1399
+ ClassIDType3[ClassIDType3["GISRasterImporter"] = 1122] = "GISRasterImporter";
1400
+ ClassIDType3[ClassIDType3["CadImporter"] = 1123] = "CadImporter";
1401
+ ClassIDType3[ClassIDType3["SketchUpImporter"] = 1124] = "SketchUpImporter";
1402
+ ClassIDType3[ClassIDType3["BuildReport"] = 1125] = "BuildReport";
1403
+ ClassIDType3[ClassIDType3["PackedAssets"] = 1126] = "PackedAssets";
1404
+ ClassIDType3[ClassIDType3["VideoClipImporter"] = 1127] = "VideoClipImporter";
1405
+ ClassIDType3[ClassIDType3["ActivationLogComponent"] = 2e3] = "ActivationLogComponent";
1406
+ ClassIDType3[ClassIDType3["MonoObject"] = 100003] = "MonoObject";
1407
+ ClassIDType3[ClassIDType3["Collision"] = 100004] = "Collision";
1408
+ ClassIDType3[ClassIDType3["Vector3f"] = 100005] = "Vector3f";
1409
+ ClassIDType3[ClassIDType3["RootMotionData"] = 100006] = "RootMotionData";
1410
+ ClassIDType3[ClassIDType3["Collision2D"] = 100007] = "Collision2D";
1411
+ ClassIDType3[ClassIDType3["AudioMixerLiveUpdateFloat"] = 100008] = "AudioMixerLiveUpdateFloat";
1412
+ ClassIDType3[ClassIDType3["AudioMixerLiveUpdateBool"] = 100009] = "AudioMixerLiveUpdateBool";
1413
+ ClassIDType3[ClassIDType3["Polygon2D"] = 100010] = "Polygon2D";
1414
+ ClassIDType3[ClassIDType3["TilemapCollider2D"] = 19719996] = "TilemapCollider2D";
1415
+ ClassIDType3[ClassIDType3["AssetImporterLog"] = 41386430] = "AssetImporterLog";
1416
+ ClassIDType3[ClassIDType3["GraphicsStateCollection"] = 55640938] = "GraphicsStateCollection";
1417
+ ClassIDType3[ClassIDType3["VFXRenderer"] = 73398921] = "VFXRenderer";
1418
+ ClassIDType3[ClassIDType3["SerializableManagedRefTestClass"] = 76251197] = "SerializableManagedRefTestClass";
1419
+ ClassIDType3[ClassIDType3["Grid"] = 156049354] = "Grid";
1420
+ ClassIDType3[ClassIDType3["ScenesUsingAssets"] = 156483287] = "ScenesUsingAssets";
1421
+ ClassIDType3[ClassIDType3["ArticulationBody"] = 171741748] = "ArticulationBody";
1422
+ ClassIDType3[ClassIDType3["Preset"] = 181963792] = "Preset";
1423
+ ClassIDType3[ClassIDType3["EmptyObject"] = 277625683] = "EmptyObject";
1424
+ ClassIDType3[ClassIDType3["IConstraint"] = 285090594] = "IConstraint";
1425
+ ClassIDType3[ClassIDType3["TestObjectWithSpecialLayoutOne"] = 293259124] = "TestObjectWithSpecialLayoutOne";
1426
+ ClassIDType3[ClassIDType3["AssemblyDefinitionReferenceImporter"] = 294290339] = "AssemblyDefinitionReferenceImporter";
1427
+ ClassIDType3[ClassIDType3["SiblingDerived"] = 334799969] = "SiblingDerived";
1428
+ ClassIDType3[ClassIDType3["TestObjectWithSerializedMapStringNonAlignedStruct"] = 342846651] = "TestObjectWithSerializedMapStringNonAlignedStruct";
1429
+ ClassIDType3[ClassIDType3["AudioResource"] = 355983997] = "AudioResource";
1430
+ ClassIDType3[ClassIDType3["SubDerived"] = 367388927] = "SubDerived";
1431
+ ClassIDType3[ClassIDType3["AssetImportInProgressProxy"] = 369655926] = "AssetImportInProgressProxy";
1432
+ ClassIDType3[ClassIDType3["PluginBuildInfo"] = 382020655] = "PluginBuildInfo";
1433
+ ClassIDType3[ClassIDType3["MemorySettings"] = 387306366] = "MemorySettings";
1434
+ ClassIDType3[ClassIDType3["BuildMetaDataImporter"] = 403037116] = "BuildMetaDataImporter";
1435
+ ClassIDType3[ClassIDType3["BuildInstructionImporter"] = 403037117] = "BuildInstructionImporter";
1436
+ ClassIDType3[ClassIDType3["EditorProjectAccess"] = 426301858] = "EditorProjectAccess";
1437
+ ClassIDType3[ClassIDType3["PrefabImporter"] = 468431735] = "PrefabImporter";
1438
+ ClassIDType3[ClassIDType3["TestObjectWithSerializedArray"] = 478637458] = "TestObjectWithSerializedArray";
1439
+ ClassIDType3[ClassIDType3["TestObjectWithSerializedAnimationCurve"] = 478637459] = "TestObjectWithSerializedAnimationCurve";
1440
+ ClassIDType3[ClassIDType3["TilemapRenderer"] = 483693784] = "TilemapRenderer";
1441
+ ClassIDType3[ClassIDType3["ScriptableCamera"] = 488575907] = "ScriptableCamera";
1442
+ ClassIDType3[ClassIDType3["SpriteAtlasAsset"] = 612988286] = "SpriteAtlasAsset";
1443
+ ClassIDType3[ClassIDType3["SpriteAtlasDatabase"] = 638013454] = "SpriteAtlasDatabase";
1444
+ ClassIDType3[ClassIDType3["AudioBuildInfo"] = 641289076] = "AudioBuildInfo";
1445
+ ClassIDType3[ClassIDType3["CachedSpriteAtlasRuntimeData"] = 644342135] = "CachedSpriteAtlasRuntimeData";
1446
+ ClassIDType3[ClassIDType3["RendererFake"] = 646504946] = "RendererFake";
1447
+ ClassIDType3[ClassIDType3["MultiplayerManager"] = 655991488] = "MultiplayerManager";
1448
+ ClassIDType3[ClassIDType3["AssemblyDefinitionReferenceAsset"] = 662584278] = "AssemblyDefinitionReferenceAsset";
1449
+ ClassIDType3[ClassIDType3["BuiltAssetBundleInfoSet"] = 668709126] = "BuiltAssetBundleInfoSet";
1450
+ ClassIDType3[ClassIDType3["SpriteAtlas"] = 687078895] = "SpriteAtlas";
1451
+ ClassIDType3[ClassIDType3["RayTracingShaderImporter"] = 747330370] = "RayTracingShaderImporter";
1452
+ ClassIDType3[ClassIDType3["BuildArchiveImporter"] = 780535461] = "BuildArchiveImporter";
1453
+ ClassIDType3[ClassIDType3["PreviewImporter"] = 815301076] = "PreviewImporter";
1454
+ ClassIDType3[ClassIDType3["RayTracingShader"] = 825902497] = "RayTracingShader";
1455
+ ClassIDType3[ClassIDType3["LightingSettings"] = 850595691] = "LightingSettings";
1456
+ ClassIDType3[ClassIDType3["PlatformModuleSetup"] = 877146078] = "PlatformModuleSetup";
1457
+ ClassIDType3[ClassIDType3["VersionControlSettings"] = 890905787] = "VersionControlSettings";
1458
+ ClassIDType3[ClassIDType3["CustomCollider2D"] = 893571522] = "CustomCollider2D";
1459
+ ClassIDType3[ClassIDType3["AimConstraint"] = 895512359] = "AimConstraint";
1460
+ ClassIDType3[ClassIDType3["VFXManager"] = 937362698] = "VFXManager";
1461
+ ClassIDType3[ClassIDType3["RoslynAnalyzerConfigAsset"] = 947337230] = "RoslynAnalyzerConfigAsset";
1462
+ ClassIDType3[ClassIDType3["RuleSetFileAsset"] = 954905827] = "RuleSetFileAsset";
1463
+ ClassIDType3[ClassIDType3["VisualEffectSubgraph"] = 994735392] = "VisualEffectSubgraph";
1464
+ ClassIDType3[ClassIDType3["VisualEffectSubgraphOperator"] = 994735403] = "VisualEffectSubgraphOperator";
1465
+ ClassIDType3[ClassIDType3["VisualEffectSubgraphBlock"] = 994735404] = "VisualEffectSubgraphBlock";
1466
+ ClassIDType3[ClassIDType3["LocalizationImporter"] = 1027052791] = "LocalizationImporter";
1467
+ ClassIDType3[ClassIDType3["Derived"] = 1091556383] = "Derived";
1468
+ ClassIDType3[ClassIDType3["PropertyModificationsTargetTestObject"] = 1111377672] = "PropertyModificationsTargetTestObject";
1469
+ ClassIDType3[ClassIDType3["ReferencesArtifactGenerator"] = 1114811875] = "ReferencesArtifactGenerator";
1470
+ ClassIDType3[ClassIDType3["AssemblyDefinitionAsset"] = 1152215463] = "AssemblyDefinitionAsset";
1471
+ ClassIDType3[ClassIDType3["SceneVisibilityState"] = 1154873562] = "SceneVisibilityState";
1472
+ ClassIDType3[ClassIDType3["LookAtConstraint"] = 1183024399] = "LookAtConstraint";
1473
+ ClassIDType3[ClassIDType3["SpriteAtlasImporter"] = 1210832254] = "SpriteAtlasImporter";
1474
+ ClassIDType3[ClassIDType3["MultiArtifactTestImporter"] = 1223240404] = "MultiArtifactTestImporter";
1475
+ ClassIDType3[ClassIDType3["AudioContainerElement"] = 1233149941] = "AudioContainerElement";
1476
+ ClassIDType3[ClassIDType3["GameObjectRecorder"] = 1268269756] = "GameObjectRecorder";
1477
+ ClassIDType3[ClassIDType3["AudioRandomContainer"] = 1307931743] = "AudioRandomContainer";
1478
+ ClassIDType3[ClassIDType3["LightingDataAssetParent"] = 1325145578] = "LightingDataAssetParent";
1479
+ ClassIDType3[ClassIDType3["PresetManager"] = 1386491679] = "PresetManager";
1480
+ ClassIDType3[ClassIDType3["TestObjectWithSpecialLayoutTwo"] = 1392443030] = "TestObjectWithSpecialLayoutTwo";
1481
+ ClassIDType3[ClassIDType3["StreamingManager"] = 1403656975] = "StreamingManager";
1482
+ ClassIDType3[ClassIDType3["LowerResBlitTexture"] = 1480428607] = "LowerResBlitTexture";
1483
+ ClassIDType3[ClassIDType3["VideoBuildInfo"] = 1521398425] = "VideoBuildInfo";
1484
+ ClassIDType3[ClassIDType3["C4DImporter"] = 1541671625] = "C4DImporter";
1485
+ ClassIDType3[ClassIDType3["StreamingController"] = 1542919678] = "StreamingController";
1486
+ ClassIDType3[ClassIDType3["RenderPassAttachment"] = 1571458007] = "RenderPassAttachment";
1487
+ ClassIDType3[ClassIDType3["TestObjectVectorPairStringBool"] = 1628831178] = "TestObjectVectorPairStringBool";
1488
+ ClassIDType3[ClassIDType3["ShaderContainer"] = 1557264870] = "ShaderContainer";
1489
+ ClassIDType3[ClassIDType3["RoslynAdditionalFileAsset"] = 1597193336] = "RoslynAdditionalFileAsset";
1490
+ ClassIDType3[ClassIDType3["RoslynAdditionalFileImporter"] = 1642787288] = "RoslynAdditionalFileImporter";
1491
+ ClassIDType3[ClassIDType3["MultiplayerRolesData"] = 1652712579] = "MultiplayerRolesData";
1492
+ ClassIDType3[ClassIDType3["SceneRoots"] = 1660057539] = "SceneRoots";
1493
+ ClassIDType3[ClassIDType3["BrokenPrefabAsset"] = 1731078267] = "BrokenPrefabAsset";
1494
+ ClassIDType3[ClassIDType3["AndroidAssetPackImporter"] = 1736697216] = "AndroidAssetPackImporter";
1495
+ ClassIDType3[ClassIDType3["VulkanDeviceFilterLists"] = 1740304944] = "VulkanDeviceFilterLists";
1496
+ ClassIDType3[ClassIDType3["GridLayout"] = 1742807556] = "GridLayout";
1497
+ ClassIDType3[ClassIDType3["AssemblyDefinitionImporter"] = 1766753193] = "AssemblyDefinitionImporter";
1498
+ ClassIDType3[ClassIDType3["ParentConstraint"] = 1773428102] = "ParentConstraint";
1499
+ ClassIDType3[ClassIDType3["FakeComponent"] = 1803986026] = "FakeComponent";
1500
+ ClassIDType3[ClassIDType3["RuleSetFileImporter"] = 1777034230] = "RuleSetFileImporter";
1501
+ ClassIDType3[ClassIDType3["PositionConstraint"] = 1818360608] = "PositionConstraint";
1502
+ ClassIDType3[ClassIDType3["RotationConstraint"] = 1818360609] = "RotationConstraint";
1503
+ ClassIDType3[ClassIDType3["ScaleConstraint"] = 1818360610] = "ScaleConstraint";
1504
+ ClassIDType3[ClassIDType3["Tilemap"] = 1839735485] = "Tilemap";
1505
+ ClassIDType3[ClassIDType3["PackageManifest"] = 1896753125] = "PackageManifest";
1506
+ ClassIDType3[ClassIDType3["PackageManifestImporter"] = 1896753126] = "PackageManifestImporter";
1507
+ ClassIDType3[ClassIDType3["RoslynAnalyzerConfigImporter"] = 1903396204] = "RoslynAnalyzerConfigImporter";
1508
+ ClassIDType3[ClassIDType3["UIRenderer"] = 1931382933] = "UIRenderer";
1509
+ ClassIDType3[ClassIDType3["TerrainLayer"] = 1953259897] = "TerrainLayer";
1510
+ ClassIDType3[ClassIDType3["SpriteShapeRenderer"] = 1971053207] = "SpriteShapeRenderer";
1511
+ ClassIDType3[ClassIDType3["NativeObjectType"] = 1977754360] = "NativeObjectType";
1512
+ ClassIDType3[ClassIDType3["TestObjectWithSerializedMapStringBool"] = 1981279845] = "TestObjectWithSerializedMapStringBool";
1513
+ ClassIDType3[ClassIDType3["SerializableManagedHost"] = 1995898324] = "SerializableManagedHost";
1514
+ ClassIDType3[ClassIDType3["VisualEffectAsset"] = 2058629509] = "VisualEffectAsset";
1515
+ ClassIDType3[ClassIDType3["VisualEffectImporter"] = 2058629510] = "VisualEffectImporter";
1516
+ ClassIDType3[ClassIDType3["VisualEffectResource"] = 2058629511] = "VisualEffectResource";
1517
+ ClassIDType3[ClassIDType3["VisualEffectObject"] = 2059678085] = "VisualEffectObject";
1518
+ ClassIDType3[ClassIDType3["VisualEffect"] = 2083052967] = "VisualEffect";
1519
+ ClassIDType3[ClassIDType3["LocalizationAsset"] = 2083778819] = "LocalizationAsset";
1520
+ ClassIDType3[ClassIDType3["ScriptedImporter"] = 2089858483] = "ScriptedImporter";
1521
+ ClassIDType3[ClassIDType3["ShaderIncludeImporter"] = 2103361453] = "ShaderIncludeImporter";
1522
+ return ClassIDType3;
1523
+ })(ClassIDType || {});
1524
+
1188
1525
  // src/Files/Bundle/Models/BundleHeader.ts
1189
1526
  var BundleHeader = class {
1190
1527
  signature = "";
@@ -2358,14 +2695,14 @@ function Decompress(input, output, type, uncompressedSize) {
2358
2695
  let lzmaStream = buildLzmaStream(input, uncompressedSize);
2359
2696
  let decompressed = decompressSync(lzmaStream);
2360
2697
  if (typeof decompressed === "string") {
2361
- console.error("LZMA Decompressor returned string.");
2698
+ logger.error("LZMA Decompressor returned string.");
2362
2699
  break;
2363
2700
  }
2364
2701
  numWrite = decompressed.length;
2365
2702
  output.set(decompressed);
2366
2703
  break;
2367
2704
  default:
2368
- console.error(`CompressionType not supported: ${type}`);
2705
+ logger.error(`CompressionType not supported: ${type}`);
2369
2706
  }
2370
2707
  return numWrite;
2371
2708
  }
@@ -2395,7 +2732,7 @@ var BundleFile = class {
2395
2732
  switch (this.m_Header.signature) {
2396
2733
  case "UnityFS":
2397
2734
  this.m_Header.ReadHeader2(reader);
2398
- console.log(this.m_Header);
2735
+ logger.trace(this.m_Header);
2399
2736
  if (this.m_Header.size > reader.view.byteLength) {
2400
2737
  throw new Error(`Bundle size is wrong. Header claims ${this.m_Header.size}, reader is ${reader.view.byteLength}`);
2401
2738
  }
@@ -2460,13 +2797,13 @@ var BundleFile = class {
2460
2797
  for (let i = 0; i < blocksInfoCount; i++) {
2461
2798
  this.m_BlocksInfo[i] = new BundleStorageBlock(blocksInfoReader);
2462
2799
  }
2463
- console.log(this.m_BlocksInfo);
2800
+ logger.trace(this.m_BlocksInfo);
2464
2801
  const nodesCount = blocksInfoReader.ReadInt32();
2465
2802
  this.m_DirectoryInfo = new Array(nodesCount);
2466
2803
  for (let i = 0; i < nodesCount; i++) {
2467
2804
  this.m_DirectoryInfo[i] = new BundleNode(blocksInfoReader);
2468
2805
  }
2469
- console.log(this.m_DirectoryInfo);
2806
+ logger.trace(this.m_DirectoryInfo);
2470
2807
  if ((this.m_Header.flags & 512 /* BlockInfoNeedPaddingAtStart */) != 0) {
2471
2808
  reader.AlignStream(16);
2472
2809
  }
@@ -2498,12 +2835,12 @@ var BundleFile = class {
2498
2835
  reader.ReadBytes(blockInfo.compressedSize, compressedBuff);
2499
2836
  numWrite = Decompress(compressedBuff, uncompressedBuff, compressionType, blockInfo.uncompressedSize);
2500
2837
  if (numWrite !== blockInfo.uncompressedSize) {
2501
- console.error(`Decompression error. Expected ${blockInfo.uncompressedSize} got ${numWrite}`);
2838
+ logger.error(`Decompression error. Expected ${blockInfo.uncompressedSize} got ${numWrite}`);
2502
2839
  }
2503
2840
  chunks.push(uncompressedBuff);
2504
2841
  break;
2505
2842
  default:
2506
- console.warn(`Cannot decompress block type: ${compressionType}`);
2843
+ logger.warn(`Cannot decompress block type: ${compressionType}`);
2507
2844
  }
2508
2845
  }
2509
2846
  const blocksUncompressedSize = this.m_BlocksInfo.reduce((sum, x) => sum + x.uncompressedSize, 0);
@@ -2515,351 +2852,151 @@ var BundleFile = class {
2515
2852
  }
2516
2853
  return blockStream.buffer;
2517
2854
  }
2518
- ReadFiles(buffer, blocksOffset = 0) {
2519
- for (const node of this.m_DirectoryInfo) {
2520
- const fileName = path_default.basename(node.path);
2521
- const start = Number(node.offset) + blocksOffset;
2522
- const fileBuffer = buffer.slice(start, start + Number(node.size));
2523
- const stream = new EndianBinaryReader(fileBuffer);
2524
- if (stream.isAllZero()) {
2525
- console.warn(`${fileName} ${node.path} is all zero`);
2526
- }
2527
- let file = new StreamFile(node.path, fileName, stream);
2528
- this.fileList.push(file);
2529
- }
2530
- }
2531
- };
2532
-
2533
- // src/Files/Serialized/Models/SerializedFileHeader.ts
2534
- var SerializedFileHeader = class {
2535
- m_MetadataSize = 0;
2536
- m_FileSize = 0n;
2537
- m_Version = 1 /* Unsupported */;
2538
- m_DataOffset = 0n;
2539
- m_Endianess = 0;
2540
- m_Reserved = new Uint8Array();
2541
- ReadHeader(reader) {
2542
- this.m_MetadataSize = reader.ReadUint32();
2543
- this.m_FileSize = BigInt(reader.ReadUint32());
2544
- this.m_Version = reader.ReadUint32();
2545
- this.m_DataOffset = BigInt(reader.ReadUint32());
2546
- if (this.m_Version >= 9 /* Unknown_9 */) {
2547
- this.m_Endianess = reader.ReadByte();
2548
- this.m_Reserved = new Uint8Array(reader.ReadBytes(3));
2549
- } else {
2550
- reader.offset = Number(this.m_FileSize - BigInt(this.m_MetadataSize));
2551
- this.m_Endianess = reader.ReadByte();
2552
- }
2553
- if (this.m_Version >= 22 /* LargeFilesSupport */) {
2554
- this.m_MetadataSize = reader.ReadUint32();
2555
- this.m_FileSize = reader.ReadUint64();
2556
- this.m_DataOffset = reader.ReadUint64();
2557
- reader.ReadInt64();
2558
- }
2559
- }
2560
- };
2561
-
2562
- // src/Files/Serialized/Models/TypeTreeNode.ts
2563
- var TypeTreeNode = class {
2564
- m_Type = "";
2565
- m_Name = "";
2566
- m_ByteSize = 0;
2567
- m_Index = 0;
2568
- m_TypeFlags = 0;
2569
- m_Version = 0;
2570
- m_MetaFlag = 0;
2571
- m_Level = 0;
2572
- m_TypeStrOffset = 0;
2573
- m_NameStrOffset = 0;
2574
- m_RefTypeHash = 0n;
2575
- };
2576
-
2577
- // src/Files/Serialized/Models/CommonStrings.ts
2578
- var CommonStrings = /* @__PURE__ */ new Map([
2579
- [0, "AABB"],
2580
- [5, "AnimationClip"],
2581
- [19, "AnimationCurve"],
2582
- [34, "AnimationState"],
2583
- [49, "Array"],
2584
- [55, "Base"],
2585
- [60, "BitField"],
2586
- [69, "bitset"],
2587
- [76, "bool"],
2588
- [81, "char"],
2589
- [86, "ColorRGBA"],
2590
- [96, "Component"],
2591
- [106, "data"],
2592
- [111, "deque"],
2593
- [117, "double"],
2594
- [124, "dynamic_array"],
2595
- [138, "FastPropertyName"],
2596
- [155, "first"],
2597
- [161, "float"],
2598
- [167, "Font"],
2599
- [172, "GameObject"],
2600
- [183, "Generic Mono"],
2601
- [196, "GradientNEW"],
2602
- [208, "GUID"],
2603
- [213, "GUIStyle"],
2604
- [222, "int"],
2605
- [226, "list"],
2606
- [231, "long long"],
2607
- [241, "map"],
2608
- [245, "Matrix4x4f"],
2609
- [256, "MdFour"],
2610
- [263, "MonoBehaviour"],
2611
- [277, "MonoScript"],
2612
- [288, "m_ByteSize"],
2613
- [299, "m_Curve"],
2614
- [307, "m_EditorClassIdentifier"],
2615
- [331, "m_EditorHideFlags"],
2616
- [349, "m_Enabled"],
2617
- [359, "m_ExtensionPtr"],
2618
- [374, "m_GameObject"],
2619
- [387, "m_Index"],
2620
- [395, "m_IsArray"],
2621
- [405, "m_IsStatic"],
2622
- [416, "m_MetaFlag"],
2623
- [427, "m_Name"],
2624
- [434, "m_ObjectHideFlags"],
2625
- [452, "m_PrefabInternal"],
2626
- [469, "m_PrefabParentObject"],
2627
- [490, "m_Script"],
2628
- [499, "m_StaticEditorFlags"],
2629
- [519, "m_Type"],
2630
- [526, "m_Version"],
2631
- [536, "Object"],
2632
- [543, "pair"],
2633
- [548, "PPtr<Component>"],
2634
- [564, "PPtr<GameObject>"],
2635
- [581, "PPtr<Material>"],
2636
- [596, "PPtr<MonoBehaviour>"],
2637
- [616, "PPtr<MonoScript>"],
2638
- [633, "PPtr<Object>"],
2639
- [646, "PPtr<Prefab>"],
2640
- [659, "PPtr<Sprite>"],
2641
- [672, "PPtr<TextAsset>"],
2642
- [688, "PPtr<Texture>"],
2643
- [702, "PPtr<Texture2D>"],
2644
- [718, "PPtr<Transform>"],
2645
- [734, "Prefab"],
2646
- [741, "Quaternionf"],
2647
- [753, "Rectf"],
2648
- [759, "RectInt"],
2649
- [767, "RectOffset"],
2650
- [778, "second"],
2651
- [785, "set"],
2652
- [789, "short"],
2653
- [795, "size"],
2654
- [800, "SInt16"],
2655
- [807, "SInt32"],
2656
- [814, "SInt64"],
2657
- [821, "SInt8"],
2658
- [827, "staticvector"],
2659
- [840, "string"],
2660
- [847, "TextAsset"],
2661
- [857, "TextMesh"],
2662
- [866, "Texture"],
2663
- [874, "Texture2D"],
2664
- [884, "Transform"],
2665
- [894, "TypelessData"],
2666
- [907, "UInt16"],
2667
- [914, "UInt32"],
2668
- [921, "UInt64"],
2669
- [928, "UInt8"],
2670
- [934, "unsigned int"],
2671
- [947, "unsigned long long"],
2672
- [966, "unsigned short"],
2673
- [981, "vector"],
2674
- [988, "Vector2f"],
2675
- [997, "Vector3f"],
2676
- [1006, "Vector4f"],
2677
- [1015, "m_ScriptingClassIdentifier"],
2678
- [1042, "Gradient"],
2679
- [1051, "Type*"],
2680
- [1057, "int2_storage"],
2681
- [1070, "int3_storage"],
2682
- [1083, "BoundsInt"],
2683
- [1093, "m_CorrespondingSourceObject"],
2684
- [1121, "m_PrefabInstance"],
2685
- [1138, "m_PrefabAsset"],
2686
- [1152, "FileSize"],
2687
- [1161, "Hash128"],
2688
- [1169, "RenderingLayerMask"],
2689
- [1188, "fixed_array"],
2690
- [1200, "EntityId"]
2691
- ]);
2692
-
2693
- // src/Files/Serialized/Models/TypeTree.ts
2694
- var TypeTree = class {
2695
- m_Nodes = [];
2696
- m_StringBuffer = new Uint8Array();
2697
- BlobRead(reader, m_Version) {
2698
- const nodeCount = reader.ReadInt32();
2699
- const stringBufferSize = reader.ReadInt32();
2700
- for (let i = 0; i < nodeCount; i++) {
2701
- const typeTreeNode = new TypeTreeNode();
2702
- this.m_Nodes.push(typeTreeNode);
2703
- typeTreeNode.m_Version = reader.ReadUint16();
2704
- typeTreeNode.m_Level = reader.ReadByte();
2705
- typeTreeNode.m_TypeFlags = reader.ReadByte();
2706
- typeTreeNode.m_TypeStrOffset = reader.ReadUint32();
2707
- typeTreeNode.m_NameStrOffset = reader.ReadUint32();
2708
- typeTreeNode.m_ByteSize = reader.ReadInt32();
2709
- typeTreeNode.m_Index = reader.ReadInt32();
2710
- typeTreeNode.m_MetaFlag = reader.ReadInt32();
2711
- if (m_Version >= 19 /* TypeTreeNodeWithTypeFlags */) {
2712
- typeTreeNode.m_RefTypeHash = reader.ReadUint64();
2855
+ ReadFiles(buffer, blocksOffset = 0) {
2856
+ for (const node of this.m_DirectoryInfo) {
2857
+ const fileName = path_default.basename(node.path);
2858
+ const start = Number(node.offset) + blocksOffset;
2859
+ const fileBuffer = buffer.slice(start, start + Number(node.size));
2860
+ const stream = new EndianBinaryReader(fileBuffer);
2861
+ if (stream.isAllZero()) {
2862
+ logger.warn(`${fileName} ${node.path} is all zero`);
2713
2863
  }
2864
+ let file = new StreamFile(node.path, fileName, stream);
2865
+ this.fileList.push(file);
2714
2866
  }
2715
- this.m_StringBuffer = new Uint8Array(reader.ReadBytes(stringBufferSize));
2716
- for (let i = 0; i < nodeCount; i++) {
2717
- this.m_Nodes[i].m_Type = this.ReadString(this.m_StringBuffer, this.m_Nodes[i].m_TypeStrOffset);
2718
- this.m_Nodes[i].m_Name = this.ReadString(this.m_StringBuffer, this.m_Nodes[i].m_TypeStrOffset);
2867
+ }
2868
+ };
2869
+
2870
+ // src/Managers/AssetsManager.ts
2871
+ var AssetsManager = class {
2872
+ loadedAssetsFileNames = [];
2873
+ loadedAssetsFiles = [];
2874
+ resourceReaders = /* @__PURE__ */ new Map();
2875
+ unityObjs = /* @__PURE__ */ new Map();
2876
+ LoadFile(data, name) {
2877
+ const endianReader = new EndianBinaryReader(data);
2878
+ const fileReader = new FileReader(name, endianReader);
2879
+ this.LoadFileByType(fileReader);
2880
+ }
2881
+ GetState(remote = false) {
2882
+ return {
2883
+ loadedAssetsFileNames: this.loadedAssetsFileNames,
2884
+ loadedAssetsFiles: this.loadedAssetsFiles,
2885
+ unityObjs: remote ? Array.from(this.unityObjs.entries()).map(([id, obj]) => ({
2886
+ id,
2887
+ type: obj.constructor.name,
2888
+ ...obj instanceof NamedObject ? { name: obj.m_Name } : {},
2889
+ classID: obj.classID,
2890
+ methods: this.GetMethods(obj)
2891
+ })) : this.unityObjs
2892
+ };
2893
+ }
2894
+ GetMethods(obj) {
2895
+ const methods = /* @__PURE__ */ new Set();
2896
+ let prototype = Object.getPrototypeOf(obj);
2897
+ while (prototype && prototype !== Object.prototype) {
2898
+ for (const name of Object.getOwnPropertyNames(prototype)) {
2899
+ if (name !== "constructor" && typeof obj[name] === "function") {
2900
+ methods.add(name);
2901
+ }
2902
+ }
2903
+ prototype = Object.getPrototypeOf(prototype);
2719
2904
  }
2905
+ return [...methods];
2720
2906
  }
2721
- ReadString(bytes, value) {
2722
- const isOffset = (value & 2147483648) === 0;
2723
- if (isOffset) {
2724
- return this.ReadNullTerminatedString(bytes, value);
2907
+ async CallObject(id, method, args) {
2908
+ const obj = this.unityObjs.get(id);
2909
+ if (!obj) {
2910
+ throw new Error(`Object ${id} not found`);
2725
2911
  }
2726
- const offset = value & 2147483647;
2727
- const str = CommonStrings.get(offset);
2728
- if (str !== void 0) {
2729
- return str;
2912
+ const fn = obj[method];
2913
+ if (typeof fn !== "function" || method === "constructor") {
2914
+ throw new Error(`Method ${method} not found`);
2730
2915
  }
2731
- return offset.toString();
2916
+ return await fn.apply(obj, args);
2732
2917
  }
2733
- ReadNullTerminatedString(bytes, offset) {
2734
- const start = offset;
2735
- while (bytes[offset] !== 0) {
2736
- offset++;
2918
+ LoadFileByType(reader) {
2919
+ switch (reader.FileType) {
2920
+ case 1 /* BundleFile */:
2921
+ this.LoadBundleFile(reader);
2737
2922
  }
2738
- return new TextDecoder().decode(bytes.slice(start, offset));
2923
+ this.ReadAssets();
2739
2924
  }
2740
- ReadTypeTree(reader, m_Version, level = 0) {
2741
- const typeTreeNode = new TypeTreeNode();
2742
- this.m_Nodes.push(typeTreeNode);
2743
- typeTreeNode.m_Level = level;
2744
- typeTreeNode.m_Type = reader.ReadStringToNull();
2745
- typeTreeNode.m_Name = reader.ReadStringToNull();
2746
- typeTreeNode.m_ByteSize = reader.ReadInt32();
2747
- if (m_Version == 2 /* Unknown_2 */) {
2748
- reader.ReadInt32();
2925
+ LoadBundleFile(reader) {
2926
+ const bundleFile = new BundleFile(reader, false);
2927
+ logger.trace(bundleFile);
2928
+ let isLoaded = this.LoadBundleFiles(reader, bundleFile);
2929
+ if (bundleFile.IsDataAfterBundle) {
2930
+ throw new Error("Data after bundle not supported");
2749
2931
  }
2750
- if (m_Version != 3 /* Unknown_3 */) {
2751
- typeTreeNode.m_Index = reader.ReadInt32();
2932
+ return isLoaded;
2933
+ }
2934
+ LoadBundleFiles(reader, bundle) {
2935
+ for (const file of bundle.fileList) {
2936
+ if (file.stream.isAllZero()) {
2937
+ continue;
2938
+ }
2939
+ file.stream.offset = 0;
2940
+ const dummyPath = path_default.join(path_default.dirname(reader.FullPath), file.fileName);
2941
+ const subReader = new FileReader(dummyPath, file.stream);
2942
+ if (subReader.FileType == 0 /* AssetsFile */) {
2943
+ if (!this.LoadAssetsFromMemory(subReader, reader.FullPath, bundle.m_Header.unityRevision)) {
2944
+ return false;
2945
+ }
2946
+ } else {
2947
+ logger.debug(`Setting resS with len: ${subReader.view.byteLength}`);
2948
+ this.resourceReaders.set(file.fileName, subReader);
2949
+ }
2752
2950
  }
2753
- typeTreeNode.m_TypeFlags = reader.ReadInt32();
2754
- typeTreeNode.m_Version = reader.ReadInt32();
2755
- if (m_Version != 3 /* Unknown_3 */) {
2756
- typeTreeNode.m_MetaFlag = reader.ReadInt32();
2951
+ return true;
2952
+ }
2953
+ LoadAssetsFromMemory(reader, originalPath, assetBundleUnityVersion) {
2954
+ if (reader.FileName in this.loadedAssetsFileNames) {
2955
+ logger.info(`Skipping ${reader.FileName} as it is loaded already`);
2956
+ return true;
2757
2957
  }
2758
- const childCount = reader.ReadInt32();
2759
- for (let i = 0; i < childCount; i++) {
2760
- this.ReadTypeTree(reader, m_Version, ++level);
2958
+ try {
2959
+ const assetsFile = new SerializedFile(reader, this);
2960
+ assetsFile.originalPath = originalPath;
2961
+ if (assetBundleUnityVersion !== void 0 && assetsFile.header.m_Version < 7 /* Unknown_7 */) {
2962
+ assetsFile.version = assetBundleUnityVersion;
2963
+ }
2964
+ if (assetsFile.version.isStripped) {
2965
+ if (assetBundleUnityVersion === void 0) {
2966
+ throw new Error("AssetsFile UnityVersion was stripped and could not be found");
2967
+ }
2968
+ logger.warn(`AssetsFile UnityVersion was stripped. Assumed version is ${assetBundleUnityVersion.toString()}`);
2969
+ assetsFile.version = assetBundleUnityVersion;
2970
+ }
2971
+ this.loadedAssetsFiles.push(assetsFile);
2972
+ this.loadedAssetsFileNames.push(reader.FileName);
2973
+ } catch (err) {
2974
+ logger.warn(`Failed to load AssetsFile: ${reader.FileName} It may be a resS ${err}`);
2975
+ this.resourceReaders.set(reader.FileName, reader);
2976
+ return false;
2761
2977
  }
2978
+ return true;
2762
2979
  }
2763
- };
2764
-
2765
- // src/Files/Serialized/Models/SerializedType.ts
2766
- var SerializedType = class {
2767
- classID = 0;
2768
- m_IsStrippedType = false;
2769
- m_ScriptTypeIndex = -1;
2770
- m_Type = new TypeTree();
2771
- m_ScriptID = new Uint8Array();
2772
- m_OldTypeHash = new Uint8Array();
2773
- m_TypeDependencies = [];
2774
- m_KlassName = "";
2775
- m_NameSpace = "";
2776
- m_AsmName = "";
2777
- };
2778
-
2779
- // src/Files/Serialized/Models/ObjectInfo.ts
2780
- var ObjectInfo = class {
2781
- byteStart = 0n;
2782
- byteSize = 0;
2783
- typeID = 0;
2784
- classID = 0;
2785
- isDestroyed = 0;
2786
- stripped = 0;
2787
- m_PathID = 0n;
2788
- serializedType = new SerializedType();
2789
- };
2790
-
2791
- // src/Files/Serialized/Models/LocalSerializedObjectIdentifier.ts
2792
- var LocalSerializedObjectIdentifier = class {
2793
- localSerializedFileIndex = 0;
2794
- localIdentifierInFile = 0n;
2795
- };
2796
-
2797
- // src/Files/Serialized/Models/FileIdentifier.ts
2798
- var FileIdentifier = class {
2799
- guid = "";
2800
- type = 0;
2801
- pathName = "";
2802
- };
2803
-
2804
- // src/Util/ObjectReader.ts
2805
- var ObjectReader = class extends EndianBinaryReader {
2806
- assetsFile;
2807
- m_PathID = 0n;
2808
- byteStart = 0n;
2809
- byteSize = 0;
2810
- classID = 0;
2811
- type;
2812
- serializedType;
2813
- platform;
2814
- m_Version;
2815
- version;
2816
- constructor(reader, assetsFile, objectInfo) {
2817
- super(reader.buffer, reader.endian);
2818
- this.offset = Number(objectInfo.byteStart);
2819
- this.baseOffset = Number(objectInfo.byteStart);
2820
- this.length = objectInfo.byteSize;
2821
- this.assetsFile = assetsFile;
2822
- this.m_PathID = objectInfo.m_PathID;
2823
- this.byteStart = objectInfo.byteStart;
2824
- this.byteSize = objectInfo.byteSize;
2825
- this.classID = objectInfo.classID;
2826
- this.type = objectInfo.classID in ClassIDType ? objectInfo.classID : -1 /* UnknownType */;
2827
- this.serializedType = objectInfo.serializedType;
2828
- this.platform = assetsFile.m_TargetPlatform;
2829
- this.m_Version = assetsFile.header.m_Version;
2830
- this.version = assetsFile.version;
2831
- }
2832
- };
2833
-
2834
- // src/Classes/Object.ts
2835
- var UnityObject = class {
2836
- assetsFile;
2837
- reader;
2838
- m_PathID;
2839
- version;
2840
- platform;
2841
- type;
2842
- serializedType;
2843
- classID;
2844
- byteSize;
2845
- constructor(reader) {
2846
- this.reader = reader;
2847
- this.assetsFile = reader.assetsFile;
2848
- this.type = reader.type;
2849
- this.m_PathID = reader.m_PathID;
2850
- this.version = reader.version;
2851
- this.platform = reader.platform;
2852
- this.serializedType = reader.serializedType;
2853
- this.classID = reader.classID;
2854
- this.byteSize = reader.byteSize;
2855
- if (this.platform === -2 /* NoTarget */) {
2856
- reader.ReadUint32();
2980
+ ReadAssets() {
2981
+ for (let assetsFile of this.loadedAssetsFiles) {
2982
+ for (let objectInfo of assetsFile.m_Objects) {
2983
+ let objectReader = new ObjectReader(assetsFile.reader, assetsFile, objectInfo);
2984
+ let obj = null;
2985
+ if (objectReader.type == 28 /* Texture2D */) {
2986
+ obj = new Texture2D(objectReader);
2987
+ } else {
2988
+ obj = new UnityObject(objectReader);
2989
+ }
2990
+ if (obj !== null) {
2991
+ assetsFile.AddObject(obj);
2992
+ }
2993
+ }
2857
2994
  }
2858
2995
  }
2859
2996
  };
2860
2997
 
2861
2998
  // src/Files/Serialized/SerializedFile.ts
2862
- var SerializedFile3 = class {
2999
+ var SerializedFile = class {
2863
3000
  reader;
2864
3001
  assetsManager;
2865
3002
  originalPath = "";
@@ -2986,7 +3123,7 @@ var SerializedFile3 = class {
2986
3123
  objectInfo.classID = this.reader.ReadUint16();
2987
3124
  const serializedType = this.m_Types.find((x) => x.classID === objectInfo.typeID);
2988
3125
  if (serializedType === void 0) {
2989
- console.error(`Failed to load object serializedType! ClassID: ${objectInfo.classID} TypeID: ${objectInfo.typeID}`);
3126
+ logger.error(`Failed to load object serializedType! ClassID: ${objectInfo.classID} TypeID: ${objectInfo.typeID}`);
2990
3127
  continue;
2991
3128
  }
2992
3129
  objectInfo.serializedType = serializedType;
@@ -3046,10 +3183,68 @@ var SerializedFile3 = class {
3046
3183
  }
3047
3184
  }
3048
3185
  }
3049
- AddObject(obj) {
3050
- this.ObjectList.push(obj);
3051
- this.ObjectMap.set(obj.m_PathID, obj);
3052
- }
3186
+ AddObject(obj) {
3187
+ this.ObjectList.push(obj);
3188
+ this.ObjectMap.set(obj.m_PathID, obj);
3189
+ this.assetsManager.unityObjs.set(obj.m_PathID, obj);
3190
+ }
3191
+ };
3192
+
3193
+ // src/Util/ObjectReader.ts
3194
+ var ObjectReader = class extends EndianBinaryReader {
3195
+ assetsFile;
3196
+ m_PathID = 0n;
3197
+ byteStart = 0n;
3198
+ byteSize = 0;
3199
+ classID = 0;
3200
+ type;
3201
+ serializedType;
3202
+ platform;
3203
+ m_Version;
3204
+ version;
3205
+ constructor(reader, assetsFile, objectInfo) {
3206
+ super(reader.buffer, reader.endian);
3207
+ this.offset = Number(objectInfo.byteStart);
3208
+ this.baseOffset = Number(objectInfo.byteStart);
3209
+ this.length = objectInfo.byteSize;
3210
+ this.assetsFile = assetsFile;
3211
+ this.m_PathID = objectInfo.m_PathID;
3212
+ this.byteStart = objectInfo.byteStart;
3213
+ this.byteSize = objectInfo.byteSize;
3214
+ this.classID = objectInfo.classID;
3215
+ this.type = objectInfo.classID in ClassIDType ? objectInfo.classID : -1 /* UnknownType */;
3216
+ this.serializedType = objectInfo.serializedType;
3217
+ this.platform = assetsFile.m_TargetPlatform;
3218
+ this.m_Version = assetsFile.header.m_Version;
3219
+ this.version = assetsFile.version;
3220
+ }
3221
+ };
3222
+
3223
+ // src/Classes/Object.ts
3224
+ var UnityObject = class {
3225
+ assetsFile;
3226
+ reader;
3227
+ m_PathID;
3228
+ version;
3229
+ platform;
3230
+ type;
3231
+ serializedType;
3232
+ classID;
3233
+ byteSize;
3234
+ constructor(reader) {
3235
+ this.reader = reader;
3236
+ this.assetsFile = reader.assetsFile;
3237
+ this.type = reader.type;
3238
+ this.m_PathID = reader.m_PathID;
3239
+ this.version = reader.version;
3240
+ this.platform = reader.platform;
3241
+ this.serializedType = reader.serializedType;
3242
+ this.classID = reader.classID;
3243
+ this.byteSize = reader.byteSize;
3244
+ if (this.platform === -2 /* NoTarget */) {
3245
+ reader.ReadUint32();
3246
+ }
3247
+ }
3053
3248
  };
3054
3249
 
3055
3250
  // src/Classes/PPtr.ts
@@ -3223,90 +3418,6 @@ var StreamingInfo = class {
3223
3418
  }
3224
3419
  };
3225
3420
 
3226
- // src/Classes/Texture2D.ts
3227
- var Texture2D = class extends Texture {
3228
- m_Width;
3229
- m_Height;
3230
- m_CompleteImageSize;
3231
- m_TextureFormat;
3232
- m_MipMap;
3233
- m_MipCount;
3234
- m_TextureSettings;
3235
- m_ImageCount;
3236
- m_PlatformBlob;
3237
- image_data;
3238
- m_StreamData;
3239
- constructor(reader) {
3240
- super(reader);
3241
- this.m_Width = reader.ReadInt32();
3242
- this.m_Height = reader.ReadInt32();
3243
- this.m_CompleteImageSize = reader.ReadUint32();
3244
- if (reader.version.major >= 2020) {
3245
- reader.ReadInt32();
3246
- }
3247
- this.m_TextureFormat = reader.ReadInt32();
3248
- if (reader.version.compareTo([5, 2]) < 0) {
3249
- this.m_MipMap = reader.ReadBoolean();
3250
- this.m_MipCount = 0;
3251
- } else {
3252
- this.m_MipMap = false;
3253
- this.m_MipCount = reader.ReadInt32();
3254
- }
3255
- if (reader.version.compareTo([2, 6]) >= 0) {
3256
- reader.ReadBoolean();
3257
- }
3258
- if (reader.version.major >= 2020) {
3259
- reader.ReadBoolean();
3260
- }
3261
- if (reader.version.compareTo([2019, 3]) >= 0) {
3262
- if (reader.version.compareTo([2022, 2]) >= 0) {
3263
- reader.ReadBoolean();
3264
- reader.AlignStream(4);
3265
- }
3266
- reader.ReadBoolean();
3267
- }
3268
- if (reader.version.compareTo([3, 0]) >= 0 && reader.version.compareTo([5, 5]) < 0) {
3269
- reader.ReadBoolean();
3270
- }
3271
- if (reader.version.compareTo([2022, 2]) >= 0) {
3272
- reader.ReadAlignedString();
3273
- }
3274
- if (reader.version.compareTo([2018, 2]) >= 0) {
3275
- reader.ReadBoolean();
3276
- }
3277
- reader.AlignStream(4);
3278
- if (reader.version.compareTo([2018, 2]) >= 0) {
3279
- reader.ReadInt32();
3280
- }
3281
- this.m_ImageCount = reader.ReadInt32();
3282
- reader.ReadInt32();
3283
- this.m_TextureSettings = new GLTextureSettings(reader);
3284
- if (reader.version.major >= 3) {
3285
- reader.ReadInt32();
3286
- }
3287
- if (reader.version.compareTo([3, 5]) >= 0) {
3288
- reader.ReadInt32();
3289
- }
3290
- if (reader.version.compareTo([2022, 2]) >= 0) {
3291
- this.m_PlatformBlob = new Uint8Array(reader.ReadBytes(reader.ReadInt32()));
3292
- reader.AlignStream(4);
3293
- } else {
3294
- this.m_PlatformBlob = new Uint8Array();
3295
- }
3296
- const imageDataSize = reader.ReadInt32();
3297
- if (imageDataSize == 0 && reader.version.compareTo([5, 3])) {
3298
- this.m_StreamData = new StreamingInfo(reader);
3299
- } else {
3300
- this.m_StreamData = new StreamingInfo();
3301
- }
3302
- if (this.m_StreamData.path !== "") {
3303
- this.image_data = new ResourceReader(reader, this.m_StreamData.size, Number(this.m_StreamData.offset), this.m_StreamData.path);
3304
- } else {
3305
- this.image_data = new ResourceReader(reader, imageDataSize, reader.offset, "", true);
3306
- }
3307
- }
3308
- };
3309
-
3310
3421
  // src/Exporters/ImageDecoders/header-info.ts
3311
3422
  var formatSizes = {
3312
3423
  "BC1": { blockWidth: 4, blockHeight: 4, blockSize: 8 },
@@ -5965,14 +6076,14 @@ function decodeImage(inputBuffer, imageFormat, layer) {
5965
6076
  // src/Exporters/Texture2D.ts
5966
6077
  import { encodePng } from "@lunapaint/png-codec";
5967
6078
  async function ExportTexture2D(m_Texture2D) {
5968
- console.log(`Starting export of ${m_Texture2D.m_Name}`);
6079
+ logger.debug(`Starting export of ${m_Texture2D.m_Name}`);
5969
6080
  if (m_Texture2D.image_data.size === 0 || m_Texture2D.m_Width <= 0 || m_Texture2D.m_Height <= 0) {
5970
- console.error("Tried to decode an image with no image_data, or with no size...");
6081
+ logger.error("Tried to decode an image with no image_data, or with no size...");
5971
6082
  return null;
5972
6083
  }
5973
6084
  const imageBlob = m_Texture2D.image_data.GetData();
5974
6085
  if (imageBlob === null) {
5975
- console.error("Could not read texture data from resS...");
6086
+ logger.error("Could not read texture data from resS...");
5976
6087
  return null;
5977
6088
  }
5978
6089
  let outputImage = new Uint8Array(m_Texture2D.m_Width * m_Texture2D.m_Height * 4);
@@ -6021,7 +6132,7 @@ function ExportDXT1(input, outputRef, width, height) {
6021
6132
  const decoded = decodeBC1(view, width, height);
6022
6133
  outputRef.set(decoded);
6023
6134
  } catch (err) {
6024
- console.error(`Failed to decode img: ${err}`);
6135
+ logger.error(`Failed to decode img: ${err}`);
6025
6136
  return false;
6026
6137
  }
6027
6138
  return true;
@@ -6032,7 +6143,7 @@ function ExportDXT5(input, outputRef, width, height) {
6032
6143
  const decoded = decodeBC3(view, width, height, false);
6033
6144
  outputRef.set(decoded);
6034
6145
  } catch (err) {
6035
- console.error(`Failed to decode img: ${err}`);
6146
+ logger.error(`Failed to decode img: ${err}`);
6036
6147
  return false;
6037
6148
  }
6038
6149
  return true;
@@ -6042,7 +6153,7 @@ function ExportBC7(input, outputRef, width, height) {
6042
6153
  const decoded = decodeImage(input, "BC7", { offset: 0, length: input.length, shape: { width, height } });
6043
6154
  outputRef.set(decoded);
6044
6155
  } catch (err) {
6045
- console.error(`Failed to decode img: ${err}`);
6156
+ logger.error(`Failed to decode img: ${err}`);
6046
6157
  return false;
6047
6158
  }
6048
6159
  return true;
@@ -6196,98 +6307,115 @@ function extractBitsFromUin16Array(array, shift, length) {
6196
6307
  return result;
6197
6308
  }
6198
6309
 
6199
- // src/AssetsManager.ts
6200
- var AssetsManager2 = class {
6201
- loadedAssetsFileNames = [];
6202
- loadedAssetsFiles = [];
6203
- resourceReaders = /* @__PURE__ */ new Map();
6204
- LoadFile(data, name) {
6205
- const endianReader = new EndianBinaryReader(data);
6206
- const fileReader = new FileReader(name, endianReader);
6207
- this.LoadFileByType(fileReader);
6208
- }
6209
- LoadFileByType(reader) {
6210
- switch (reader.FileType) {
6211
- case 1 /* BundleFile */:
6212
- this.LoadBundleFile(reader);
6310
+ // src/Classes/Texture2D.ts
6311
+ var Texture2D = class extends Texture {
6312
+ m_Width;
6313
+ m_Height;
6314
+ m_CompleteImageSize;
6315
+ m_TextureFormat;
6316
+ m_MipMap;
6317
+ m_MipCount;
6318
+ m_TextureSettings;
6319
+ m_ImageCount;
6320
+ m_PlatformBlob;
6321
+ image_data;
6322
+ m_StreamData;
6323
+ constructor(reader) {
6324
+ super(reader);
6325
+ this.m_Width = reader.ReadInt32();
6326
+ this.m_Height = reader.ReadInt32();
6327
+ this.m_CompleteImageSize = reader.ReadUint32();
6328
+ if (reader.version.major >= 2020) {
6329
+ reader.ReadInt32();
6213
6330
  }
6214
- this.ReadAssets();
6215
- }
6216
- LoadBundleFile(reader) {
6217
- const bundleFile = new BundleFile(reader, false);
6218
- console.log(bundleFile);
6219
- let isLoaded = this.LoadBundleFiles(reader, bundleFile);
6220
- if (bundleFile.IsDataAfterBundle) {
6221
- throw new Error("Data after bundle not supported");
6331
+ this.m_TextureFormat = reader.ReadInt32();
6332
+ if (reader.version.compareTo([5, 2]) < 0) {
6333
+ this.m_MipMap = reader.ReadBoolean();
6334
+ this.m_MipCount = 0;
6335
+ } else {
6336
+ this.m_MipMap = false;
6337
+ this.m_MipCount = reader.ReadInt32();
6222
6338
  }
6223
- return isLoaded;
6224
- }
6225
- LoadBundleFiles(reader, bundle) {
6226
- for (const file of bundle.fileList) {
6227
- if (file.stream.isAllZero()) {
6228
- continue;
6229
- }
6230
- file.stream.offset = 0;
6231
- const dummyPath = path_default.join(path_default.dirname(reader.FullPath), file.fileName);
6232
- const subReader = new FileReader(dummyPath, file.stream);
6233
- if (subReader.FileType == 0 /* AssetsFile */) {
6234
- if (!this.LoadAssetsFromMemory(subReader, reader.FullPath, bundle.m_Header.unityRevision)) {
6235
- return false;
6236
- }
6237
- } else {
6238
- console.log(`Setting resS with len: ${subReader.view.byteLength}`);
6239
- this.resourceReaders.set(file.fileName, subReader);
6240
- }
6339
+ if (reader.version.compareTo([2, 6]) >= 0) {
6340
+ reader.ReadBoolean();
6241
6341
  }
6242
- return true;
6243
- }
6244
- LoadAssetsFromMemory(reader, originalPath, assetBundleUnityVersion) {
6245
- if (reader.FileName in this.loadedAssetsFileNames) {
6246
- console.info(`Skipping ${reader.FileName} as it is loaded already`);
6247
- return true;
6342
+ if (reader.version.major >= 2020) {
6343
+ reader.ReadBoolean();
6248
6344
  }
6249
- try {
6250
- const assetsFile = new SerializedFile3(reader, this);
6251
- assetsFile.originalPath = originalPath;
6252
- if (assetBundleUnityVersion !== void 0 && assetsFile.header.m_Version < 7 /* Unknown_7 */) {
6253
- assetsFile.version = assetBundleUnityVersion;
6254
- }
6255
- if (assetsFile.version.isStripped) {
6256
- if (assetBundleUnityVersion === void 0) {
6257
- throw new Error("AssetsFile UnityVersion was stripped and could not be found");
6258
- }
6259
- console.warn(`AssetsFile UnityVersion was stripped. Assumed version is ${assetBundleUnityVersion.toString()}`);
6260
- assetsFile.version = assetBundleUnityVersion;
6345
+ if (reader.version.compareTo([2019, 3]) >= 0) {
6346
+ if (reader.version.compareTo([2022, 2]) >= 0) {
6347
+ reader.ReadBoolean();
6348
+ reader.AlignStream(4);
6261
6349
  }
6262
- this.loadedAssetsFiles.push(assetsFile);
6263
- this.loadedAssetsFileNames.push(reader.FileName);
6264
- } catch (err) {
6265
- console.warn(`Failed to load AssetsFile: ${reader.FileName} It may be a resS ${err}`);
6266
- this.resourceReaders.set(reader.FileName, reader);
6267
- return false;
6350
+ reader.ReadBoolean();
6268
6351
  }
6269
- return true;
6270
- }
6271
- ReadAssets() {
6272
- for (let assetsFile of this.loadedAssetsFiles) {
6273
- for (let objectInfo of assetsFile.m_Objects) {
6274
- let objectReader = new ObjectReader(assetsFile.reader, assetsFile, objectInfo);
6275
- let obj = null;
6276
- if (objectReader.type == 28 /* Texture2D */) {
6277
- obj = new Texture2D(objectReader);
6278
- } else {
6279
- obj = new UnityObject(objectReader);
6280
- }
6281
- if (obj !== null) {
6282
- assetsFile.AddObject(obj);
6283
- }
6284
- }
6352
+ if (reader.version.compareTo([3, 0]) >= 0 && reader.version.compareTo([5, 5]) < 0) {
6353
+ reader.ReadBoolean();
6354
+ }
6355
+ if (reader.version.compareTo([2022, 2]) >= 0) {
6356
+ reader.ReadAlignedString();
6357
+ }
6358
+ if (reader.version.compareTo([2018, 2]) >= 0) {
6359
+ reader.ReadBoolean();
6360
+ }
6361
+ reader.AlignStream(4);
6362
+ if (reader.version.compareTo([2018, 2]) >= 0) {
6363
+ reader.ReadInt32();
6364
+ }
6365
+ this.m_ImageCount = reader.ReadInt32();
6366
+ reader.ReadInt32();
6367
+ this.m_TextureSettings = new GLTextureSettings(reader);
6368
+ if (reader.version.major >= 3) {
6369
+ reader.ReadInt32();
6370
+ }
6371
+ if (reader.version.compareTo([3, 5]) >= 0) {
6372
+ reader.ReadInt32();
6373
+ }
6374
+ if (reader.version.compareTo([2022, 2]) >= 0) {
6375
+ this.m_PlatformBlob = new Uint8Array(reader.ReadBytes(reader.ReadInt32()));
6376
+ reader.AlignStream(4);
6377
+ } else {
6378
+ this.m_PlatformBlob = new Uint8Array();
6379
+ }
6380
+ const imageDataSize = reader.ReadInt32();
6381
+ if (imageDataSize == 0 && reader.version.compareTo([5, 3])) {
6382
+ this.m_StreamData = new StreamingInfo(reader);
6383
+ } else {
6384
+ this.m_StreamData = new StreamingInfo();
6385
+ }
6386
+ if (this.m_StreamData.path !== "") {
6387
+ this.image_data = new ResourceReader(reader, this.m_StreamData.size, Number(this.m_StreamData.offset), this.m_StreamData.path);
6388
+ } else {
6389
+ this.image_data = new ResourceReader(reader, imageDataSize, reader.offset, "", true);
6285
6390
  }
6286
6391
  }
6392
+ async Export() {
6393
+ return ExportTexture2D(this.toExportProps());
6394
+ }
6395
+ async GetName() {
6396
+ return this.m_Name;
6397
+ }
6398
+ toExportProps() {
6399
+ return {
6400
+ m_Name: this.m_Name,
6401
+ m_Width: this.m_Width,
6402
+ m_Height: this.m_Height,
6403
+ m_CompleteImageSize: this.m_CompleteImageSize,
6404
+ m_TextureFormat: this.m_TextureFormat,
6405
+ m_MipMap: this.m_MipMap,
6406
+ m_MipCount: this.m_MipCount,
6407
+ m_TextureSettings: this.m_TextureSettings,
6408
+ m_ImageCount: this.m_ImageCount,
6409
+ m_PlatformBlob: this.m_PlatformBlob,
6410
+ image_data: this.image_data,
6411
+ m_StreamData: this.m_StreamData
6412
+ };
6413
+ }
6287
6414
  };
6415
+
6288
6416
  export {
6289
- AssetsManager2 as AssetsManager,
6290
- ExportTexture2D,
6291
- Texture2D
6417
+ logger,
6418
+ Texture2D,
6419
+ AssetsManager
6292
6420
  };
6293
- //# sourceMappingURL=AssetsManager.js.map
6421
+ //# sourceMappingURL=chunk-JGPF42GU.js.map