├── .gitignore ├── Assembly-CSharp.csproj.DotSettings ├── Assets ├── Sample.meta ├── Sample │ ├── AnimatorController.controller │ ├── AnimatorController.controller.meta │ ├── Game.cs │ ├── Game.cs.meta │ ├── Sample.unity │ ├── Sample.unity.meta │ ├── SampleMemorySnapshot.cs │ ├── SampleMemorySnapshot.cs.meta │ ├── Unit.cs │ ├── Unit.cs.meta │ ├── UnitComponent.cs │ ├── UnitComponent.cs.meta │ ├── UnitVisualSettings.cs │ ├── UnitVisualSettings.cs.meta │ ├── UnitsGroup.cs │ └── UnitsGroup.cs.meta ├── UnityHeapCrawler.meta └── UnityHeapCrawler │ ├── CrawlItem.cs │ ├── CrawlItem.cs.meta │ ├── CrawlOrder.cs │ ├── CrawlOrder.cs.meta │ ├── CrawlSettings.cs │ ├── CrawlSettings.cs.meta │ ├── HeapSnapshotCollector.cs │ ├── HeapSnapshotCollector.cs.meta │ ├── InstanceStats.cs │ ├── InstanceStats.cs.meta │ ├── ReferenceEqualityComparer.cs │ ├── ReferenceEqualityComparer.cs.meta │ ├── SizeFormat.cs │ ├── SizeFormat.cs.meta │ ├── SizeMode.cs │ ├── SizeMode.cs.meta │ ├── SnapshotHistory.cs │ ├── SnapshotHistory.cs.meta │ ├── TypeData.cs │ ├── TypeData.cs.meta │ ├── TypeEx.cs │ ├── TypeEx.cs.meta │ ├── TypeSizeMode.cs │ ├── TypeSizeMode.cs.meta │ ├── TypeStats.cs │ └── TypeStats.cs.meta ├── Doxyfile ├── DreamMemoryAnalyzer.csproj.DotSettings ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── snapshot-example-diff ├── 2-static-fields.txt ├── 3-hierarchy.txt ├── 7-unity_objects.txt ├── generic-static-fields.txt ├── log.txt ├── types-native.txt ├── types-self.txt ├── types-total.txt └── types │ ├── Sprite.txt │ └── Texture2D.txt └── snapshot-example ├── 1-user-roots.txt ├── 2-static-fields.txt ├── 3-hierarchy.txt ├── 5-prefabs.txt ├── 6-scriptable_objects.txt ├── 7-unity_objects.txt ├── generic-static-fields.txt ├── log.txt ├── types-native.txt ├── types-self.txt ├── types-total.txt └── types ├── Cubemap.txt ├── CubemapArray.txt ├── RenderTexture.txt ├── Sprite.txt ├── Texture.txt ├── Texture2D.txt ├── Texture2DArray.txt ├── Texture3D.txt └── Unit.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | Library 3 | *.sln 4 | *.sln.DotSettings.user 5 | *.userprefs 6 | *.suo 7 | Temp 8 | obj 9 | *.csproj 10 | .idea 11 | *.iml 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /Assets/Sample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4e6cb2d522efd34ba0d1dfd6f6fef55 3 | folderAsset: yes 4 | timeCreated: 1513952476 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sample/AnimatorController.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: AnimatorController 9 | serializedVersion: 5 10 | m_AnimatorParameters: [] 11 | m_AnimatorLayers: [] 12 | -------------------------------------------------------------------------------- /Assets/Sample/AnimatorController.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3e8259a844d17e4795cac35d134af12 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sample/Game.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using JetBrains.Annotations; 3 | 4 | namespace Sample 5 | { 6 | public class Game 7 | { 8 | public static Game Instance = new Game(); 9 | 10 | [NotNull] 11 | public UnitsGroup Enemies; 12 | 13 | [NotNull] 14 | private Unit player; 15 | 16 | [NotNull] 17 | private List allUnits = new List(); 18 | 19 | public Game() 20 | { 21 | player = new Unit(); 22 | var pet = new Unit(); 23 | var enemy1 = new Unit(); 24 | var enemy2 = new Unit(); 25 | 26 | player.Pet = pet; 27 | 28 | allUnits.Add(player); 29 | allUnits.Add(pet); 30 | allUnits.Add(enemy1); 31 | allUnits.Add(enemy2); 32 | 33 | Enemies = new UnitsGroup(enemy1, enemy2); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Sample/Game.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 385d22c27a6b8184b84a07b0ea2c8242 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sample/Sample.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 1 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 40 61 | m_AtlasSize: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &234683256 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 234683257} 124 | m_Layer: 0 125 | m_Name: Child4 126 | m_TagString: Untagged 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!4 &234683257 132 | Transform: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 234683256} 137 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 138 | m_LocalPosition: {x: 0, y: 0, z: 0} 139 | m_LocalScale: {x: 1, y: 1, z: 1} 140 | m_Children: [] 141 | m_Father: {fileID: 539936832} 142 | m_RootOrder: 3 143 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 144 | --- !u!1 &539936831 145 | GameObject: 146 | m_ObjectHideFlags: 0 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 0} 149 | serializedVersion: 5 150 | m_Component: 151 | - component: {fileID: 539936832} 152 | m_Layer: 0 153 | m_Name: HierarchyObject 154 | m_TagString: Untagged 155 | m_Icon: {fileID: 0} 156 | m_NavMeshLayer: 0 157 | m_StaticEditorFlags: 0 158 | m_IsActive: 1 159 | --- !u!4 &539936832 160 | Transform: 161 | m_ObjectHideFlags: 0 162 | m_PrefabParentObject: {fileID: 0} 163 | m_PrefabInternal: {fileID: 0} 164 | m_GameObject: {fileID: 539936831} 165 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 166 | m_LocalPosition: {x: -17.593266, y: 14.58786, z: 11.535137} 167 | m_LocalScale: {x: 1, y: 1, z: 1} 168 | m_Children: 169 | - {fileID: 1487508546} 170 | - {fileID: 1600536898} 171 | - {fileID: 1539683785} 172 | - {fileID: 234683257} 173 | - {fileID: 2125243663} 174 | - {fileID: 874905658} 175 | m_Father: {fileID: 0} 176 | m_RootOrder: 2 177 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 178 | --- !u!1 &760734941 179 | GameObject: 180 | m_ObjectHideFlags: 0 181 | m_PrefabParentObject: {fileID: 0} 182 | m_PrefabInternal: {fileID: 0} 183 | serializedVersion: 5 184 | m_Component: 185 | - component: {fileID: 760734943} 186 | - component: {fileID: 760734942} 187 | m_Layer: 0 188 | m_Name: Directional Light 189 | m_TagString: Untagged 190 | m_Icon: {fileID: 0} 191 | m_NavMeshLayer: 0 192 | m_StaticEditorFlags: 0 193 | m_IsActive: 1 194 | --- !u!108 &760734942 195 | Light: 196 | m_ObjectHideFlags: 0 197 | m_PrefabParentObject: {fileID: 0} 198 | m_PrefabInternal: {fileID: 0} 199 | m_GameObject: {fileID: 760734941} 200 | m_Enabled: 1 201 | serializedVersion: 8 202 | m_Type: 1 203 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 204 | m_Intensity: 1 205 | m_Range: 10 206 | m_SpotAngle: 30 207 | m_CookieSize: 10 208 | m_Shadows: 209 | m_Type: 2 210 | m_Resolution: -1 211 | m_CustomResolution: -1 212 | m_Strength: 1 213 | m_Bias: 0.05 214 | m_NormalBias: 0.4 215 | m_NearPlane: 0.2 216 | m_Cookie: {fileID: 0} 217 | m_DrawHalo: 0 218 | m_Flare: {fileID: 0} 219 | m_RenderMode: 0 220 | m_CullingMask: 221 | serializedVersion: 2 222 | m_Bits: 4294967295 223 | m_Lightmapping: 4 224 | m_AreaSize: {x: 1, y: 1} 225 | m_BounceIntensity: 1 226 | m_ColorTemperature: 6570 227 | m_UseColorTemperature: 0 228 | m_ShadowRadius: 0 229 | m_ShadowAngle: 0 230 | --- !u!4 &760734943 231 | Transform: 232 | m_ObjectHideFlags: 0 233 | m_PrefabParentObject: {fileID: 0} 234 | m_PrefabInternal: {fileID: 0} 235 | m_GameObject: {fileID: 760734941} 236 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 237 | m_LocalPosition: {x: 0, y: 3, z: 0} 238 | m_LocalScale: {x: 1, y: 1, z: 1} 239 | m_Children: [] 240 | m_Father: {fileID: 0} 241 | m_RootOrder: 1 242 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 243 | --- !u!1 &769026267 244 | GameObject: 245 | m_ObjectHideFlags: 0 246 | m_PrefabParentObject: {fileID: 0} 247 | m_PrefabInternal: {fileID: 0} 248 | serializedVersion: 5 249 | m_Component: 250 | - component: {fileID: 769026272} 251 | - component: {fileID: 769026271} 252 | - component: {fileID: 769026270} 253 | - component: {fileID: 769026269} 254 | - component: {fileID: 769026268} 255 | m_Layer: 0 256 | m_Name: Main Camera 257 | m_TagString: MainCamera 258 | m_Icon: {fileID: 0} 259 | m_NavMeshLayer: 0 260 | m_StaticEditorFlags: 0 261 | m_IsActive: 1 262 | --- !u!81 &769026268 263 | AudioListener: 264 | m_ObjectHideFlags: 0 265 | m_PrefabParentObject: {fileID: 0} 266 | m_PrefabInternal: {fileID: 0} 267 | m_GameObject: {fileID: 769026267} 268 | m_Enabled: 1 269 | --- !u!124 &769026269 270 | Behaviour: 271 | m_ObjectHideFlags: 0 272 | m_PrefabParentObject: {fileID: 0} 273 | m_PrefabInternal: {fileID: 0} 274 | m_GameObject: {fileID: 769026267} 275 | m_Enabled: 1 276 | --- !u!92 &769026270 277 | Behaviour: 278 | m_ObjectHideFlags: 0 279 | m_PrefabParentObject: {fileID: 0} 280 | m_PrefabInternal: {fileID: 0} 281 | m_GameObject: {fileID: 769026267} 282 | m_Enabled: 1 283 | --- !u!20 &769026271 284 | Camera: 285 | m_ObjectHideFlags: 0 286 | m_PrefabParentObject: {fileID: 0} 287 | m_PrefabInternal: {fileID: 0} 288 | m_GameObject: {fileID: 769026267} 289 | m_Enabled: 1 290 | serializedVersion: 2 291 | m_ClearFlags: 1 292 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 293 | m_NormalizedViewPortRect: 294 | serializedVersion: 2 295 | x: 0 296 | y: 0 297 | width: 1 298 | height: 1 299 | near clip plane: 0.3 300 | far clip plane: 1000 301 | field of view: 60 302 | orthographic: 0 303 | orthographic size: 5 304 | m_Depth: -1 305 | m_CullingMask: 306 | serializedVersion: 2 307 | m_Bits: 4294967295 308 | m_RenderingPath: -1 309 | m_TargetTexture: {fileID: 0} 310 | m_TargetDisplay: 0 311 | m_TargetEye: 3 312 | m_HDR: 1 313 | m_AllowMSAA: 1 314 | m_AllowDynamicResolution: 0 315 | m_ForceIntoRT: 0 316 | m_OcclusionCulling: 1 317 | m_StereoConvergence: 10 318 | m_StereoSeparation: 0.022 319 | --- !u!4 &769026272 320 | Transform: 321 | m_ObjectHideFlags: 0 322 | m_PrefabParentObject: {fileID: 0} 323 | m_PrefabInternal: {fileID: 0} 324 | m_GameObject: {fileID: 769026267} 325 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 326 | m_LocalPosition: {x: 0, y: 1, z: -10} 327 | m_LocalScale: {x: 1, y: 1, z: 1} 328 | m_Children: [] 329 | m_Father: {fileID: 0} 330 | m_RootOrder: 0 331 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 332 | --- !u!1 &775167930 333 | GameObject: 334 | m_ObjectHideFlags: 0 335 | m_PrefabParentObject: {fileID: 0} 336 | m_PrefabInternal: {fileID: 0} 337 | serializedVersion: 5 338 | m_Component: 339 | - component: {fileID: 775167931} 340 | - component: {fileID: 775167933} 341 | - component: {fileID: 775167932} 342 | m_Layer: 0 343 | m_Name: SpriteHolder1 344 | m_TagString: Untagged 345 | m_Icon: {fileID: 0} 346 | m_NavMeshLayer: 0 347 | m_StaticEditorFlags: 0 348 | m_IsActive: 1 349 | --- !u!224 &775167931 350 | RectTransform: 351 | m_ObjectHideFlags: 0 352 | m_PrefabParentObject: {fileID: 0} 353 | m_PrefabInternal: {fileID: 0} 354 | m_GameObject: {fileID: 775167930} 355 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 356 | m_LocalPosition: {x: 0, y: 0, z: 0} 357 | m_LocalScale: {x: 1, y: 1, z: 1} 358 | m_Children: [] 359 | m_Father: {fileID: 1487508546} 360 | m_RootOrder: 0 361 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 362 | m_AnchorMin: {x: 0.5, y: 0.5} 363 | m_AnchorMax: {x: 0.5, y: 0.5} 364 | m_AnchoredPosition: {x: 0, y: 0} 365 | m_SizeDelta: {x: 100, y: 100} 366 | m_Pivot: {x: 0.5, y: 0.5} 367 | --- !u!114 &775167932 368 | MonoBehaviour: 369 | m_ObjectHideFlags: 0 370 | m_PrefabParentObject: {fileID: 0} 371 | m_PrefabInternal: {fileID: 0} 372 | m_GameObject: {fileID: 775167930} 373 | m_Enabled: 1 374 | m_EditorHideFlags: 0 375 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 376 | m_Name: 377 | m_EditorClassIdentifier: 378 | m_Material: {fileID: 0} 379 | m_Color: {r: 1, g: 1, b: 1, a: 1} 380 | m_RaycastTarget: 1 381 | m_OnCullStateChanged: 382 | m_PersistentCalls: 383 | m_Calls: [] 384 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 385 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 386 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 387 | m_Type: 1 388 | m_PreserveAspect: 0 389 | m_FillCenter: 1 390 | m_FillMethod: 4 391 | m_FillAmount: 1 392 | m_FillClockwise: 1 393 | m_FillOrigin: 0 394 | --- !u!222 &775167933 395 | CanvasRenderer: 396 | m_ObjectHideFlags: 0 397 | m_PrefabParentObject: {fileID: 0} 398 | m_PrefabInternal: {fileID: 0} 399 | m_GameObject: {fileID: 775167930} 400 | --- !u!1 &874905657 401 | GameObject: 402 | m_ObjectHideFlags: 0 403 | m_PrefabParentObject: {fileID: 0} 404 | m_PrefabInternal: {fileID: 0} 405 | serializedVersion: 5 406 | m_Component: 407 | - component: {fileID: 874905658} 408 | m_Layer: 0 409 | m_Name: Child6 410 | m_TagString: Untagged 411 | m_Icon: {fileID: 0} 412 | m_NavMeshLayer: 0 413 | m_StaticEditorFlags: 0 414 | m_IsActive: 1 415 | --- !u!4 &874905658 416 | Transform: 417 | m_ObjectHideFlags: 0 418 | m_PrefabParentObject: {fileID: 0} 419 | m_PrefabInternal: {fileID: 0} 420 | m_GameObject: {fileID: 874905657} 421 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 422 | m_LocalPosition: {x: 0, y: 0, z: 0} 423 | m_LocalScale: {x: 1, y: 1, z: 1} 424 | m_Children: [] 425 | m_Father: {fileID: 539936832} 426 | m_RootOrder: 5 427 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 428 | --- !u!1 &1148787574 429 | GameObject: 430 | m_ObjectHideFlags: 0 431 | m_PrefabParentObject: {fileID: 0} 432 | m_PrefabInternal: {fileID: 0} 433 | serializedVersion: 5 434 | m_Component: 435 | - component: {fileID: 1148787575} 436 | - component: {fileID: 1148787577} 437 | - component: {fileID: 1148787576} 438 | m_Layer: 0 439 | m_Name: SpriteHolder2 440 | m_TagString: Untagged 441 | m_Icon: {fileID: 0} 442 | m_NavMeshLayer: 0 443 | m_StaticEditorFlags: 0 444 | m_IsActive: 1 445 | --- !u!224 &1148787575 446 | RectTransform: 447 | m_ObjectHideFlags: 0 448 | m_PrefabParentObject: {fileID: 0} 449 | m_PrefabInternal: {fileID: 0} 450 | m_GameObject: {fileID: 1148787574} 451 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 452 | m_LocalPosition: {x: 0, y: 0, z: 0} 453 | m_LocalScale: {x: 1, y: 1, z: 1} 454 | m_Children: [] 455 | m_Father: {fileID: 1487508546} 456 | m_RootOrder: 1 457 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 458 | m_AnchorMin: {x: 0.5, y: 0.5} 459 | m_AnchorMax: {x: 0.5, y: 0.5} 460 | m_AnchoredPosition: {x: 0, y: 0} 461 | m_SizeDelta: {x: 100, y: 100} 462 | m_Pivot: {x: 0.5, y: 0.5} 463 | --- !u!114 &1148787576 464 | MonoBehaviour: 465 | m_ObjectHideFlags: 0 466 | m_PrefabParentObject: {fileID: 0} 467 | m_PrefabInternal: {fileID: 0} 468 | m_GameObject: {fileID: 1148787574} 469 | m_Enabled: 1 470 | m_EditorHideFlags: 0 471 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 472 | m_Name: 473 | m_EditorClassIdentifier: 474 | m_Material: {fileID: 0} 475 | m_Color: {r: 1, g: 1, b: 1, a: 1} 476 | m_RaycastTarget: 1 477 | m_OnCullStateChanged: 478 | m_PersistentCalls: 479 | m_Calls: [] 480 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 481 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 482 | m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} 483 | m_Type: 0 484 | m_PreserveAspect: 0 485 | m_FillCenter: 1 486 | m_FillMethod: 4 487 | m_FillAmount: 1 488 | m_FillClockwise: 1 489 | m_FillOrigin: 0 490 | --- !u!222 &1148787577 491 | CanvasRenderer: 492 | m_ObjectHideFlags: 0 493 | m_PrefabParentObject: {fileID: 0} 494 | m_PrefabInternal: {fileID: 0} 495 | m_GameObject: {fileID: 1148787574} 496 | --- !u!1 &1487508545 497 | GameObject: 498 | m_ObjectHideFlags: 0 499 | m_PrefabParentObject: {fileID: 0} 500 | m_PrefabInternal: {fileID: 0} 501 | serializedVersion: 5 502 | m_Component: 503 | - component: {fileID: 1487508546} 504 | m_Layer: 0 505 | m_Name: Child1 506 | m_TagString: Untagged 507 | m_Icon: {fileID: 0} 508 | m_NavMeshLayer: 0 509 | m_StaticEditorFlags: 0 510 | m_IsActive: 1 511 | --- !u!4 &1487508546 512 | Transform: 513 | m_ObjectHideFlags: 0 514 | m_PrefabParentObject: {fileID: 0} 515 | m_PrefabInternal: {fileID: 0} 516 | m_GameObject: {fileID: 1487508545} 517 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 518 | m_LocalPosition: {x: 0, y: 0, z: 0} 519 | m_LocalScale: {x: 1, y: 1, z: 1} 520 | m_Children: 521 | - {fileID: 775167931} 522 | - {fileID: 1148787575} 523 | m_Father: {fileID: 539936832} 524 | m_RootOrder: 0 525 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 526 | --- !u!1 &1539683784 527 | GameObject: 528 | m_ObjectHideFlags: 0 529 | m_PrefabParentObject: {fileID: 0} 530 | m_PrefabInternal: {fileID: 0} 531 | serializedVersion: 5 532 | m_Component: 533 | - component: {fileID: 1539683785} 534 | m_Layer: 0 535 | m_Name: Child3 536 | m_TagString: Untagged 537 | m_Icon: {fileID: 0} 538 | m_NavMeshLayer: 0 539 | m_StaticEditorFlags: 0 540 | m_IsActive: 1 541 | --- !u!4 &1539683785 542 | Transform: 543 | m_ObjectHideFlags: 0 544 | m_PrefabParentObject: {fileID: 0} 545 | m_PrefabInternal: {fileID: 0} 546 | m_GameObject: {fileID: 1539683784} 547 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 548 | m_LocalPosition: {x: 0, y: 0, z: 0} 549 | m_LocalScale: {x: 1, y: 1, z: 1} 550 | m_Children: [] 551 | m_Father: {fileID: 539936832} 552 | m_RootOrder: 2 553 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 554 | --- !u!1 &1600536897 555 | GameObject: 556 | m_ObjectHideFlags: 0 557 | m_PrefabParentObject: {fileID: 0} 558 | m_PrefabInternal: {fileID: 0} 559 | serializedVersion: 5 560 | m_Component: 561 | - component: {fileID: 1600536898} 562 | m_Layer: 0 563 | m_Name: Child2 564 | m_TagString: Untagged 565 | m_Icon: {fileID: 0} 566 | m_NavMeshLayer: 0 567 | m_StaticEditorFlags: 0 568 | m_IsActive: 1 569 | --- !u!4 &1600536898 570 | Transform: 571 | m_ObjectHideFlags: 0 572 | m_PrefabParentObject: {fileID: 0} 573 | m_PrefabInternal: {fileID: 0} 574 | m_GameObject: {fileID: 1600536897} 575 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 576 | m_LocalPosition: {x: 0, y: 0, z: 0} 577 | m_LocalScale: {x: 1, y: 1, z: 1} 578 | m_Children: [] 579 | m_Father: {fileID: 539936832} 580 | m_RootOrder: 1 581 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 582 | --- !u!1 &2125243662 583 | GameObject: 584 | m_ObjectHideFlags: 0 585 | m_PrefabParentObject: {fileID: 0} 586 | m_PrefabInternal: {fileID: 0} 587 | serializedVersion: 5 588 | m_Component: 589 | - component: {fileID: 2125243663} 590 | m_Layer: 0 591 | m_Name: Child5 592 | m_TagString: Untagged 593 | m_Icon: {fileID: 0} 594 | m_NavMeshLayer: 0 595 | m_StaticEditorFlags: 0 596 | m_IsActive: 1 597 | --- !u!4 &2125243663 598 | Transform: 599 | m_ObjectHideFlags: 0 600 | m_PrefabParentObject: {fileID: 0} 601 | m_PrefabInternal: {fileID: 0} 602 | m_GameObject: {fileID: 2125243662} 603 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 604 | m_LocalPosition: {x: 0, y: 0, z: 0} 605 | m_LocalScale: {x: 1, y: 1, z: 1} 606 | m_Children: [] 607 | m_Father: {fileID: 539936832} 608 | m_RootOrder: 4 609 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 610 | -------------------------------------------------------------------------------- /Assets/Sample/Sample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23ab8beba3f901c46bb5f9f85fdb4474 3 | timeCreated: 1514215143 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sample/SampleMemorySnapshot.cs: -------------------------------------------------------------------------------- 1 | using UnityHeapCrawler; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | using UnityEngine; 5 | 6 | namespace Sample 7 | { 8 | public static class SampleMemorySnapshot 9 | { 10 | [MenuItem("Tools/Memory/Customized Heap Snapshot")] 11 | public static void HeapSnapshot() 12 | { 13 | var collector = new HeapSnapshotCollector() 14 | .AddRoot(Game.Instance, "Game.Instance") 15 | .AddRootTypes(typeof(UnitsGroup)) 16 | .AddTrackedTypes(typeof(Unit)) 17 | .AddTrackedTypes(typeof(Sprite)) 18 | .AddTrackedTypes(typeof(Texture)); 19 | 20 | var animators = collector.AddUnityRootsGroup 21 | ( 22 | "animator-controllers", 23 | "Animator Controllers", 24 | CrawlOrder.SriptableObjects 25 | ); 26 | animators.MinItemSize = 1; 27 | 28 | collector.UserRootsSettings.MinItemSize = 1; 29 | 30 | collector.HierarchySettings.MinItemSize = 1; 31 | collector.HierarchySettings.PrintOnlyGameObjects = false; 32 | 33 | collector.PrefabsSettings.MinItemSize = 1; 34 | 35 | collector.UnityObjectsSettings.MinItemSize = 1; 36 | 37 | collector.Start(); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/Sample/SampleMemorySnapshot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c8ebf914c5548b4fb47c7ce8313f11e 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sample/Unit.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | using UnityEngine; 3 | 4 | namespace Sample 5 | { 6 | public class Unit 7 | { 8 | public Vector3 Position; 9 | 10 | public float Rotation; 11 | 12 | public int Hp; 13 | 14 | public bool Enemy; 15 | 16 | [CanBeNull] 17 | public Unit Pet; 18 | 19 | public string Name = "Unit name"; 20 | } 21 | } -------------------------------------------------------------------------------- /Assets/Sample/Unit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d11c8209d27683244b3088f682f66a71 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sample/UnitComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | using UnityEngine; 4 | 5 | namespace Sample 6 | { 7 | public class UnitComponent : MonoBehaviour 8 | { 9 | [CanBeNull] 10 | [NonSerialized] 11 | public Collider Collider; 12 | 13 | [NotNull] 14 | public UnitVisualSettings VisualSettings = new UnitVisualSettings(); 15 | 16 | private void Awake() 17 | { 18 | Collider = GetComponent(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Assets/Sample/UnitComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b0d07e451524004e8f724c295091991 3 | timeCreated: 1514197715 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sample/UnitVisualSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Sample 5 | { 6 | [Serializable] 7 | public class UnitVisualSettings 8 | { 9 | public float Size; 10 | public Color32 Color; 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Sample/UnitVisualSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa97f480633d75547bd2149fcbd3bd11 3 | timeCreated: 1514197715 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sample/UnitsGroup.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | 3 | namespace Sample 4 | { 5 | public class UnitsGroup 6 | { 7 | [NotNull] 8 | public readonly Unit[] Units; 9 | 10 | public UnitsGroup([NotNull] params Unit[] units) 11 | { 12 | Units = units; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Assets/Sample/UnitsGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88b8dbfec9cf2ce4c825bcb390995041 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a70a79004d7beb84a9f6c61a112f8472 3 | folderAsset: yes 4 | timeCreated: 1513939676 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using JetBrains.Annotations; 6 | using UnityEngine; 7 | using UnityEngine.Profiling; 8 | using Object = UnityEngine.Object; 9 | 10 | namespace UnityHeapCrawler 11 | { 12 | internal class CrawlItem : IComparable 13 | { 14 | private static int depth; 15 | 16 | [CanBeNull] 17 | public readonly CrawlItem Parent; 18 | 19 | [NotNull] 20 | public readonly object Object; 21 | 22 | [NotNull] 23 | public string Name; 24 | 25 | public long SelfSize; 26 | 27 | public long TotalSize; 28 | 29 | [CanBeNull] 30 | public List Children; 31 | 32 | private bool childrenFiltered; 33 | 34 | internal bool SubtreeUpdated { get; private set; } 35 | 36 | public CrawlItem([CanBeNull] CrawlItem parent, [NotNull] object o, [NotNull] string name) 37 | { 38 | Parent = parent; 39 | Object = o; 40 | Name = name; 41 | } 42 | 43 | public void AddChild([NotNull] CrawlItem child) 44 | { 45 | if (Children == null) 46 | Children = new List(); 47 | 48 | Children.Add(child); 49 | } 50 | 51 | public void UpdateSize(SizeMode mode) 52 | { 53 | try 54 | { 55 | SelfSize = 0; 56 | if (mode == SizeMode.Managed || mode == SizeMode.Total) 57 | SelfSize += CalculateSelfManagedSize(); 58 | if (mode == SizeMode.Native || mode == SizeMode.Total) 59 | SelfSize += CalculateSelfNativeSize(); 60 | 61 | TotalSize = SelfSize; 62 | if (Children == null) 63 | return; 64 | 65 | foreach (var child in Children) 66 | { 67 | child.UpdateSize(mode); 68 | TotalSize += child.TotalSize; 69 | } 70 | Children.Sort(); 71 | } 72 | finally 73 | { 74 | TypeStats.RegisterItem(this); 75 | } 76 | } 77 | 78 | public void Cleanup(CrawlSettings crawlSettings) 79 | { 80 | CleanupUnchanged(); 81 | CleanupInternal(crawlSettings); 82 | } 83 | 84 | private void CleanupUnchanged() 85 | { 86 | if (Children != null) 87 | { 88 | foreach (var c in Children) 89 | { 90 | c.CleanupUnchanged(); 91 | } 92 | 93 | Children.RemoveAll(c => !c.SubtreeUpdated); 94 | SubtreeUpdated = Children.Count > 0; 95 | } 96 | 97 | SubtreeUpdated |= SnapshotHistory.IsNew(Object); 98 | } 99 | 100 | public void CleanupInternal(CrawlSettings crawlSettings) 101 | { 102 | if (!crawlSettings.PrintChildren) 103 | Children = null; 104 | 105 | if (crawlSettings.MaxDepth > 0 && depth >= crawlSettings.MaxDepth) 106 | Children = null; 107 | 108 | if (SnapshotHistory.IsPresent() && SnapshotHistory.IsNew(Object)) 109 | Name = Name + " (new)"; 110 | 111 | // check for destroyed objects 112 | var unityObject = Object as Object; 113 | if (!ReferenceEquals(unityObject, null) && !unityObject) 114 | { 115 | const string destroyedObjectString = "(destroyed Unity Object)"; 116 | if (string.IsNullOrWhiteSpace(Name)) 117 | Name = destroyedObjectString; 118 | else 119 | Name = Name + " " + destroyedObjectString; 120 | 121 | Children = null; 122 | } 123 | 124 | if (Children == null) 125 | return; 126 | 127 | if (crawlSettings.PrintOnlyGameObjects) 128 | Children.RemoveAll(c => !(c.Object is GameObject)); 129 | 130 | int fullChildrenCount = Children.Count; 131 | if (crawlSettings.MinItemSize > 0) 132 | Children.RemoveAll(c => c.TotalSize < crawlSettings.MinItemSize); 133 | if (crawlSettings.MaxChildren > 0 && Children.Count > crawlSettings.MaxChildren) 134 | Children.RemoveRange(crawlSettings.MaxChildren, Children.Count - crawlSettings.MaxChildren); 135 | 136 | if (Children.Count < fullChildrenCount) 137 | childrenFiltered = true; 138 | 139 | depth++; 140 | foreach (var child in Children) 141 | { 142 | child.CleanupInternal(crawlSettings); 143 | } 144 | depth--; 145 | } 146 | 147 | public void Print([NotNull] StreamWriter w, SizeFormat sizeFormat) 148 | { 149 | for (int i = 0; i < depth; ++i) 150 | w.Write(" "); 151 | 152 | if (!string.IsNullOrWhiteSpace(Name)) 153 | { 154 | w.Write(Name); 155 | w.Write(" "); 156 | } 157 | 158 | w.Write("["); 159 | var uo = Object as Object; 160 | if (uo != null) 161 | { 162 | w.Write(uo.name); 163 | w.Write(": "); 164 | w.Write(Object.GetType().GetDisplayName()); 165 | w.Write(" ("); 166 | w.Write(uo.GetInstanceID()); 167 | w.Write(")"); 168 | } 169 | else 170 | { 171 | w.Write(Object.GetType().GetDisplayName()); 172 | } 173 | w.Write("]"); 174 | 175 | w.Write(" "); 176 | w.Write(sizeFormat.Format(TotalSize)); 177 | w.WriteLine(); 178 | 179 | if (Children != null) 180 | { 181 | depth++; 182 | foreach (var child in Children) 183 | { 184 | child.Print(w, sizeFormat); 185 | } 186 | 187 | if (childrenFiltered && Children.Count > 0) 188 | { 189 | for (int j = 0; j < depth; ++j) 190 | w.Write(" "); 191 | 192 | w.WriteLine("..."); 193 | } 194 | 195 | depth--; 196 | } 197 | } 198 | 199 | public string GetRootPath() 200 | { 201 | var items = new List(); 202 | var current = this; 203 | do 204 | { 205 | items.Add(current); 206 | current = current.Parent; 207 | } while (current != null); 208 | 209 | items.Reverse(); 210 | 211 | var itemNames = items 212 | .Select(i => i.Name) 213 | .ToArray(); 214 | return string.Join(".", itemNames); 215 | } 216 | 217 | private long CalculateSelfNativeSize() 218 | { 219 | var uo = Object as Object; 220 | if (uo == null) 221 | return 0L; 222 | return Profiler.GetRuntimeMemorySizeLong(uo); 223 | } 224 | 225 | private long CalculateSelfManagedSize() 226 | { 227 | if (!SnapshotHistory.IsNew(Object)) 228 | return 0; 229 | 230 | string str = Object as string; 231 | if (str != null) 232 | { 233 | // string needs special handling 234 | int strSize = 3 * IntPtr.Size + 2; 235 | strSize += str.Length * sizeof(char); 236 | int pad = strSize % IntPtr.Size; 237 | if (pad != 0) 238 | { 239 | strSize += IntPtr.Size - pad; 240 | } 241 | return strSize; 242 | } 243 | 244 | 245 | if (Object.GetType().IsArray) 246 | { 247 | var elementType = Object.GetType().GetElementType(); 248 | if (elementType != null && (elementType.IsValueType || elementType.IsPrimitive || elementType.IsEnum)) 249 | { 250 | // no overhead for array 251 | return 0; 252 | } 253 | else 254 | { 255 | int arraySize = GetTotalArrayLength((Array)Object); 256 | return IntPtr.Size * arraySize; 257 | } 258 | } 259 | 260 | return TypeData.Get(Object.GetType()).Size; 261 | } 262 | 263 | private static int GetTotalArrayLength(Array val) 264 | { 265 | int sum = val.GetLength(0); 266 | for (int i = 1; i < val.Rank; i++) 267 | { 268 | sum *= val.GetLength(i); 269 | } 270 | return sum; 271 | } 272 | 273 | public int CompareTo(CrawlItem other) 274 | { 275 | if (ReferenceEquals(this, other)) 276 | return 0; 277 | if (ReferenceEquals(null, other)) 278 | return 1; 279 | 280 | // descending 281 | return other.TotalSize.CompareTo(TotalSize); 282 | } 283 | 284 | public override string ToString() 285 | { 286 | return Object.ToString(); 287 | } 288 | } 289 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a744080880debc146a0ecc01c4d68151 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlOrder.cs: -------------------------------------------------------------------------------- 1 | namespace UnityHeapCrawler 2 | { 3 | /// 4 | /// Order for crawling groups 5 | /// 6 | public enum CrawlOrder 7 | { 8 | UserRoots, 9 | StaticFields, 10 | Hierarchy, 11 | SriptableObjects, 12 | Prefabs, 13 | UnityObjects 14 | } 15 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlOrder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2080d21e90a447242ad6576c29fc2a9a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JetBrains.Annotations; 4 | using UnityEngine; 5 | 6 | namespace UnityHeapCrawler 7 | { 8 | /// 9 | /// Output settings for crawling result - memory tree. 10 | /// 11 | public class CrawlSettings 12 | { 13 | [NotNull] 14 | public static IComparer PriorityComparer { get; } = new PriorityRelationalComparer(); 15 | 16 | [NotNull] 17 | private static readonly Type[] s_HierarchyTypes = 18 | { 19 | typeof(GameObject), 20 | typeof(Component), 21 | typeof(Material), 22 | typeof(Texture), 23 | typeof(Sprite), 24 | typeof(Mesh) 25 | }; 26 | 27 | public bool Enabled = true; 28 | 29 | internal readonly CrawlOrder Order; 30 | 31 | [NotNull] 32 | internal readonly Action RootsCollector; 33 | 34 | internal readonly string Caption; 35 | 36 | /// 37 | /// Resulting memory tree file name. 38 | /// 39 | [NotNull] 40 | public string Filename; 41 | 42 | /// 43 | /// Print children in memory tree. Disable to include only root objects. 44 | /// 45 | public bool PrintChildren = true; 46 | 47 | /// 48 | /// Print only GameObjects in hierarchy mode. 49 | /// 50 | public bool PrintOnlyGameObjects = false; 51 | 52 | /// 53 | /// Follow references to all unity objects or leave them for a later crawling stage 54 | /// 55 | public bool IncludeAllUnityTypes = false; 56 | 57 | /// 58 | /// Follow references to unity objects of specific types 59 | /// 60 | [NotNull] 61 | public List IncludedUnityTypes = new List(); 62 | 63 | /// 64 | /// Maximum children depth in memory tree. 0 - infinity. 65 | /// 66 | public int MaxDepth = 0; 67 | 68 | /// 69 | /// Maximum children printed for one object in memory tree. Children are sorted by total size 70 | /// 71 | public int MaxChildren = 10; 72 | 73 | /// 74 | /// Minimum object size to be included in memory tree. 75 | /// 76 | public int MinItemSize = 1024; // bytes 77 | 78 | public CrawlSettings( 79 | [NotNull] string filename, 80 | [NotNull] string caption, 81 | [NotNull] Action rootsCollector, 82 | CrawlOrder order) 83 | { 84 | Filename = filename; 85 | Caption = caption; 86 | RootsCollector = rootsCollector; 87 | Order = order; 88 | } 89 | 90 | internal bool IsUnityTypeAllowed(Type type) 91 | { 92 | if (IncludeAllUnityTypes) 93 | return true; 94 | 95 | foreach (var allowedType in IncludedUnityTypes) 96 | { 97 | if (allowedType.IsAssignableFrom(type)) 98 | { 99 | return true; 100 | } 101 | } 102 | 103 | return false; 104 | } 105 | 106 | [NotNull] 107 | public static CrawlSettings CreateUserRoots([NotNull] Action objectsProvider) 108 | { 109 | return new CrawlSettings("user-roots", "User Roots", objectsProvider, CrawlOrder.UserRoots) 110 | { 111 | MaxChildren = 0 112 | }; 113 | } 114 | 115 | [NotNull] 116 | public static CrawlSettings CreateStaticFields([NotNull] Action objectsProvider) 117 | { 118 | return new CrawlSettings("static-fields", "Static Roots", objectsProvider, CrawlOrder.StaticFields) 119 | { 120 | MaxDepth = 1 121 | }; 122 | } 123 | 124 | [NotNull] 125 | public static CrawlSettings CreateHierarchy([NotNull] Action objectsProvider) 126 | { 127 | return new CrawlSettings("hierarchy", "Hierarchy", objectsProvider, CrawlOrder.Hierarchy) 128 | { 129 | PrintOnlyGameObjects = true, 130 | MaxChildren = 0, 131 | IncludedUnityTypes = new List(s_HierarchyTypes) 132 | }; 133 | } 134 | 135 | [NotNull] 136 | public static CrawlSettings CreateScriptableObjects([NotNull] Action objectsProvider) 137 | { 138 | return new CrawlSettings("scriptable_objects", "Scriptable Objects", objectsProvider, CrawlOrder.UnityObjects) 139 | { 140 | IncludeAllUnityTypes = true 141 | }; 142 | } 143 | 144 | [NotNull] 145 | public static CrawlSettings CreatePrefabs([NotNull] Action objectsProvider) 146 | { 147 | return new CrawlSettings("prefabs", "Prefabs", objectsProvider, CrawlOrder.Prefabs) 148 | { 149 | PrintOnlyGameObjects = true, 150 | MaxChildren = 0, 151 | IncludedUnityTypes = new List(s_HierarchyTypes) 152 | }; 153 | } 154 | 155 | [NotNull] 156 | public static CrawlSettings CreateUnityObjects([NotNull] Action objectsProvider) 157 | { 158 | return new CrawlSettings("unity_objects", "Unity Objects", objectsProvider, CrawlOrder.UnityObjects); 159 | } 160 | 161 | public override string ToString() 162 | { 163 | return $"Crawl Settings [{Caption}, {Filename}]"; 164 | } 165 | 166 | private sealed class PriorityRelationalComparer : IComparer 167 | { 168 | public int Compare(CrawlSettings x, CrawlSettings y) 169 | { 170 | if (ReferenceEquals(x, y)) return 0; 171 | if (ReferenceEquals(null, y)) return 1; 172 | if (ReferenceEquals(null, x)) return -1; 173 | return x.Order.CompareTo(y.Order); 174 | } 175 | } 176 | } 177 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/CrawlSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f5f192c8aaf4b14c832690493d6b9bf 3 | timeCreated: 1514195617 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/HeapSnapshotCollector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using JetBrains.Annotations; 7 | using UnityEditor; 8 | using UnityEngine; 9 | using UnityEngine.Profiling; 10 | using Object = UnityEngine.Object; 11 | 12 | namespace UnityHeapCrawler 13 | { 14 | /// 15 | /// Tool for crawling mono heap and collecting memory usage. 16 | /// 17 | /// 1. Analyze managed memory consumption prior to reducing it 18 | /// 2. Locate managed memory leaks. 19 | /// 20 | /// 21 | public class HeapSnapshotCollector 22 | { 23 | /// 24 | /// for user defined roots. 25 | /// 26 | /// Modify them after construction to change output format or disable crawling. 27 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 28 | /// 29 | /// 30 | [NotNull] 31 | public readonly CrawlSettings UserRootsSettings; 32 | 33 | /// 34 | /// for static fields in all types. 35 | /// 36 | /// Modify them after construction to change output format or disable crawling. 37 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 38 | /// 39 | /// 40 | [NotNull] 41 | public readonly CrawlSettings StaticFieldsSettings; 42 | 43 | /// 44 | /// for GameObjects in scene hierarchy. 45 | /// 46 | /// Modify them after construction to change output format or disable crawling. 47 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 48 | /// 49 | /// 50 | [NotNull] 51 | public readonly CrawlSettings HierarchySettings; 52 | 53 | /// 54 | /// for all ScriptableObjects. 55 | /// 56 | /// Modify them after construction to change output format or disable crawling. 57 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 58 | /// 59 | /// 60 | [NotNull] 61 | public readonly CrawlSettings ScriptableObjectsSettings; 62 | 63 | /// 64 | /// for all loaded Prefabs. 65 | /// 66 | /// Modify them after construction to change output format or disable crawling. 67 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 68 | /// 69 | /// 70 | [NotNull] 71 | public readonly CrawlSettings PrefabsSettings; 72 | 73 | /// 74 | /// for all other Unity objects (Texture, Material, etc). 75 | /// 76 | /// Modify them after construction to change output format or disable crawling. 77 | /// Be careful when reducing filtering - large crawl trees will affect memory consumption. 78 | /// 79 | /// 80 | [NotNull] 81 | public readonly CrawlSettings UnityObjectsSettings; 82 | 83 | /// 84 | /// Only show new objects (compared to previous snapshot) in all reports 85 | /// 86 | /// Useful to find memory leaks 87 | /// 88 | /// 89 | public bool DifferentialMode = true; 90 | 91 | /// 92 | /// Which size estimations are used 93 | /// 94 | /// - Managed - heap estimation 95 | /// - Native - native size estimation for Unity objects 96 | /// - Total - Managed + Native 97 | /// 98 | /// 99 | public SizeMode SizeMode = SizeMode.Managed; 100 | 101 | #region PrivateFields 102 | 103 | [NotNull] 104 | private readonly List crawlOrder = new List(); 105 | 106 | [NotNull] 107 | private readonly List customRoots = new List(); 108 | 109 | [NotNull] 110 | private readonly List rootTypes = new List(); 111 | 112 | [NotNull] 113 | private readonly List forbiddenTypes = new List(); 114 | 115 | [NotNull] 116 | private readonly List staticTypes = new List(); 117 | 118 | [NotNull] 119 | private readonly List trackedTypes = new List(); 120 | 121 | [NotNull] 122 | private readonly HashSet unityObjects = new HashSet(ReferenceEqualityComparer.Instance); 123 | 124 | [NotNull] 125 | private readonly HashSet visitedObjects = new HashSet(ReferenceEqualityComparer.Instance); 126 | 127 | [NotNull] 128 | private readonly Queue rootsQueue = new Queue(); 129 | 130 | [NotNull] 131 | private readonly Queue localRootsQueue = new Queue(); 132 | 133 | private int minTypeSize = 1024; 134 | 135 | private SizeFormat sizeFormat = SizeFormat.Short; 136 | 137 | private string outputDir = ""; 138 | 139 | #endregion 140 | 141 | public HeapSnapshotCollector() 142 | { 143 | UserRootsSettings = CrawlSettings.CreateUserRoots(CollectUserRoots); 144 | StaticFieldsSettings = CrawlSettings.CreateStaticFields(CollectStaticFields); 145 | HierarchySettings = CrawlSettings.CreateHierarchy(CollectRootHierarchyGameObjects); 146 | ScriptableObjectsSettings = CrawlSettings.CreateScriptableObjects(() => CollectUnityObjects(typeof(ScriptableObject))); 147 | PrefabsSettings = CrawlSettings.CreatePrefabs(CollectPrefabs); 148 | UnityObjectsSettings = CrawlSettings.CreateUnityObjects(() => CollectUnityObjects(typeof(Object))); 149 | 150 | forbiddenTypes.Add(typeof(TypeData)); 151 | forbiddenTypes.Add(typeof(TypeStats)); 152 | forbiddenTypes.Add(typeof(SnapshotHistory)); 153 | } 154 | 155 | /// 156 | /// Add custom root. It will be crawled before any other objects. 157 | /// It should be useful to add your big singletons as custom roots. 158 | /// 159 | /// Root to crawl (C# object instance) 160 | /// Root name in report 161 | /// 162 | [NotNull] 163 | public HeapSnapshotCollector AddRoot([NotNull] object root, [NotNull] string name) 164 | { 165 | string itemName = string.Format("{0} [{1}]", name, root.GetType().GetDisplayName()); 166 | customRoots.Add(new CrawlItem(null, root, itemName)); 167 | return this; 168 | } 169 | 170 | /// 171 | /// Add root types. 172 | /// Objects of these types will be treated as roots and will not be included into crawl trees they were found in. 173 | /// 174 | /// Root types 175 | /// 176 | [NotNull] 177 | public HeapSnapshotCollector AddRootTypes([NotNull] params Type[] types) 178 | { 179 | rootTypes.AddRange(types); 180 | return this; 181 | } 182 | 183 | /// 184 | /// Forbid some types to be crawled. Crawler will not follow links to instances of those types or count them to total size. 185 | /// Useful when you need to collect only a local snapshot from custom definded roots without triggering whole heap to be crawled. 186 | /// Also can be useful to reduce memory consumption by crawling only a part of the heap. 187 | /// 188 | /// Forbidden types 189 | /// 190 | [NotNull] 191 | public HeapSnapshotCollector AddForbiddenTypes([NotNull] params Type[] types) 192 | { 193 | forbiddenTypes.AddRange(types); 194 | return this; 195 | } 196 | 197 | /// 198 | /// Add additional types to check for static fields and add them as roots. 199 | /// This is a workaround for an unsupported case. Consider following class: 200 | /// 201 | /// class GenericClass<T> 202 | /// { 203 | /// public static List<T> StaticList; 204 | /// } 205 | /// 206 | /// Static fields GenericClass<A>.StaticList and GenericClass<B>.StaticList would be different lists that should both be counted as roots. 207 | /// Crawler cannot find those roots automatically due to C# Reflection limitations. 208 | /// 209 | /// Forbidden types 210 | /// 211 | [NotNull] 212 | public HeapSnapshotCollector AddStaticTypes([NotNull] params Type[] types) 213 | { 214 | staticTypes.AddRange(types); 215 | return this; 216 | } 217 | 218 | /// 219 | /// Enable root paths tracking for specific types. 220 | /// Can affect memory consumption - for each instance of specified types all root paths to it will be logged. 221 | /// Useful when you already know exact type is leaked and need to find what is holding it. 222 | /// 223 | /// Types to track 224 | /// 225 | [NotNull] 226 | public HeapSnapshotCollector AddTrackedTypes([NotNull] params Type[] types) 227 | { 228 | trackedTypes.AddRange(types); 229 | return this; 230 | } 231 | 232 | /// 233 | /// Add custom roots crawling group. Results will be wrtitten to a seperate file. 234 | /// Explicit objects version. 235 | /// 236 | /// Filename for group output 237 | /// Group caption 238 | /// Crawling priority 239 | /// Root objects 240 | /// Crawl settings for further configuration 241 | [NotNull] 242 | public CrawlSettings AddRootsGroup( 243 | [NotNull] string filename, 244 | [NotNull] string caption, 245 | CrawlOrder order, 246 | params object[] roots) 247 | { 248 | var crawlSettings = new CrawlSettings(filename, caption, () => CollectRoots(roots), order); 249 | crawlOrder.Add(crawlSettings); 250 | return crawlSettings; 251 | } 252 | 253 | /// 254 | /// Add custom roots crawling group. Results will be wrtitten to a seperate file. 255 | /// All Unity objects of specified type are included in the group. 256 | /// 257 | /// Filename for group output 258 | /// Group caption 259 | /// Crawling priority 260 | /// Crawl settings for further configuration 261 | [NotNull] 262 | public CrawlSettings AddUnityRootsGroup( 263 | [NotNull] string filename, 264 | [NotNull] string caption, 265 | CrawlOrder order) 266 | { 267 | var crawlSettings = new CrawlSettings(filename, caption, () => CollectUnityObjects(typeof(T)), order) 268 | { 269 | IncludeAllUnityTypes = true 270 | }; 271 | crawlOrder.Add(crawlSettings); 272 | return crawlSettings; 273 | } 274 | 275 | /// 276 | /// Set minimum size for type to be included in types report. 277 | /// All instances of the type should be at least this size total for type to be included in type report. 278 | /// 279 | /// Minimum size type 280 | /// 281 | public HeapSnapshotCollector SetMinTypeSize(int size) 282 | { 283 | minTypeSize = size; 284 | return this; 285 | } 286 | 287 | /// 288 | /// Set sizes format in output. 289 | /// Short 54.8 MB 290 | /// Precise 54829125 291 | /// Combined 54.8 MB (54829125) 292 | /// 293 | /// 294 | /// 295 | public HeapSnapshotCollector SetSizeFormat(SizeFormat format) 296 | { 297 | sizeFormat = format; 298 | return this; 299 | } 300 | 301 | /// 302 | /// Let The Crawling Begin! 303 | /// 304 | public void Start() 305 | { 306 | // traverse order: 307 | // 1. used definded roots (without Unity objects) 308 | // 2. static fields (without Unity objects) 309 | // 3. game objects in scene hierarchy (seperate view) 310 | // 4. ScriptableObjects (with all referenced Unity objects) 311 | // 5. Prefabs (with all referenced Unity objects) 312 | // 6. all remaining Unity objects (ScriptableObject and other stuff) 313 | // user can add custom groups using AddRootsGroup and AddUnityRootsGroup 314 | try 315 | { 316 | if (!DifferentialMode) 317 | SnapshotHistory.Clear(); 318 | 319 | TypeData.Start(); 320 | TypeStats.Init(trackedTypes); 321 | 322 | outputDir = "snapshot-" + DateTime.Now.ToString("s").Replace(":", "_"); 323 | if (DifferentialMode && SnapshotHistory.IsPresent()) 324 | outputDir += "-diff"; 325 | outputDir += "/"; 326 | 327 | Directory.CreateDirectory(outputDir); 328 | 329 | using (var log = new StreamWriter(outputDir + "log.txt")) 330 | { 331 | log.AutoFlush = true; 332 | 333 | GC.Collect(); 334 | GC.Collect(); 335 | log.WriteLine("Mono Size Min: " + sizeFormat.Format(Profiler.GetMonoUsedSizeLong())); 336 | log.WriteLine("Mono Size Max: " + sizeFormat.Format(Profiler.GetMonoHeapSizeLong())); 337 | log.WriteLine("Total Allocated: " + sizeFormat.Format(Profiler.GetTotalAllocatedMemoryLong())); 338 | log.WriteLine("Total Reserved: " + sizeFormat.Format(Profiler.GetTotalReservedMemoryLong())); 339 | log.WriteLine(); 340 | 341 | // now add predefined crawl settings and sort by priority 342 | // all user crawl settings were added before so they will precede predefined ones with same priority 343 | crawlOrder.Add(UserRootsSettings); 344 | crawlOrder.Add(StaticFieldsSettings); 345 | crawlOrder.Add(HierarchySettings); 346 | crawlOrder.Add(ScriptableObjectsSettings); 347 | crawlOrder.Add(PrefabsSettings); 348 | crawlOrder.Add(UnityObjectsSettings); 349 | crawlOrder.RemoveAll(cs => !cs.Enabled); 350 | crawlOrder.Sort(CrawlSettings.PriorityComparer); 351 | 352 | #if UNITY_EDITOR 353 | EditorUtility.DisplayProgressBar("Heap Snapshot", "Collecting Unity Objects...", 0f); 354 | #endif 355 | unityObjects.Clear(); 356 | var unityObjectsList = Resources.FindObjectsOfTypeAll(); 357 | foreach (var o in unityObjectsList) 358 | { 359 | unityObjects.Add(o); 360 | } 361 | 362 | long totalSize = 0; 363 | float progressStep = 0.8f / crawlOrder.Count; 364 | for (var i = 0; i < crawlOrder.Count; i++) 365 | { 366 | float startProgress = 0.1f + progressStep * i; 367 | float endProgress = 0.1f + progressStep * (i + 1); 368 | var crawlSettings = crawlOrder[i]; 369 | 370 | DisplayCollectProgressBar(crawlSettings, startProgress); 371 | 372 | crawlSettings.RootsCollector(); 373 | 374 | int displayIndex = i + 1; 375 | long rootsSize = CrawlRoots(crawlSettings, displayIndex, startProgress, endProgress); 376 | 377 | log.WriteLine($"{crawlSettings.Caption} size: " + sizeFormat.Format(rootsSize)); 378 | totalSize += rootsSize; 379 | } 380 | 381 | log.WriteLine("Total size: " + sizeFormat.Format(totalSize)); 382 | } 383 | 384 | #if UNITY_EDITOR 385 | EditorUtility.DisplayProgressBar("Heap Snapshot", "Printing Type Statistics...", 0.95f); 386 | #endif 387 | PrintTypeStats(TypeSizeMode.Self, "types-self.txt"); 388 | PrintTypeStats(TypeSizeMode.Total, "types-total.txt"); 389 | PrintTypeStats(TypeSizeMode.Native, "types-native.txt"); 390 | 391 | #if UNITY_EDITOR 392 | EditorUtility.DisplayProgressBar("Heap Snapshot", "Printing Instance Statistics...", 0.95f); 393 | #endif 394 | PrintInstanceStats(); 395 | 396 | if (DifferentialMode) 397 | SnapshotHistory.Store(visitedObjects); 398 | 399 | Debug.Log("Heap snapshot created: " + outputDir); 400 | } 401 | finally 402 | { 403 | #if UNITY_EDITOR 404 | EditorUtility.ClearProgressBar(); 405 | #endif 406 | } 407 | } 408 | 409 | #if UNITY_EDITOR 410 | [MenuItem("Tools/Memory/Default Heap Snapshot")] 411 | public static void HeapSnapshot() 412 | { 413 | new HeapSnapshotCollector().Start(); 414 | } 415 | #endif 416 | 417 | private void PrintTypeStats(TypeSizeMode mode, string filename) 418 | { 419 | using (var f = new StreamWriter(outputDir + filename)) 420 | { 421 | var typeStats = TypeStats.Data.Values 422 | .OrderByDescending(ts => mode.GetSize(ts)) 423 | .ToList(); 424 | 425 | f.Write("Size".PadLeft(12)); 426 | f.Write(" "); 427 | f.Write("Count".PadLeft(9)); 428 | f.Write(" "); 429 | f.Write("Type"); 430 | f.WriteLine(); 431 | 432 | foreach (var ts in typeStats) 433 | { 434 | if (ts.SelfSize < minTypeSize) 435 | continue; 436 | 437 | long size = mode.GetSize(ts); 438 | f.Write(sizeFormat.Format(size).PadLeft(12)); 439 | f.Write(" "); 440 | f.Write(ts.Count.ToString().PadLeft(9)); 441 | f.Write(" "); 442 | f.Write(ts.Type.GetDisplayName()); 443 | f.WriteLine(); 444 | } 445 | } 446 | } 447 | 448 | private void PrintInstanceStats() 449 | { 450 | var typeStats = TypeStats.Data.Values; 451 | foreach (var ts in typeStats) 452 | { 453 | if (ts.Instances.Count <= 0) 454 | continue; 455 | 456 | var dir = outputDir + "types/"; 457 | Directory.CreateDirectory(dir); 458 | var fileName = dir + ts.Type.GetFileName() + ".txt"; 459 | using (var f = new StreamWriter(fileName)) 460 | { 461 | var instances = ts.Instances.Values.ToList(); 462 | instances.Sort(); 463 | 464 | foreach (var instance in instances) 465 | { 466 | f.Write(instance.Instance.ToString()); 467 | 468 | var nativeSize = instance.NativeSize; 469 | if (nativeSize > 0) 470 | { 471 | f.Write(" [native " + sizeFormat.Format(nativeSize) + ", managed " + sizeFormat.Format(instance.Size) + "]"); 472 | } 473 | else 474 | { 475 | f.Write(" [managed " + sizeFormat.Format(instance.Size) + "]"); 476 | } 477 | 478 | f.Write(" root paths:"); 479 | f.WriteLine(); 480 | foreach (var rootPath in instance.RootPaths) 481 | { 482 | f.WriteLine(rootPath); 483 | } 484 | f.WriteLine(); 485 | } 486 | } 487 | } 488 | } 489 | 490 | private void CollectUserRoots() 491 | { 492 | foreach (var root in customRoots) 493 | { 494 | visitedObjects.Add(root.Object); 495 | rootsQueue.Enqueue(root); 496 | } 497 | } 498 | 499 | private void CollectRoots(object[] roots) 500 | { 501 | foreach (var root in roots) 502 | { 503 | var name = root.GetType().GetDisplayName(); 504 | EnqueueRoot(root, name, false); 505 | } 506 | } 507 | 508 | private void CollectStaticFields() 509 | { 510 | var assemblyTypes = AppDomain.CurrentDomain.GetAssemblies() 511 | .Where(IsValidAssembly) 512 | .SelectMany(a => a.GetTypes()); 513 | 514 | var allTypes = staticTypes.Concat(assemblyTypes); 515 | var genericStaticFields = new HashSet(); 516 | 517 | foreach (var type in allTypes) 518 | { 519 | try 520 | { 521 | AddStaticFields(type, genericStaticFields); 522 | } 523 | catch (Exception e) 524 | { 525 | Debug.LogException(e); 526 | } 527 | } 528 | 529 | if (genericStaticFields.Count > 0) 530 | { 531 | var genericStaticFieldsList = genericStaticFields.ToList(); 532 | genericStaticFieldsList.Sort(); 533 | 534 | using (var log = new StreamWriter(outputDir + "generic-static-fields.txt")) 535 | { 536 | foreach (var s in genericStaticFieldsList) 537 | { 538 | log.WriteLine(s); 539 | } 540 | } 541 | } 542 | } 543 | 544 | private void AddStaticFields([NotNull] Type type, [NotNull] HashSet genericStaticFields) 545 | { 546 | if (IsForbiddenType(type)) 547 | return; 548 | 549 | var currentType = type; 550 | while (currentType != null && currentType != typeof(object)) 551 | { 552 | foreach (var fieldInfo in currentType.GetFields(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) 553 | { 554 | if (currentType.IsGenericTypeDefinition) 555 | { 556 | genericStaticFields.Add(currentType.FullName + "." + fieldInfo.Name); 557 | continue; 558 | } 559 | 560 | var v = fieldInfo.GetValue(null); 561 | if (v != null) 562 | { 563 | var name = currentType.GetDisplayName() + '.' + fieldInfo.Name; 564 | EnqueueRoot(v, name, false); 565 | } 566 | } 567 | currentType = currentType.BaseType; 568 | } 569 | } 570 | 571 | private void CollectRootHierarchyGameObjects() 572 | { 573 | foreach (var o in unityObjects) 574 | { 575 | var go = o as GameObject; 576 | if (go == null) 577 | continue; 578 | if (!go.scene.IsValid()) 579 | continue; 580 | if (go.transform.parent != null) 581 | continue; 582 | EnqueueRoot(go, go.name, false); 583 | } 584 | } 585 | 586 | private void CollectPrefabs() 587 | { 588 | foreach (var o in unityObjects) 589 | { 590 | var go = o as GameObject; 591 | if (go == null) 592 | continue; 593 | if (go.scene.IsValid()) 594 | continue; 595 | if (go.transform.parent != null) 596 | continue; 597 | EnqueueRoot(go, go.name, false); 598 | } 599 | } 600 | 601 | private void CollectUnityObjects(Type type) 602 | { 603 | foreach (var o in unityObjects) 604 | { 605 | if (!type.IsInstanceOfType(o)) 606 | continue; 607 | 608 | var uo = (Object) o; 609 | EnqueueRoot(uo, uo.name, false); 610 | } 611 | } 612 | 613 | private static void DisplayCollectProgressBar([NotNull] CrawlSettings crawlSettings, float startProgress) 614 | { 615 | #if UNITY_EDITOR 616 | EditorUtility.DisplayProgressBar("Heap Snapshot", "Collecting: " + crawlSettings.Caption + "...", startProgress); 617 | #endif 618 | } 619 | 620 | private long CrawlRoots([NotNull] CrawlSettings crawlSettings, int crawlIndex, float startProgress, float endProgress) 621 | { 622 | if (rootsQueue.Count <= 0) 623 | return 0; 624 | 625 | int processedRoots = 0; 626 | long totalSize = 0; 627 | var roots = new List(); 628 | while (rootsQueue.Count > 0) 629 | { 630 | var r = rootsQueue.Dequeue(); 631 | localRootsQueue.Enqueue(r); 632 | 633 | while (localRootsQueue.Count > 0) 634 | { 635 | #if UNITY_EDITOR 636 | if (processedRoots % 10 == 0) 637 | { 638 | int remainingRoots = rootsQueue.Count + localRootsQueue.Count; 639 | int totalRoots = remainingRoots + processedRoots; 640 | float progress = Mathf.Lerp( 641 | startProgress, 642 | endProgress, 643 | 1f * processedRoots / totalRoots 644 | ); 645 | EditorUtility.DisplayProgressBar("Heap Snapshot", "Crawling: " + crawlSettings.Caption + "...", progress); 646 | } 647 | #endif 648 | var root = localRootsQueue.Dequeue(); 649 | CrawlRoot(root, crawlSettings); 650 | totalSize += root.TotalSize; 651 | root.Cleanup(crawlSettings); 652 | processedRoots++; 653 | 654 | if (!root.SubtreeUpdated) 655 | continue; 656 | if (root.TotalSize < crawlSettings.MinItemSize) 657 | continue; 658 | roots.Add(root); 659 | } 660 | } 661 | 662 | roots.Sort(); 663 | if (roots.Count > 0) 664 | { 665 | using (var output = new StreamWriter($"{outputDir}{crawlIndex}-{crawlSettings.Filename}.txt")) 666 | { 667 | foreach (var root in roots) 668 | { 669 | root.Print(output, sizeFormat); 670 | } 671 | } 672 | } 673 | 674 | return totalSize; 675 | } 676 | 677 | private void CrawlRoot([NotNull] CrawlItem root, [NotNull] CrawlSettings crawlSettings) 678 | { 679 | var queue = new Queue(); 680 | queue.Enqueue(root); 681 | 682 | while (queue.Count > 0) 683 | { 684 | var next = queue.Dequeue(); 685 | var type = next.Object.GetType(); 686 | var typeData = TypeData.Get(type); 687 | 688 | if (type.IsArray) 689 | { 690 | QueueArrayElements(next, queue, next.Object, crawlSettings); 691 | } 692 | if (type == typeof(GameObject)) 693 | { 694 | QueueHierarchy(next, queue, next.Object, crawlSettings); 695 | } 696 | if (typeData.DynamicSizedFields != null) 697 | { 698 | foreach (var field in typeData.DynamicSizedFields) 699 | { 700 | var v = field.GetValue(next.Object); 701 | QueueValue(next, queue, v, field.Name, crawlSettings); 702 | } 703 | } 704 | } 705 | 706 | root.UpdateSize(SizeMode); 707 | } 708 | 709 | private void EnqueueRoot([NotNull] object root, [NotNull] string name, bool local) 710 | { 711 | if (IsForbidden(root)) 712 | return; 713 | 714 | if (visitedObjects.Contains(root)) 715 | return; 716 | 717 | visitedObjects.Add(root); 718 | var rootItem = new CrawlItem(null, root, name); 719 | 720 | if (local) 721 | localRootsQueue.Enqueue(rootItem); 722 | else 723 | rootsQueue.Enqueue(rootItem); 724 | } 725 | 726 | private void QueueValue( 727 | [NotNull] CrawlItem parent, 728 | [NotNull] Queue queue, 729 | [CanBeNull] object v, 730 | [NotNull] string name, 731 | [NotNull] CrawlSettings crawlSettings) 732 | { 733 | if (v == null) 734 | return; 735 | 736 | if (IsForbidden(v)) 737 | return; 738 | 739 | TypeStats.RegisterInstance(parent, name, v); 740 | if (visitedObjects.Contains(v)) 741 | return; 742 | 743 | if (unityObjects.Contains(v) && !crawlSettings.IsUnityTypeAllowed(v.GetType())) 744 | return; 745 | 746 | if (IsRoot(v)) 747 | { 748 | var rootName = parent.Object.GetType().GetDisplayName() + '.' + name; 749 | EnqueueRoot(v, rootName, true); 750 | return; 751 | } 752 | 753 | visitedObjects.Add(v); 754 | var item = new CrawlItem(parent, v, name); 755 | queue.Enqueue(item); 756 | parent.AddChild(item); 757 | } 758 | 759 | private void QueueArrayElements( 760 | [NotNull] CrawlItem parent, 761 | [NotNull] Queue queue, 762 | [CanBeNull] object array, 763 | [NotNull] CrawlSettings crawlSettings) 764 | { 765 | if (array == null) 766 | return; 767 | 768 | if (!array.GetType().IsArray) 769 | return; 770 | 771 | var elementType = array.GetType().GetElementType(); 772 | if (elementType == null) 773 | return; 774 | 775 | int index = 0; 776 | foreach (var arrayItem in (Array) array) 777 | { 778 | QueueValue(parent, queue, arrayItem, $"[{index}]", crawlSettings); 779 | index++; 780 | } 781 | } 782 | 783 | private void QueueHierarchy( 784 | [NotNull] CrawlItem parent, 785 | [NotNull] Queue queue, 786 | [CanBeNull] object v, 787 | [NotNull] CrawlSettings crawlSettings) 788 | { 789 | var go = v as GameObject; 790 | if (go == null) 791 | return; 792 | 793 | var components = go.GetComponents(); 794 | foreach (var c in components) 795 | { 796 | if (ReferenceEquals(c, null)) 797 | continue; 798 | 799 | QueueValue(parent, queue, c, c.GetType().GetDisplayName(), crawlSettings); 800 | } 801 | 802 | var t = go.transform; 803 | for (int i = 0; i < t.childCount; ++i) 804 | { 805 | var childGo = t.GetChild(i).gameObject; 806 | QueueValue(parent, queue, childGo, childGo.name, crawlSettings); 807 | } 808 | } 809 | 810 | private bool IsRoot([NotNull] object o) 811 | { 812 | return rootTypes.Any(t => t.IsInstanceOfType(o)); 813 | } 814 | 815 | private bool IsForbidden([NotNull] object o) 816 | { 817 | return forbiddenTypes.Any(t => t.IsInstanceOfType(o)); 818 | } 819 | 820 | private bool IsForbiddenType([NotNull] Type type) 821 | { 822 | return forbiddenTypes.Any(t => t.IsAssignableFrom(type)); 823 | } 824 | 825 | private static bool IsValidAssembly(Assembly assembly) 826 | { 827 | if (assembly.FullName.StartsWith("UnityEditor.")) 828 | return false; 829 | if (assembly.FullName.StartsWith("UnityScript.")) 830 | return false; 831 | if (assembly.FullName.StartsWith("Boo.")) 832 | return false; 833 | if (assembly.FullName.StartsWith("ExCSS.")) 834 | return false; 835 | if (assembly.FullName.StartsWith("I18N")) 836 | return false; 837 | if (assembly.FullName.StartsWith("Microsoft.")) 838 | return false; 839 | if (assembly.FullName.StartsWith("System")) 840 | return false; 841 | if (assembly.FullName.StartsWith("SyntaxTree.")) 842 | return false; 843 | if (assembly.FullName.StartsWith("mscorlib")) 844 | return false; 845 | if (assembly.FullName.StartsWith("Windows.")) 846 | return false; 847 | return true; 848 | } 849 | } 850 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/HeapSnapshotCollector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51955c4714d9b6040b88467331c6655d 3 | timeCreated: 1513941012 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/InstanceStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JetBrains.Annotations; 4 | using UnityEngine.Profiling; 5 | 6 | namespace UnityHeapCrawler 7 | { 8 | internal class InstanceStats : IComparable 9 | { 10 | [NotNull] 11 | public readonly object Instance; 12 | 13 | public long Size; 14 | 15 | public long NativeSize 16 | { 17 | get 18 | { 19 | var unityObject = Instance as UnityEngine.Object; 20 | if (unityObject != null) 21 | return Profiler.GetRuntimeMemorySizeLong(unityObject); 22 | return -1L; 23 | } 24 | } 25 | 26 | [NotNull] 27 | public List RootPaths = new List(); 28 | 29 | public InstanceStats([NotNull] object instance) 30 | { 31 | Instance = instance; 32 | } 33 | 34 | public int CompareTo(InstanceStats other) 35 | { 36 | if (ReferenceEquals(this, other)) return 0; 37 | if (ReferenceEquals(null, other)) return 1; 38 | 39 | long total = Size + NativeSize; 40 | long otherTotal = other.Size + other.NativeSize; 41 | // descending 42 | return otherTotal.CompareTo(total); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/InstanceStats.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b40321afba9742a4bba58f1339472f25 3 | timeCreated: 1514204795 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/ReferenceEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Runtime.CompilerServices; 4 | using JetBrains.Annotations; 5 | 6 | namespace UnityHeapCrawler 7 | { 8 | internal class ReferenceEqualityComparer : IEqualityComparer 9 | { 10 | [NotNull] 11 | public static ReferenceEqualityComparer Instance = new ReferenceEqualityComparer(); 12 | 13 | public new bool Equals(object x, object y) 14 | { 15 | return ReferenceEquals(x, y); 16 | } 17 | 18 | public int GetHashCode(object o) 19 | { 20 | return RuntimeHelpers.GetHashCode(o); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/ReferenceEqualityComparer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18b341550d38a984fa7de075a9febb69 3 | timeCreated: 1513961940 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SizeFormat.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using JetBrains.Annotations; 3 | 4 | namespace UnityHeapCrawler 5 | { 6 | public enum SizeFormat 7 | { 8 | Short, 9 | Precise, 10 | Combined 11 | } 12 | 13 | public static class SizeFormatEx 14 | { 15 | [NotNull] 16 | public static string Format(this SizeFormat format, long size) 17 | { 18 | if (format == SizeFormat.Precise) 19 | return size.ToString(); 20 | 21 | long quantumSize = 1; 22 | int postfixIndex = 0; 23 | while (quantumSize * 1024 < size && postfixIndex < 4) 24 | { 25 | quantumSize *= 1024; 26 | postfixIndex++; 27 | } 28 | 29 | double value = 1.0 * size / quantumSize; 30 | string shortString; 31 | if (postfixIndex == 0) 32 | shortString = size.ToString(CultureInfo.InvariantCulture); 33 | else if (value >= 9.995) 34 | shortString = value.ToString("F1", CultureInfo.InvariantCulture); 35 | else 36 | shortString = value.ToString("F2", CultureInfo.InvariantCulture); 37 | shortString += " "; 38 | 39 | switch (postfixIndex) 40 | { 41 | case 0: 42 | shortString += "bytes"; 43 | break; 44 | case 1: 45 | shortString += "KB"; 46 | break; 47 | case 2: 48 | shortString += "MB"; 49 | break; 50 | case 3: 51 | shortString += "GB"; 52 | break; 53 | case 4: 54 | shortString += "TB"; 55 | break; 56 | default: 57 | shortString += "Unknown Qualifier"; 58 | break; 59 | } 60 | 61 | if (format == SizeFormat.Short) 62 | return shortString; 63 | else 64 | return shortString + " (" + size + ")"; 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SizeFormat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c6276a190ec0d244ad9e26542db5a45 3 | timeCreated: 1514223513 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SizeMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityHeapCrawler 4 | { 5 | public enum SizeMode 6 | { 7 | Managed, 8 | Native, 9 | Total 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SizeMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f3e9811cd7f6674582a9fd326cde7e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SnapshotHistory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.CompilerServices; 4 | using JetBrains.Annotations; 5 | 6 | namespace UnityHeapCrawler 7 | { 8 | internal static class SnapshotHistory 9 | { 10 | [CanBeNull] 11 | private static ConditionalWeakTable seenObjects; 12 | 13 | public static bool IsNew(object o) 14 | { 15 | if (seenObjects == null) 16 | return true; 17 | 18 | if (ReferenceEquals(o, null)) 19 | return false; 20 | 21 | if (o.GetType().IsValueType) 22 | return false; 23 | 24 | object v; 25 | return !seenObjects.TryGetValue(o, out v); 26 | } 27 | 28 | public static void Store(IEnumerable visitedObjects) 29 | { 30 | seenObjects = new ConditionalWeakTable(); 31 | foreach (var o in visitedObjects) 32 | { 33 | seenObjects.Add(o, o); 34 | } 35 | } 36 | 37 | public static bool IsPresent() 38 | { 39 | return seenObjects != null; 40 | } 41 | 42 | public static void Clear() 43 | { 44 | seenObjects = null; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/SnapshotHistory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26938a17a92f7eb49b4c4a1a2fba15ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace UnityHeapCrawler 7 | { 8 | internal class TypeData 9 | { 10 | public int Size { get; private set; } 11 | public List DynamicSizedFields { get; private set; } 12 | 13 | private static Dictionary seenTypeData; 14 | private static Dictionary seenTypeDataNested; 15 | 16 | public static void Clear() 17 | { 18 | seenTypeData = null; 19 | } 20 | 21 | public static void Start() 22 | { 23 | seenTypeData = new Dictionary(); 24 | seenTypeDataNested = new Dictionary(); 25 | } 26 | 27 | public static TypeData Get(Type type) 28 | { 29 | TypeData data; 30 | if (!seenTypeData.TryGetValue(type, out data)) 31 | { 32 | data = new TypeData(type); 33 | seenTypeData[type] = data; 34 | } 35 | return data; 36 | } 37 | 38 | public static TypeData GetNested(Type type) 39 | { 40 | TypeData data; 41 | if (!seenTypeDataNested.TryGetValue(type, out data)) 42 | { 43 | data = new TypeData(type, true); 44 | seenTypeDataNested[type] = data; 45 | } 46 | return data; 47 | } 48 | 49 | public TypeData(Type type, bool nested = false) 50 | { 51 | var baseType = type.BaseType; 52 | if (baseType != null 53 | && baseType != typeof(object) 54 | && baseType != typeof(ValueType) 55 | && baseType != typeof(Array) 56 | && baseType != typeof(Enum)) 57 | { 58 | var baseTypeData = GetNested(baseType); 59 | Size += baseTypeData.Size; 60 | 61 | if (baseTypeData.DynamicSizedFields != null) 62 | { 63 | DynamicSizedFields = new List(baseTypeData.DynamicSizedFields); 64 | } 65 | } 66 | if (type.IsPointer) 67 | { 68 | Size = IntPtr.Size; 69 | } 70 | else if (type.IsArray) 71 | { 72 | var elementType = type.GetElementType(); 73 | Size = ((elementType.IsValueType || elementType.IsPrimitive || elementType.IsEnum) ? 3 : 4) * IntPtr.Size; 74 | } 75 | else if (type.IsPrimitive) 76 | { 77 | Size = Marshal.SizeOf(type); 78 | } 79 | else if (type.IsEnum) 80 | { 81 | Size = Marshal.SizeOf(Enum.GetUnderlyingType(type)); 82 | } 83 | else // struct, class 84 | { 85 | if (!nested && type.IsClass) 86 | { 87 | Size = 2 * IntPtr.Size; 88 | } 89 | foreach (var field in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) 90 | { 91 | ProcessField(field, field.FieldType); 92 | } 93 | if (!nested && type.IsClass) 94 | { 95 | Size = Math.Max(3 * IntPtr.Size, Size); 96 | int pad = Size % IntPtr.Size; 97 | if (pad != 0) 98 | { 99 | Size += IntPtr.Size - pad; 100 | } 101 | } 102 | } 103 | } 104 | 105 | private void ProcessField(FieldInfo field, Type fieldType) 106 | { 107 | if (IsStaticallySized(fieldType)) 108 | { 109 | Size += GetStaticSize(fieldType); 110 | } 111 | else 112 | { 113 | if (!(fieldType.IsValueType || fieldType.IsPrimitive || fieldType.IsEnum)) 114 | { 115 | Size += IntPtr.Size; 116 | } 117 | if (fieldType.IsPointer) 118 | { 119 | return; 120 | } 121 | if (DynamicSizedFields == null) 122 | { 123 | DynamicSizedFields = new List(); 124 | } 125 | DynamicSizedFields.Add(field); 126 | } 127 | } 128 | 129 | private static bool IsStaticallySized(Type type) 130 | { 131 | 132 | if (type.IsPointer || type.IsArray || type.IsClass || type.IsInterface) 133 | { 134 | return false; 135 | } 136 | if (type.IsPrimitive || type.IsEnum) 137 | { 138 | return true; 139 | } 140 | foreach (var nestedField in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) 141 | { 142 | if (!IsStaticallySized(nestedField.FieldType)) 143 | { 144 | return false; 145 | } 146 | } 147 | return true; 148 | } 149 | 150 | /// 151 | /// Gets size of type. Assumes IsStaticallySized (type) is true. (primitive, enum, {struct or class with no references in it}) 152 | /// 153 | private static int GetStaticSize(Type type) 154 | { 155 | if (type.IsPrimitive) 156 | { 157 | return Marshal.SizeOf(type); 158 | } 159 | if (type.IsEnum) 160 | { 161 | return Marshal.SizeOf(Enum.GetUnderlyingType(type)); 162 | } 163 | int size = 0; 164 | foreach (var nestedField in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) 165 | { 166 | size += GetStaticSize(nestedField.FieldType); 167 | } 168 | return size; 169 | } 170 | } 171 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbea0e4bf2aa725499126f7eb0dceb15 3 | timeCreated: 1513952476 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace UnityHeapCrawler 5 | { 6 | // type extensions 7 | public static class TypeEx 8 | { 9 | public static string GetDisplayName(this Type type) 10 | { 11 | if (!type.IsGenericType) 12 | { 13 | return type.Name; 14 | } 15 | 16 | var genericNames = type.GetGenericArguments() 17 | .Select(g => g.Name) 18 | .ToArray(); 19 | string genericArgs = string.Join(", ", genericNames); 20 | return type.Name + "<" + genericArgs + ">"; 21 | } 22 | 23 | public static string GetFileName(this Type type) 24 | { 25 | if (!type.IsGenericType) 26 | { 27 | return type.Name; 28 | } 29 | 30 | var genericNames = type.GetGenericArguments() 31 | .Select(g => g.Name) 32 | .ToArray(); 33 | string genericArgs = string.Join("_", genericNames); 34 | return type.Name + "_" + genericArgs; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeEx.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1592bac36f145c348bd7f5512a25360d 3 | timeCreated: 1514191429 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeSizeMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityHeapCrawler 4 | { 5 | internal enum TypeSizeMode 6 | { 7 | Self, 8 | Total, 9 | Native 10 | } 11 | 12 | internal static class TypeSizeModeEx 13 | { 14 | public static long GetSize(this TypeSizeMode mode, TypeStats typeStats) 15 | { 16 | switch (mode) 17 | { 18 | case TypeSizeMode.Self: 19 | return typeStats.SelfSize; 20 | case TypeSizeMode.Total: 21 | return typeStats.TotalSize; 22 | case TypeSizeMode.Native: 23 | return typeStats.NativeSize; 24 | default: 25 | throw new ArgumentOutOfRangeException(nameof(mode), mode, null); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeSizeMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a18118f9826f22143a5c5140588835b6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeStats.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JetBrains.Annotations; 5 | using UnityEditor; 6 | using UnityEngine.Profiling; 7 | 8 | namespace UnityHeapCrawler 9 | { 10 | internal class TypeStats : IComparable 11 | { 12 | [NotNull] 13 | public static readonly Dictionary Data = new Dictionary(); 14 | 15 | [NotNull] 16 | public static readonly HashSet TrackedTypes = new HashSet(); 17 | 18 | [NotNull] 19 | public readonly Type Type; 20 | 21 | public long SelfSize; 22 | 23 | public long TotalSize; 24 | 25 | public long NativeSize; 26 | 27 | public int Count; 28 | 29 | private readonly bool tracked; 30 | 31 | [NotNull] 32 | public readonly Dictionary Instances = new Dictionary(ReferenceEqualityComparer.Instance); 33 | 34 | public static void Init(List trackedTypes) 35 | { 36 | Data.Clear(); 37 | TrackedTypes.Clear(); 38 | 39 | foreach (var t in trackedTypes) 40 | { 41 | TrackedTypes.Add(t); 42 | } 43 | } 44 | 45 | public static void RegisterItem([NotNull] CrawlItem item) 46 | { 47 | if (!SnapshotHistory.IsNew(item.Object)) 48 | return; 49 | 50 | var stats = DemandTypeStats(item.Object.GetType()); 51 | 52 | stats.Count++; 53 | stats.SelfSize += item.SelfSize; 54 | stats.TotalSize += item.TotalSize; 55 | 56 | var unityObject = item.Object as UnityEngine.Object; 57 | if (unityObject != null) 58 | stats.NativeSize += Profiler.GetRuntimeMemorySizeLong(unityObject); 59 | 60 | if (stats.tracked) 61 | stats.DemandInstanceStats(item.Object).Size = item.TotalSize; 62 | } 63 | 64 | public static void RegisterInstance([NotNull] CrawlItem parent, [NotNull] string name, [NotNull] object instance) 65 | { 66 | if (!SnapshotHistory.IsNew(instance)) 67 | return; 68 | 69 | var stats = DemandTypeStats(instance.GetType()); 70 | if (!stats.tracked) 71 | return; 72 | 73 | var instanceStats = stats.DemandInstanceStats(instance); 74 | var rootPath = parent.GetRootPath() + "." + name; 75 | instanceStats.RootPaths.Add(rootPath); 76 | } 77 | 78 | private TypeStats([NotNull] Type type) 79 | { 80 | Type = type; 81 | tracked = TrackedTypes.Any(t => t.IsAssignableFrom(type)); 82 | } 83 | 84 | public int CompareTo([CanBeNull] TypeStats other) 85 | { 86 | if (ReferenceEquals(this, other)) return 0; 87 | if (ReferenceEquals(null, other)) return 1; 88 | 89 | // descending 90 | return other.SelfSize.CompareTo(SelfSize); 91 | } 92 | 93 | [NotNull] 94 | private static TypeStats DemandTypeStats([NotNull] Type type) 95 | { 96 | TypeStats stats; 97 | if (!Data.TryGetValue(type, out stats)) 98 | { 99 | stats = new TypeStats(type); 100 | Data[type] = stats; 101 | } 102 | return stats; 103 | } 104 | 105 | [NotNull] 106 | private InstanceStats DemandInstanceStats([NotNull] object instance) 107 | { 108 | InstanceStats stats; 109 | if (!Instances.TryGetValue(instance, out stats)) 110 | { 111 | stats = new InstanceStats(instance); 112 | Instances[instance] = stats; 113 | } 114 | return stats; 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /Assets/UnityHeapCrawler/TypeStats.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d0e39a07c81a5f4686b431184d95965 3 | timeCreated: 1514190371 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /DreamMemoryAnalyzer.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 My.com B.V. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 0 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | m_CollabEditorSettings: 16 | inProgressEnabled: 1 17 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | m_SettingNames: 89 | - Humanoid 90 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AlwaysShowColliders: 0 28 | m_ShowColliderSleep: 1 29 | m_ShowColliderContacts: 0 30 | m_ShowColliderAABB: 0 31 | m_ContactArrowScale: 0.2 32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 37 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: 3c41a0b8d1fa444478f929bfc62b11c1 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: DreamMemoryAnalyzer 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | tizenShowActivityIndicatorOnLoading: -1 56 | iosAppInBackgroundBehavior: 0 57 | displayResolutionDialog: 1 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidBlitType: 0 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 0 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | n3dsDisableStereoscopicView: 0 101 | n3dsEnableSharedListOpt: 1 102 | n3dsEnableVSync: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | m_SupportedAspectRatios: 115 | 4:3: 1 116 | 5:4: 1 117 | 16:10: 1 118 | 16:9: 1 119 | Others: 1 120 | bundleVersion: 1.0 121 | preloadedAssets: [] 122 | metroInputSource: 0 123 | wsaTransparentSwapchain: 0 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | enableVideoLayer: 0 135 | useProtectedVideoMemory: 0 136 | minimumSupportedHeadTracking: 0 137 | maximumSupportedHeadTracking: 1 138 | hololens: 139 | depthFormat: 1 140 | depthBufferSharingEnabled: 0 141 | enable360StereoCapture: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | protectGraphicsMemory: 0 146 | useHDRDisplay: 0 147 | m_ColorGamuts: 00000000 148 | targetPixelDensity: 30 149 | resolutionScalingMode: 0 150 | androidSupportedAspectRatio: 1 151 | androidMaxAspectRatio: 2.1 152 | applicationIdentifier: {} 153 | buildNumber: {} 154 | AndroidBundleVersionCode: 1 155 | AndroidMinSdkVersion: 16 156 | AndroidTargetSdkVersion: 0 157 | AndroidPreferredInstallLocation: 1 158 | aotOptions: 159 | stripEngineCode: 1 160 | iPhoneStrippingLevel: 0 161 | iPhoneScriptCallOptimization: 0 162 | ForceInternetPermission: 0 163 | ForceSDCardPermission: 0 164 | CreateWallpaper: 0 165 | APKExpansionFiles: 0 166 | keepLoadedShadersAlive: 0 167 | StripUnusedMeshComponents: 0 168 | VertexChannelCompressionMask: 214 169 | iPhoneSdkVersion: 988 170 | iOSTargetOSVersionString: 8.0 171 | tvOSSdkVersion: 0 172 | tvOSRequireExtendedGameController: 0 173 | tvOSTargetOSVersionString: 9.0 174 | uIPrerenderedIcon: 0 175 | uIRequiresPersistentWiFi: 0 176 | uIRequiresFullScreen: 1 177 | uIStatusBarHidden: 1 178 | uIExitOnSuspend: 0 179 | uIStatusBarStyle: 0 180 | iPhoneSplashScreen: {fileID: 0} 181 | iPhoneHighResSplashScreen: {fileID: 0} 182 | iPhoneTallHighResSplashScreen: {fileID: 0} 183 | iPhone47inSplashScreen: {fileID: 0} 184 | iPhone55inPortraitSplashScreen: {fileID: 0} 185 | iPhone55inLandscapeSplashScreen: {fileID: 0} 186 | iPhone58inPortraitSplashScreen: {fileID: 0} 187 | iPhone58inLandscapeSplashScreen: {fileID: 0} 188 | iPadPortraitSplashScreen: {fileID: 0} 189 | iPadHighResPortraitSplashScreen: {fileID: 0} 190 | iPadLandscapeSplashScreen: {fileID: 0} 191 | iPadHighResLandscapeSplashScreen: {fileID: 0} 192 | appleTVSplashScreen: {fileID: 0} 193 | appleTVSplashScreen2x: {fileID: 0} 194 | tvOSSmallIconLayers: [] 195 | tvOSSmallIconLayers2x: [] 196 | tvOSLargeIconLayers: [] 197 | tvOSLargeIconLayers2x: [] 198 | tvOSTopShelfImageLayers: [] 199 | tvOSTopShelfImageLayers2x: [] 200 | tvOSTopShelfImageWideLayers: [] 201 | tvOSTopShelfImageWideLayers2x: [] 202 | iOSLaunchScreenType: 0 203 | iOSLaunchScreenPortrait: {fileID: 0} 204 | iOSLaunchScreenLandscape: {fileID: 0} 205 | iOSLaunchScreenBackgroundColor: 206 | serializedVersion: 2 207 | rgba: 0 208 | iOSLaunchScreenFillPct: 100 209 | iOSLaunchScreenSize: 100 210 | iOSLaunchScreenCustomXibPath: 211 | iOSLaunchScreeniPadType: 0 212 | iOSLaunchScreeniPadImage: {fileID: 0} 213 | iOSLaunchScreeniPadBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreeniPadFillPct: 100 217 | iOSLaunchScreeniPadSize: 100 218 | iOSLaunchScreeniPadCustomXibPath: 219 | iOSUseLaunchScreenStoryboard: 0 220 | iOSLaunchScreenCustomStoryboardPath: 221 | iOSDeviceRequirements: [] 222 | iOSURLSchemes: [] 223 | iOSBackgroundModes: 0 224 | iOSMetalForceHardShadows: 0 225 | metalEditorSupport: 1 226 | metalAPIValidation: 1 227 | iOSRenderExtraFrameOnPause: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | appleEnableAutomaticSigning: 0 232 | iOSRequireARKit: 0 233 | appleEnableProMotion: 0 234 | clonedFromGUID: 00000000000000000000000000000000 235 | templatePackageId: 236 | templateDefaultScene: 237 | AndroidTargetArchitectures: 5 238 | AndroidSplashScreenScale: 0 239 | androidSplashScreen: {fileID: 0} 240 | AndroidKeystoreName: 241 | AndroidKeyaliasName: 242 | AndroidTVCompatibility: 1 243 | AndroidIsGame: 1 244 | AndroidEnableTango: 0 245 | androidEnableBanner: 1 246 | androidUseLowAccuracyLocation: 0 247 | m_AndroidBanners: 248 | - width: 320 249 | height: 180 250 | banner: {fileID: 0} 251 | androidGamepadSupportLevel: 0 252 | resolutionDialogBanner: {fileID: 0} 253 | m_BuildTargetIcons: [] 254 | m_BuildTargetPlatformIcons: [] 255 | m_BuildTargetBatching: [] 256 | m_BuildTargetGraphicsAPIs: [] 257 | m_BuildTargetVRSettings: [] 258 | m_BuildTargetEnableVuforiaSettings: [] 259 | openGLRequireES31: 0 260 | openGLRequireES31AEP: 0 261 | m_TemplateCustomTags: {} 262 | mobileMTRendering: 263 | Android: 1 264 | iPhone: 1 265 | tvOS: 1 266 | m_BuildTargetGroupLightmapEncodingQuality: 267 | - m_BuildTarget: Standalone 268 | m_EncodingQuality: 1 269 | - m_BuildTarget: XboxOne 270 | m_EncodingQuality: 1 271 | - m_BuildTarget: PS4 272 | m_EncodingQuality: 1 273 | playModeTestRunnerEnabled: 0 274 | runPlayModeTestAsEditModeTest: 0 275 | actionOnDotNetUnhandledException: 1 276 | enableInternalProfiler: 0 277 | logObjCUncaughtExceptions: 1 278 | enableCrashReportAPI: 0 279 | cameraUsageDescription: 280 | locationUsageDescription: 281 | microphoneUsageDescription: 282 | switchNetLibKey: 283 | switchSocketMemoryPoolSize: 6144 284 | switchSocketAllocatorPoolSize: 128 285 | switchSocketConcurrencyLimit: 14 286 | switchScreenResolutionBehavior: 2 287 | switchUseCPUProfiler: 0 288 | switchApplicationID: 0x01004b9000490000 289 | switchNSODependencies: 290 | switchTitleNames_0: 291 | switchTitleNames_1: 292 | switchTitleNames_2: 293 | switchTitleNames_3: 294 | switchTitleNames_4: 295 | switchTitleNames_5: 296 | switchTitleNames_6: 297 | switchTitleNames_7: 298 | switchTitleNames_8: 299 | switchTitleNames_9: 300 | switchTitleNames_10: 301 | switchTitleNames_11: 302 | switchTitleNames_12: 303 | switchTitleNames_13: 304 | switchTitleNames_14: 305 | switchPublisherNames_0: 306 | switchPublisherNames_1: 307 | switchPublisherNames_2: 308 | switchPublisherNames_3: 309 | switchPublisherNames_4: 310 | switchPublisherNames_5: 311 | switchPublisherNames_6: 312 | switchPublisherNames_7: 313 | switchPublisherNames_8: 314 | switchPublisherNames_9: 315 | switchPublisherNames_10: 316 | switchPublisherNames_11: 317 | switchPublisherNames_12: 318 | switchPublisherNames_13: 319 | switchPublisherNames_14: 320 | switchIcons_0: {fileID: 0} 321 | switchIcons_1: {fileID: 0} 322 | switchIcons_2: {fileID: 0} 323 | switchIcons_3: {fileID: 0} 324 | switchIcons_4: {fileID: 0} 325 | switchIcons_5: {fileID: 0} 326 | switchIcons_6: {fileID: 0} 327 | switchIcons_7: {fileID: 0} 328 | switchIcons_8: {fileID: 0} 329 | switchIcons_9: {fileID: 0} 330 | switchIcons_10: {fileID: 0} 331 | switchIcons_11: {fileID: 0} 332 | switchIcons_12: {fileID: 0} 333 | switchIcons_13: {fileID: 0} 334 | switchIcons_14: {fileID: 0} 335 | switchSmallIcons_0: {fileID: 0} 336 | switchSmallIcons_1: {fileID: 0} 337 | switchSmallIcons_2: {fileID: 0} 338 | switchSmallIcons_3: {fileID: 0} 339 | switchSmallIcons_4: {fileID: 0} 340 | switchSmallIcons_5: {fileID: 0} 341 | switchSmallIcons_6: {fileID: 0} 342 | switchSmallIcons_7: {fileID: 0} 343 | switchSmallIcons_8: {fileID: 0} 344 | switchSmallIcons_9: {fileID: 0} 345 | switchSmallIcons_10: {fileID: 0} 346 | switchSmallIcons_11: {fileID: 0} 347 | switchSmallIcons_12: {fileID: 0} 348 | switchSmallIcons_13: {fileID: 0} 349 | switchSmallIcons_14: {fileID: 0} 350 | switchManualHTML: 351 | switchAccessibleURLs: 352 | switchLegalInformation: 353 | switchMainThreadStackSize: 1048576 354 | switchPresenceGroupId: 355 | switchLogoHandling: 0 356 | switchReleaseVersion: 0 357 | switchDisplayVersion: 1.0.0 358 | switchStartupUserAccount: 0 359 | switchTouchScreenUsage: 0 360 | switchSupportedLanguagesMask: 0 361 | switchLogoType: 0 362 | switchApplicationErrorCodeCategory: 363 | switchUserAccountSaveDataSize: 0 364 | switchUserAccountSaveDataJournalSize: 0 365 | switchApplicationAttribute: 0 366 | switchCardSpecSize: -1 367 | switchCardSpecClock: -1 368 | switchRatingsMask: 0 369 | switchRatingsInt_0: 0 370 | switchRatingsInt_1: 0 371 | switchRatingsInt_2: 0 372 | switchRatingsInt_3: 0 373 | switchRatingsInt_4: 0 374 | switchRatingsInt_5: 0 375 | switchRatingsInt_6: 0 376 | switchRatingsInt_7: 0 377 | switchRatingsInt_8: 0 378 | switchRatingsInt_9: 0 379 | switchRatingsInt_10: 0 380 | switchRatingsInt_11: 0 381 | switchLocalCommunicationIds_0: 382 | switchLocalCommunicationIds_1: 383 | switchLocalCommunicationIds_2: 384 | switchLocalCommunicationIds_3: 385 | switchLocalCommunicationIds_4: 386 | switchLocalCommunicationIds_5: 387 | switchLocalCommunicationIds_6: 388 | switchLocalCommunicationIds_7: 389 | switchParentalControl: 0 390 | switchAllowsScreenshot: 1 391 | switchAllowsVideoCapturing: 1 392 | switchAllowsRuntimeAddOnContentInstall: 0 393 | switchDataLossConfirmation: 0 394 | switchSupportedNpadStyles: 3 395 | switchSocketConfigEnabled: 0 396 | switchTcpInitialSendBufferSize: 32 397 | switchTcpInitialReceiveBufferSize: 64 398 | switchTcpAutoSendBufferSizeMax: 256 399 | switchTcpAutoReceiveBufferSizeMax: 256 400 | switchUdpSendBufferSize: 9 401 | switchUdpReceiveBufferSize: 42 402 | switchSocketBufferEfficiency: 4 403 | switchSocketInitializeEnabled: 1 404 | switchNetworkInterfaceManagerInitializeEnabled: 1 405 | switchPlayerConnectionEnabled: 1 406 | ps4NPAgeRating: 12 407 | ps4NPTitleSecret: 408 | ps4NPTrophyPackPath: 409 | ps4ParentalLevel: 11 410 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 411 | ps4Category: 0 412 | ps4MasterVersion: 01.00 413 | ps4AppVersion: 01.00 414 | ps4AppType: 0 415 | ps4ParamSfxPath: 416 | ps4VideoOutPixelFormat: 0 417 | ps4VideoOutInitialWidth: 1920 418 | ps4VideoOutBaseModeInitialWidth: 1920 419 | ps4VideoOutReprojectionRate: 120 420 | ps4PronunciationXMLPath: 421 | ps4PronunciationSIGPath: 422 | ps4BackgroundImagePath: 423 | ps4StartupImagePath: 424 | ps4StartupImagesFolder: 425 | ps4IconImagesFolder: 426 | ps4SaveDataImagePath: 427 | ps4SdkOverride: 428 | ps4BGMPath: 429 | ps4ShareFilePath: 430 | ps4ShareOverlayImagePath: 431 | ps4PrivacyGuardImagePath: 432 | ps4NPtitleDatPath: 433 | ps4RemotePlayKeyAssignment: -1 434 | ps4RemotePlayKeyMappingDir: 435 | ps4PlayTogetherPlayerCount: 0 436 | ps4EnterButtonAssignment: 1 437 | ps4ApplicationParam1: 0 438 | ps4ApplicationParam2: 0 439 | ps4ApplicationParam3: 0 440 | ps4ApplicationParam4: 0 441 | ps4DownloadDataSize: 0 442 | ps4GarlicHeapSize: 2048 443 | ps4ProGarlicHeapSize: 2560 444 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 445 | ps4pnSessions: 1 446 | ps4pnPresence: 1 447 | ps4pnFriends: 1 448 | ps4pnGameCustomData: 1 449 | playerPrefsSupport: 0 450 | enableApplicationExit: 0 451 | restrictedAudioUsageRights: 0 452 | ps4UseResolutionFallback: 0 453 | ps4ReprojectionSupport: 0 454 | ps4UseAudio3dBackend: 0 455 | ps4SocialScreenEnabled: 0 456 | ps4ScriptOptimizationLevel: 0 457 | ps4Audio3dVirtualSpeakerCount: 14 458 | ps4attribCpuUsage: 0 459 | ps4PatchPkgPath: 460 | ps4PatchLatestPkgPath: 461 | ps4PatchChangeinfoPath: 462 | ps4PatchDayOne: 0 463 | ps4attribUserManagement: 0 464 | ps4attribMoveSupport: 0 465 | ps4attrib3DSupport: 0 466 | ps4attribShareSupport: 0 467 | ps4attribExclusiveVR: 0 468 | ps4disableAutoHideSplash: 0 469 | ps4videoRecordingFeaturesUsed: 0 470 | ps4contentSearchFeaturesUsed: 0 471 | ps4attribEyeToEyeDistanceSettingVR: 0 472 | ps4IncludedModules: [] 473 | monoEnv: 474 | psp2Splashimage: {fileID: 0} 475 | psp2NPTrophyPackPath: 476 | psp2NPSupportGBMorGJP: 0 477 | psp2NPAgeRating: 12 478 | psp2NPTitleDatPath: 479 | psp2NPCommsID: 480 | psp2NPCommunicationsID: 481 | psp2NPCommsPassphrase: 482 | psp2NPCommsSig: 483 | psp2ParamSfxPath: 484 | psp2ManualPath: 485 | psp2LiveAreaGatePath: 486 | psp2LiveAreaBackroundPath: 487 | psp2LiveAreaPath: 488 | psp2LiveAreaTrialPath: 489 | psp2PatchChangeInfoPath: 490 | psp2PatchOriginalPackage: 491 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 492 | psp2KeystoneFile: 493 | psp2MemoryExpansionMode: 0 494 | psp2DRMType: 0 495 | psp2StorageType: 0 496 | psp2MediaCapacity: 0 497 | psp2DLCConfigPath: 498 | psp2ThumbnailPath: 499 | psp2BackgroundPath: 500 | psp2SoundPath: 501 | psp2TrophyCommId: 502 | psp2TrophyPackagePath: 503 | psp2PackagedResourcesPath: 504 | psp2SaveDataQuota: 10240 505 | psp2ParentalLevel: 1 506 | psp2ShortTitle: Not Set 507 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 508 | psp2Category: 0 509 | psp2MasterVersion: 01.00 510 | psp2AppVersion: 01.00 511 | psp2TVBootMode: 0 512 | psp2EnterButtonAssignment: 2 513 | psp2TVDisableEmu: 0 514 | psp2AllowTwitterDialog: 1 515 | psp2Upgradable: 0 516 | psp2HealthWarning: 0 517 | psp2UseLibLocation: 0 518 | psp2InfoBarOnStartup: 0 519 | psp2InfoBarColor: 0 520 | psp2ScriptOptimizationLevel: 0 521 | splashScreenBackgroundSourceLandscape: {fileID: 0} 522 | splashScreenBackgroundSourcePortrait: {fileID: 0} 523 | spritePackerPolicy: 524 | webGLMemorySize: 256 525 | webGLExceptionSupport: 1 526 | webGLNameFilesAsHashes: 0 527 | webGLDataCaching: 0 528 | webGLDebugSymbols: 0 529 | webGLEmscriptenArgs: 530 | webGLModulesDirectory: 531 | webGLTemplate: APPLICATION:Default 532 | webGLAnalyzeBuildSize: 0 533 | webGLUseEmbeddedResources: 0 534 | webGLCompressionFormat: 1 535 | webGLLinkerTarget: 0 536 | scriptingDefineSymbols: {} 537 | platformArchitecture: {} 538 | scriptingBackend: {} 539 | il2cppCompilerConfiguration: {} 540 | incrementalIl2cppBuild: {} 541 | allowUnsafeCode: 0 542 | additionalIl2CppArgs: 543 | scriptingRuntimeVersion: 1 544 | apiCompatibilityLevelPerPlatform: 545 | Standalone: 1 546 | m_RenderingPath: 1 547 | m_MobileRenderingPath: 1 548 | metroPackageName: DreamMemoryAnalyzer 549 | metroPackageVersion: 550 | metroCertificatePath: 551 | metroCertificatePassword: 552 | metroCertificateSubject: 553 | metroCertificateIssuer: 554 | metroCertificateNotAfter: 0000000000000000 555 | metroApplicationDescription: DreamMemoryAnalyzer 556 | wsaImages: {} 557 | metroTileShortName: 558 | metroCommandLineArgsFile: 559 | metroTileShowName: 0 560 | metroMediumTileShowName: 0 561 | metroLargeTileShowName: 0 562 | metroWideTileShowName: 0 563 | metroDefaultTileSize: 1 564 | metroTileForegroundText: 2 565 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 566 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 567 | a: 1} 568 | metroSplashScreenUseBackgroundColor: 0 569 | platformCapabilities: {} 570 | metroFTAName: 571 | metroFTAFileTypes: [] 572 | metroProtocolName: 573 | metroCompilationOverrides: 1 574 | tizenProductDescription: 575 | tizenProductURL: 576 | tizenSigningProfileName: 577 | tizenGPSPermissions: 0 578 | tizenMicrophonePermissions: 0 579 | tizenDeploymentTarget: 580 | tizenDeploymentTargetType: -1 581 | tizenMinOSVersion: 1 582 | n3dsUseExtSaveData: 0 583 | n3dsCompressStaticMem: 1 584 | n3dsExtSaveDataNumber: 0x12345 585 | n3dsStackSize: 131072 586 | n3dsTargetPlatform: 2 587 | n3dsRegion: 7 588 | n3dsMediaSize: 0 589 | n3dsLogoStyle: 3 590 | n3dsTitle: GameName 591 | n3dsProductCode: 592 | n3dsApplicationId: 0xFF3FF 593 | XboxOneProductId: 594 | XboxOneUpdateKey: 595 | XboxOneSandboxId: 596 | XboxOneContentId: 597 | XboxOneTitleId: 598 | XboxOneSCId: 599 | XboxOneGameOsOverridePath: 600 | XboxOnePackagingOverridePath: 601 | XboxOneAppManifestOverridePath: 602 | XboxOnePackageEncryption: 0 603 | XboxOnePackageUpdateGranularity: 2 604 | XboxOneDescription: 605 | XboxOneLanguage: 606 | - enus 607 | XboxOneCapability: [] 608 | XboxOneGameRating: {} 609 | XboxOneIsContentPackage: 0 610 | XboxOneEnableGPUVariability: 0 611 | XboxOneSockets: {} 612 | XboxOneSplashScreen: {fileID: 0} 613 | XboxOneAllowedProductIds: [] 614 | XboxOnePersistentLocalStorageSize: 0 615 | XboxOneXTitleMemory: 8 616 | xboxOneScriptCompiler: 0 617 | vrEditorSettings: 618 | daydream: 619 | daydreamIconForeground: {fileID: 0} 620 | daydreamIconBackground: {fileID: 0} 621 | cloudServicesEnabled: {} 622 | facebookSdkVersion: 7.9.4 623 | apiCompatibilityLevel: 2 624 | cloudProjectId: 625 | projectName: 626 | organizationId: 627 | cloudEnabled: 0 628 | enableNativePlatformBackendsForNewInputSystem: 0 629 | disableOldInputManagerSupport: 0 630 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.1.0b11 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | Web: 5 188 | WebGL: 3 189 | WiiU: 5 190 | Windows Store Apps: 5 191 | XboxOne: 5 192 | iPhone: 2 193 | tvOS: 2 194 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Heap Crawler 2 | 3 | Customizable heap snapshotting tool for Unity game engine. Can be used to detect memory leaks and analyze high heap usage. 4 | 5 | ## Features 6 | 1. Reflection-based 7 | 2. Results are plain text (see [output example](snapshot-example/)) 8 | 3. Human readable results (objects are traversed using [BFS](https://en.wikipedia.org/wiki/Breadth-first_search)) 9 | 4. Differential mode that displays only new objects in all reports (see [diffs output](snapshot-example-diff/)) 10 | 5. Enable tracking all root paths for specific types (see [output](snapshot-example/types) and [diffs output](snapshot-example-diff/types)) 11 | 6. Little memory overhead - most crawling data is discared after aggregation 12 | 7. Highly customizable - choose between fullness and low memory usage (see [documentation](https://vasyab.github.io/UnityHeapCrawler_Docs/class_unity_heap_crawler_1_1_heap_snapshot_collector.html)) 13 | 8. References to destroyed Unity objects that still take heap space are clearly visible 14 | 9. Unity editor is not needed. You can make a snapshot in build 15 | 16 | ## Motivation 17 | 18 | When heap consumption and memory leaks became problems in our project I could not find a tool that could make a mono heap snapshot to help me find those leaks. 19 | * Builtin Memory Profiler (Profiler window in Editor) is good for analyzing native resources but provides only heap size without any details 20 | * [Unity Memory Profiler](https://bitbucket.org/Unity-Technologies/memoryprofiler) does not collect heap objects on mono runtime (even though patch notes state it does in 2017.1). Also, taking snapshot in our project used up 32GB RAM and that is _without_ heap objects. 21 | * There is no access to mono runtime in Unity so [mono HeapShot](http://www.mono-project.com/archived/heapshot/) is not an option 22 | 23 | Current solution relies heavily on ideas and memory estimation code from previous reflection based crawlers - my collegue's [UnityHeapEx](https://github.com/Cotoff/UnityHeapEx) and [UnityHeapDump](https://github.com/Zuntatos/UnityHeapDump) by [Zuntatos](https://github.com/Zuntatos). I could not use them as is due high memory consumption (all references data won't fit in memory) and low results readability. 24 | 25 | ## Usage 26 | Create `HeapSnapshotCollector` class instance and call `Start()` after setting it up. See [usage example](Assets/Sample/SampleMemorySnapshot.cs) for options overview. Check out 27 | [documentation](https://vasyab.github.io/UnityHeapCrawler_Docs/class_unity_heap_crawler_1_1_heap_snapshot_collector.html) for more detailed options description. 28 | 29 | ## Issues 30 | * Static fields in generic types and not detected. User can supply those Type objects manually 31 | * Type memory usage is an estimation and can be slightly off 32 | 33 | ## Authors 34 | * [**Vasily Boldyrev**](https://github.com/vasyab) - _Owlcat Games_ 35 | 36 | ## Credits 37 | * [Cotoff](https://github.com/Cotoff) for original [UnityHeapEx](https://github.com/Cotoff/UnityHeapEx) 38 | * [Zuntatos](https://github.com/Zuntatos) for another implementation of the same idea [UnityHeapDump](https://github.com/Zuntatos/UnityHeapDump) 39 | 40 | ## Licence 41 | 42 | This code is distributed under the terms and conditions of the MIT license. 43 | -------------------------------------------------------------------------------- /snapshot-example-diff/2-static-fields.txt: -------------------------------------------------------------------------------- 1 | UIElementsUtility.s_UIElementsCache [Dictionary`2] 268.8 KB 2 | entries [Entry[]] 268.8 KB 3 | EditorGUIUtility.s_GUIContents [Hashtable] 31.0 KB 4 | buckets [bucket[]] 31.0 KB 5 | MixerEffectDefinitions.s_MixerEffectDefinitions [List`1] 14.2 KB 6 | _items [MixerEffectDefinition[]] 14.2 KB 7 | AudioMixerWindow.s_Instance [: AudioMixerWindow (3020)] 4.02 KB 8 | m_MixersTree (new) [AudioMixersTreeView] 1.53 KB 9 | m_GroupTree (new) [AudioMixerGroupTreeView] 1.52 KB 10 | ... 11 | ScriptAttributeUtility.s_DrawerTypeForType (new) [Dictionary`2] 3.69 KB 12 | entries (new) [Entry[]] 3.61 KB 13 | ... 14 | ProjectBrowser.s_LastInteractedProjectBrowser [: ProjectBrowser (3030)] 2.86 KB 15 | m_ListArea [ObjectListArea] 1.49 KB 16 | ... 17 | TextureImporterInspector.s_TextureFormatStringsAndroid (new) [String[]] 2.86 KB 18 | GUILayoutUtility.s_StoredLayouts [Dictionary`2] 2.64 KB 19 | entries [Entry[]] 2.64 KB 20 | TextureImporterInspector.s_TextureFormatStringsApplePVR (new) [String[]] 2.56 KB 21 | EditorGUIUtility.s_IconGUIContents [Hashtable] 2.10 KB 22 | buckets [bucket[]] 2.10 KB 23 | TextureImporterInspector.s_TextureFormatStringsSwitch (new) [String[]] 2.10 KB 24 | AssetPostprocessingInternal.m_PostprocessorClasses (new) [ArrayList] 1.80 KB 25 | _items (new) [Object[]] 1.77 KB 26 | SceneHierarchyWindow.s_LastInteractedHierarchy [: SceneHierarchyWindow (3032)] 1.46 KB 27 | m_TreeView [TreeViewController] 1.42 KB 28 | ... 29 | EditorGUI.s_NonObsoleteEnumData [Dictionary`2] 1.09 KB 30 | entries (new) [Entry[]] 1.09 KB 31 | ... 32 | TextureImporterInspector.s_Styles (new) [Styles] 1.07 KB 33 | -------------------------------------------------------------------------------- /snapshot-example-diff/3-hierarchy.txt: -------------------------------------------------------------------------------- 1 | HierarchyObject [HierarchyObject: GameObject (-26450)] 1.54 KB 2 | Child1 [Child1: GameObject (-27044)] 1.54 KB 3 | SpriteHolder3 (new) [SpriteHolder3: GameObject (-1138112)] 1.15 KB 4 | Image (new) [SpriteHolder3: Image (-1138114)] 1.08 KB 5 | m_OnCullStateChanged (new) [CullStateChangedEvent] 528 bytes 6 | m_TypeName (new) [String] 272 bytes 7 | m_Calls (new) [InvokableCallList] 168 bytes 8 | m_PersistentCalls (new) [List`1] 40 bytes 9 | m_RuntimeCalls (new) [List`1] 40 bytes 10 | m_ExecutingCalls (new) [List`1] 40 bytes 11 | m_PersistentCalls (new) [PersistentCallGroup] 64 bytes 12 | m_Calls (new) [List`1] 40 bytes 13 | m_Material (new) (destroyed Unity Object) [Material] 400 bytes 14 | m_ColorTweenRunner (new) [TweenRunner`1] 32 bytes 15 | m_Sprite (new) [NewSprite_Diamond: Sprite (11410)] 24 bytes 16 | ... 17 | CanvasRenderer (new) [SpriteHolder3: CanvasRenderer (-1138118)] 24 bytes 18 | RectTransform (new) [SpriteHolder3: RectTransform (-1138116)] 24 bytes 19 | SpriteHolder2 [SpriteHolder2: GameObject (-31872)] 400 bytes 20 | Image [SpriteHolder2: Image (-34204)] 400 bytes 21 | m_Material (new) (destroyed Unity Object) [Material] 400 bytes 22 | -------------------------------------------------------------------------------- /snapshot-example-diff/7-unity_objects.txt: -------------------------------------------------------------------------------- 1 | (new) [: Object (11408)] 40 bytes 2 | (new) [: TextureImporter (-1137226)] 32 bytes 3 | TextMesh (new) [TextMesh: Mesh (-1139572)] 24 bytes 4 | TextMesh (new) [TextMesh: Mesh (-1139570)] 24 bytes 5 | TextMesh (new) [TextMesh: Mesh (-1139568)] 24 bytes 6 | TextMesh (new) [TextMesh: Mesh (-1139566)] 24 bytes 7 | TextMesh (new) [TextMesh: Mesh (-1139564)] 24 bytes 8 | TextMesh (new) [TextMesh: Mesh (-1139562)] 24 bytes 9 | TextMesh (new) [TextMesh: Mesh (-1139560)] 24 bytes 10 | TextMesh (new) [TextMesh: Mesh (-1139558)] 24 bytes 11 | TextMesh (new) [TextMesh: Mesh (-1139556)] 24 bytes 12 | TextMesh (new) [TextMesh: Mesh (-1139554)] 24 bytes 13 | TextMesh (new) [TextMesh: Mesh (-1139552)] 24 bytes 14 | TextMesh (new) [TextMesh: Mesh (-1139550)] 24 bytes 15 | TextMesh (new) [TextMesh: Mesh (-1139548)] 24 bytes 16 | TextMesh (new) [TextMesh: Mesh (-1139546)] 24 bytes 17 | TextMesh (new) [TextMesh: Mesh (-1139544)] 24 bytes 18 | TextMesh (new) [TextMesh: Mesh (-1139542)] 24 bytes 19 | TextMesh (new) [TextMesh: Mesh (-1139540)] 24 bytes 20 | TextMesh (new) [TextMesh: Mesh (-1139538)] 24 bytes 21 | TextMesh (new) [TextMesh: Mesh (-1139536)] 24 bytes 22 | TextMesh (new) [TextMesh: Mesh (-1139534)] 24 bytes 23 | TextMesh (new) [TextMesh: Mesh (-1139532)] 24 bytes 24 | TextMesh (new) [TextMesh: Mesh (-1139530)] 24 bytes 25 | (new) [: Texture2D (-1137324)] 24 bytes 26 | Sample (new) [Sample: DefaultAsset (2802)] 24 bytes 27 | AnimatorController Icon (new) [AnimatorController Icon: Texture2D (4076)] 24 bytes 28 | d_VisibilityOn (new) [d_VisibilityOn: Texture2D (7178)] 24 bytes 29 | Hidden/Preview Color2D (new) [Hidden/Preview Color2D: Shader (9734)] 24 bytes 30 | (new) [: AssetImporter (11404)] 24 bytes 31 | TextMesh (new) [TextMesh: Mesh (-1139574)] 24 bytes 32 | TextMesh (new) [TextMesh: Mesh (-1139640)] 24 bytes 33 | TextMesh (new) [TextMesh: Mesh (-1139576)] 24 bytes 34 | TextMesh (new) [TextMesh: Mesh (-1139580)] 24 bytes 35 | TextMesh (new) [TextMesh: Mesh (-1139638)] 24 bytes 36 | TextMesh (new) [TextMesh: Mesh (-1139636)] 24 bytes 37 | TextMesh (new) [TextMesh: Mesh (-1139634)] 24 bytes 38 | TextMesh (new) [TextMesh: Mesh (-1139632)] 24 bytes 39 | TextMesh (new) [TextMesh: Mesh (-1139630)] 24 bytes 40 | TextMesh (new) [TextMesh: Mesh (-1139628)] 24 bytes 41 | TextMesh (new) [TextMesh: Mesh (-1139626)] 24 bytes 42 | TextMesh (new) [TextMesh: Mesh (-1139624)] 24 bytes 43 | TextMesh (new) [TextMesh: Mesh (-1139622)] 24 bytes 44 | TextMesh (new) [TextMesh: Mesh (-1139620)] 24 bytes 45 | TextMesh (new) [TextMesh: Mesh (-1139618)] 24 bytes 46 | TextMesh (new) [TextMesh: Mesh (-1139616)] 24 bytes 47 | TextMesh (new) [TextMesh: Mesh (-1139614)] 24 bytes 48 | TextMesh (new) [TextMesh: Mesh (-1139612)] 24 bytes 49 | TextMesh (new) [TextMesh: Mesh (-1139610)] 24 bytes 50 | TextMesh (new) [TextMesh: Mesh (-1139608)] 24 bytes 51 | TextMesh (new) [TextMesh: Mesh (-1139606)] 24 bytes 52 | TextMesh (new) [TextMesh: Mesh (-1139604)] 24 bytes 53 | TextMesh (new) [TextMesh: Mesh (-1139602)] 24 bytes 54 | TextMesh (new) [TextMesh: Mesh (-1139600)] 24 bytes 55 | TextMesh (new) [TextMesh: Mesh (-1139598)] 24 bytes 56 | TextMesh (new) [TextMesh: Mesh (-1139596)] 24 bytes 57 | TextMesh (new) [TextMesh: Mesh (-1139594)] 24 bytes 58 | TextMesh (new) [TextMesh: Mesh (-1139592)] 24 bytes 59 | TextMesh (new) [TextMesh: Mesh (-1139590)] 24 bytes 60 | TextMesh (new) [TextMesh: Mesh (-1139588)] 24 bytes 61 | TextMesh (new) [TextMesh: Mesh (-1139586)] 24 bytes 62 | TextMesh (new) [TextMesh: Mesh (-1139584)] 24 bytes 63 | TextMesh (new) [TextMesh: Mesh (-1139582)] 24 bytes 64 | TextMesh (new) [TextMesh: Mesh (-1139578)] 24 bytes 65 | NewSprite_Diamond (new) [NewSprite_Diamond: Texture2D (11412)] 24 bytes 66 | -------------------------------------------------------------------------------- /snapshot-example-diff/generic-static-fields.txt: -------------------------------------------------------------------------------- 1 | Mono.Collections.Generic.ReadOnlyCollection`1.empty 2 | Mono.Empty`1.Array 3 | Unity.Jobs.IJobExtensions+JobStruct`1.<>f__mg$cache0 4 | Unity.Jobs.IJobExtensions+JobStruct`1.jobReflectionData 5 | Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1.<>f__mg$cache0 6 | Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1.jobReflectionData 7 | Unity.Jobs.LowLevel.Unsafe.BatchQueryJobStruct`1.jobReflectionData 8 | UnityEditor.Experimental.UIElements.BaseCompoundField`1.s_FieldDescriptions 9 | UnityEditor.Experimental.UIElements.GraphView.BaseTypeFactory`2.k_KeyType 10 | UnityEditor.Experimental.UIElements.GraphView.BaseTypeFactory`2.k_ValueType 11 | UnityEditor.Experimental.UIElements.GraphView.EdgeDragHelper`1.s_nodeAdapter 12 | UnityEditor.GenericPresetLibraryInspector`1.s_EditButtonStyle 13 | UnityEditor.JointEditor`1+Styles.editAngularLimitsButton 14 | UnityEditor.JointEditor`1+Styles.editAngularLimitsUndoMessage 15 | UnityEditor.PackageManager.UI.OperationSignal`1.<>f__am$cache0 16 | UnityEditor.PackageManager.UI.OperationSignal`1.<>f__am$cache1 17 | UnityEditor.PresetLibraryEditor`1.kCheckoutButtonMargin 18 | UnityEditor.PresetLibraryEditor`1.kCheckoutButtonMaxWidth 19 | UnityEditor.PresetLibraryEditor`1.kGridLabelHeight 20 | UnityEditor.PresetLibraryEditor`1.s_Styles 21 | UnityEditor.PresetLibraryEditor`1+PresetContextMenu.s_Caller 22 | UnityEditor.PresetLibraryEditor`1+PresetContextMenu.s_PresetIndex 23 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache0 24 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache1 25 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache2 26 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache3 27 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache4 28 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache5 29 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.s_Owner 30 | UnityEditor.ScriptableSingleton`1.s_Instance 31 | UnityEditor.ScriptableSingletonDictionary`2.k_Extension 32 | UnityEditor.ScriptableSingletonDictionary`2.s_Instance 33 | UnityEditorInternal.QuadTreeNode`1.kSmallestAreaForQuadTreeNode 34 | UnityEditorInternal.QuadTreeNode`1.m_DebugBoxFillColor 35 | UnityEditorInternal.QuadTreeNode`1.m_DebugFillColor 36 | UnityEditorInternal.QuadTreeNode`1.m_DebugWireColor 37 | UnityEngine.Experimental.UIElements.EventBase`1.s_Pool 38 | UnityEngine.Experimental.UIElements.EventBase`1.s_TypeId 39 | UnityEngine.Experimental.UIElements.StyleSheets.StyleValue`1.defaultStyle 40 | UnityEngine.Experimental.UIElements.UQuery+IsOfType`1.s_Instance 41 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1.s_Action 42 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1.s_List 43 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1+DelegateQueryMatcher`1.s_Instance 44 | UnityEngine.Jobs.IJobParallelForTransformExtensions+TransformParallelForLoopStruct`1.<>f__mg$cache0 45 | UnityEngine.Jobs.IJobParallelForTransformExtensions+TransformParallelForLoopStruct`1.jobReflectionData 46 | UnityEngine.Networking.SyncList`1+Operation.OP_ADD 47 | UnityEngine.Networking.SyncList`1+Operation.OP_CLEAR 48 | UnityEngine.Networking.SyncList`1+Operation.OP_DIRTY 49 | UnityEngine.Networking.SyncList`1+Operation.OP_INSERT 50 | UnityEngine.Networking.SyncList`1+Operation.OP_REMOVE 51 | UnityEngine.Networking.SyncList`1+Operation.OP_REMOVEAT 52 | UnityEngine.Networking.SyncList`1+Operation.OP_SET 53 | UnityEngine.Playables.ScriptPlayable`1.m_NullPlayable 54 | UnityEngine.UI.ListPool`1.<>f__mg$cache0 55 | UnityEngine.UI.ListPool`1.s_ListPool 56 | -------------------------------------------------------------------------------- /snapshot-example-diff/log.txt: -------------------------------------------------------------------------------- 1 | Mono Size Min: 1.04 GB 2 | Mono Size Max: 1.21 GB 3 | Total Allocated: 92.5 MB 4 | Total Reserved: 262.5 MB 5 | 6 | User Roots size: 0 bytes 7 | Static Roots size: 354.0 KB 8 | Hierarchy size: 1.54 KB 9 | Animator Controllers size: 0 bytes 10 | Prefabs size: 0 bytes 11 | Scriptable Objects size: 728 bytes 12 | Unity Objects size: 1.55 KB 13 | Total size: 357.8 KB 14 | -------------------------------------------------------------------------------- /snapshot-example-diff/types-native.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 223.7 KB 56 Mesh 3 | 0 bytes 835 RectOffset 4 | 0 bytes 786 GUILayoutGroup 5 | 0 bytes 812 List`1 6 | 0 bytes 7 Object[] 7 | 0 bytes 524 GUILayoutEntry[] 8 | 0 bytes 24 GUIScrollGroup 9 | 0 bytes 1236 GUILayoutEntry 10 | 0 bytes 8 GUIStyle 11 | 0 bytes 126 GUIContent 12 | 0 bytes 675 String 13 | 0 bytes 94 RuntimeType 14 | 0 bytes 36 String[] 15 | -------------------------------------------------------------------------------- /snapshot-example-diff/types-self.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 104.4 KB 786 GUILayoutGroup 3 | 77.3 KB 1236 GUILayoutEntry 4 | 58.4 KB 675 String 5 | 31.7 KB 812 List`1 6 | 26.1 KB 835 RectOffset 7 | 23.8 KB 524 GUILayoutEntry[] 8 | 4.92 KB 126 GUIContent 9 | 4.41 KB 94 RuntimeType 10 | 4.13 KB 24 GUIScrollGroup 11 | 2.78 KB 7 Object[] 12 | 1.51 KB 36 String[] 13 | 1.31 KB 56 Mesh 14 | 1024 bytes 8 GUIStyle 15 | -------------------------------------------------------------------------------- /snapshot-example-diff/types-total.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 647.8 KB 812 List`1 3 | 623.4 KB 786 GUILayoutGroup 4 | 616.1 KB 524 GUILayoutEntry[] 5 | 251.3 KB 7 Object[] 6 | 155.7 KB 24 GUIScrollGroup 7 | 77.4 KB 1236 GUILayoutEntry 8 | 58.4 KB 675 String 9 | 26.1 KB 835 RectOffset 10 | 21.1 KB 126 GUIContent 11 | 12.2 KB 36 String[] 12 | 5.90 KB 94 RuntimeType 13 | 1.31 KB 56 Mesh 14 | 1.28 KB 8 GUIStyle 15 | -------------------------------------------------------------------------------- /snapshot-example-diff/types/Sprite.txt: -------------------------------------------------------------------------------- 1 | NewSprite_Diamond (UnityEngine.Sprite) [native 1.46 KB, managed 24 bytes] root paths: 2 | HierarchyObject.Child1.SpriteHolder3.Image.m_Sprite 3 | 4 | -------------------------------------------------------------------------------- /snapshot-example-diff/types/Texture2D.txt: -------------------------------------------------------------------------------- 1 | AnimatorController Icon (UnityEngine.Texture2D) [native 43.1 KB, managed 24 bytes] root paths: 2 | 3 | d_VisibilityOn (UnityEngine.Texture2D) [native 2.47 KB, managed 24 bytes] root paths: 4 | AudioMixerWindow.s_Instance.m_GroupTree.m_TreeViewGUI.k_VisibleON 5 | 6 | (UnityEngine.Texture2D) [native 2.47 KB, managed 24 bytes] root paths: 7 | 8 | NewSprite_Diamond (UnityEngine.Texture2D) [native 528 bytes, managed 24 bytes] root paths: 9 | 10 | -------------------------------------------------------------------------------- /snapshot-example/1-user-roots.txt: -------------------------------------------------------------------------------- 1 | Game.Instance [Game] [Game] 384 bytes 2 | allUnits [List`1] 184 bytes 3 | _items [Unit[]] 144 bytes 4 | [2] [Unit] 56 bytes 5 | [3] [Unit] 56 bytes 6 | player [Unit] 160 bytes 7 | Pet [Unit] 56 bytes 8 | Name [String] 48 bytes 9 | Game.Enemies [UnitsGroup] 40 bytes 10 | Units [Unit[]] 16 bytes 11 | -------------------------------------------------------------------------------- /snapshot-example/2-static-fields.txt: -------------------------------------------------------------------------------- 1 | Keywords.keywords [LookupTable] 545.5 KB 2 | root [Node] 545.4 KB 3 | GUI.s_Skin [DarkSkin: GUISkin (9964)] 333.9 KB 4 | m_CustomStyles [GUIStyle[]] 261.3 KB 5 | m_Styles [Dictionary`2] 61.9 KB 6 | ... 7 | Keywords.keywords [LookupTable] 285.5 KB 8 | root [Node] 285.5 KB 9 | EditorGUIUtility.s_GUIContents [Hashtable] 216.0 KB 10 | buckets [bucket[]] 215.9 KB 11 | XmlSerializable.serializerCache [Dictionary`2] 154.4 KB 12 | entries [Entry[]] 154.3 KB 13 | ... 14 | EditorCompilationInterface.editorCompilation [EditorCompilation] 104.9 KB 15 | customTargetAssemblies [TargetAssembly[]] 41.0 KB 16 | packageCustomScriptAssemblies [CustomScriptAssembly[]] 19.3 KB 17 | unityAssemblies [PrecompiledAssembly[]] 14.1 KB 18 | allScripts [HashSet`1] 13.3 KB 19 | precompiledAssemblies [PrecompiledAssembly[]] 7.76 KB 20 | m_PackageAssemblies [PackageAssembly[]] 7.38 KB 21 | customScriptAssemblies [CustomScriptAssembly[]] 1.68 KB 22 | ... 23 | ProjectBrowser.s_LastInteractedProjectBrowser [: ProjectBrowser (3030)] 58.9 KB 24 | m_AssetLabels [InputData] 30.1 KB 25 | m_ListArea [ObjectListArea] 21.0 KB 26 | m_FolderTree [TreeViewController] 2.49 KB 27 | m_ObjectTypes [InputData] 2.30 KB 28 | ... 29 | CustomEditorAttributes.kSCustomEditors [Dictionary`2] 57.4 KB 30 | entries [Entry[]] 55.6 KB 31 | buckets [Int32[]] 1.68 KB 32 | UIElementsUtility.s_UIElementsCache [Dictionary`2] 56.3 KB 33 | entries [Entry[]] 56.2 KB 34 | ... 35 | UnityType.ms_types [UnityType[]] 49.9 KB 36 | Parser.set [Boolean[,]] 38.5 KB 37 | NetworkWriter.s_StringWriteBuffer [Byte[]] 32.0 KB 38 | Parser.set [Boolean[,]] 23.0 KB 39 | EditorAssemblies.k__BackingField [Assembly[]] 22.4 KB 40 | PackageManager.instance [PackageManager] 20.8 KB 41 | k__BackingField [LocalIndexer] 17.8 KB 42 | database [Database] 1.77 KB 43 | moduleInfo [IvyModule] 1.02 KB 44 | ... 45 | EditorGUIUtility.s_TextGUIContents [Hashtable] 19.7 KB 46 | buckets [bucket[]] 19.6 KB 47 | EditorGUIUtility.s_IconGUIContents [Hashtable] 19.5 KB 48 | buckets [bucket[]] 19.4 KB 49 | MixerEffectDefinitions.s_MixerEffectDefinitions [List`1] 18.7 KB 50 | _items [MixerEffectDefinition[]] 18.6 KB 51 | CustomEditorAttributes.kSCustomMultiEditors [Dictionary`2] 16.4 KB 52 | entries [Entry[]] 15.5 KB 53 | ... 54 | UnityScriptLexer.tokenSet_6_ [BitSet] 16.0 KB 55 | dataBits [Int64[]] 16.0 KB 56 | UnityScriptLexer.tokenSet_3_ [BitSet] 16.0 KB 57 | dataBits [Int64[]] 16.0 KB 58 | UnityScriptLexer.tokenSet_5_ [BitSet] 16.0 KB 59 | dataBits [Int64[]] 16.0 KB 60 | UnityScriptLexer.tokenSet_7_ [BitSet] 16.0 KB 61 | dataBits [Int64[]] 16.0 KB 62 | UnityScriptLexer.tokenSet_1_ [BitSet] 16.0 KB 63 | dataBits [Int64[]] 16.0 KB 64 | UnityScriptLexer.tokenSet_4_ [BitSet] 16.0 KB 65 | dataBits [Int64[]] 16.0 KB 66 | UnityScriptLexer.tokenSet_2_ [BitSet] 16.0 KB 67 | dataBits [Int64[]] 16.0 KB 68 | AssetStoreContext.s_StandardPackageRegExp [Regex] 14.2 KB 69 | code [RegexCode] 13.4 KB 70 | ... 71 | LocalizedEditorFontManager.m_fontDictionaries [Dictionary`2] 13.4 KB 72 | entries [Entry[]] 13.3 KB 73 | ... 74 | UnityType.ms_nameToType [Dictionary`2] 11.9 KB 75 | entries [Entry[]] 10.1 KB 76 | buckets [Int32[]] 1.68 KB 77 | SceneHierarchyWindow.s_LastInteractedHierarchy [: SceneHierarchyWindow (3032)] 11.7 KB 78 | m_TreeView [TreeViewController] 10.2 KB 79 | ... 80 | OpCodeNames.names [String[]] 10.9 KB 81 | UnityType.ms_idToType [Dictionary`2] 10.2 KB 82 | entries [Entry[]] 8.42 KB 83 | buckets [Int32[]] 1.68 KB 84 | XmlSerializable.attributeMappings [Dictionary`2] 9.29 KB 85 | entries [Entry[]] 9.07 KB 86 | ... 87 | Tokens.tokenList [String[]] 9.08 KB 88 | UIElementsDebugger.k_FieldInfos [PropertyInfo[]] 8.89 KB 89 | Keywords.keywordList [String[]] 8.41 KB 90 | TextWriter.Null [NullTextWriter] 8.24 KB 91 | InternalFormatProvider [CultureInfo] 8.21 KB 92 | ... 93 | UnityScriptLexer.tokenSet_0_ [BitSet] 8.03 KB 94 | dataBits [Int64[]] 8.01 KB 95 | GUILayoutUtility.s_StoredLayouts [Dictionary`2] 6.50 KB 96 | entries [Entry[]] 6.33 KB 97 | ... 98 | Graphic.s_VertexHelper [VertexHelper] 5.69 KB 99 | m_Tangents [List`1] 1.04 KB 100 | ... 101 | Collider2DEditorBase.m_Contacts [ContactPoint2D[]] 5.47 KB 102 | Rigidbody2DEditor.m_Contacts [ContactPoint2D[]] 5.47 KB 103 | StyleSheetCache.s_NameToIDCache [Dictionary`2] 5.30 KB 104 | entries [Entry[]] 4.87 KB 105 | ... 106 | UnityScriptParser.tokenNames_ [String[]] 5.23 KB 107 | Factories.s_Factories [Dictionary`2] 4.82 KB 108 | entries [Entry[]] 4.59 KB 109 | ... 110 | ScriptableSingleton`1.s_Instance [: GameViewSizes (11332)] 4.54 KB 111 | m_Android [GameViewSizeGroup] 1.66 KB 112 | m_iOS [GameViewSizeGroup] 1.20 KB 113 | ... 114 | TestContext.Error [EventListenerTextWriter] 4.28 KB 115 | _defaultWriter [SyncTextWriter] 4.24 KB 116 | ... 117 | Event.<>f__switch$map0 [Dictionary`2] 3.16 KB 118 | entries [Entry[]] 2.83 KB 119 | ... 120 | AvatarSetupTool.sBonePoses [BonePoseData[]] 3.15 KB 121 | EditorBuildRules.predefinedTargetAssemblies [TargetAssembly[]] 3.09 KB 122 | BigInteger.smallPrimes [UInt32[]] 3.06 KB 123 | AdditionalTypeExtensions.convertibleValueTypes [Dictionary`2] 2.96 KB 124 | entries [Entry[]] 2.82 KB 125 | ... 126 | Keywords.keywordList [String[]] 2.96 KB 127 | AvatarBipedMapper.s_BipedBones [BipedBone[]] 2.92 KB 128 | Settings.m_Prefs [SortedList`2] 2.66 KB 129 | keys [String[]] 2.32 KB 130 | ... 131 | VSCodeTemplates.SettingsJson [String] 2.66 KB 132 | AudioMixerWindow.s_Instance [: AudioMixerWindow (3020)] 2.53 KB 133 | BuildPlatforms.s_Instance [BuildPlatforms] 2.31 KB 134 | buildPlatforms [BuildPlatform[]] 2.29 KB 135 | StyleContext.styleContextHierarchyTraversal [StyleContextHierarchyTraversal] 2.25 KB 136 | m_ruleMatchers [List`1] 1.85 KB 137 | ... 138 | MsgType.msgLabels [String[]] 2.15 KB 139 | JSProxyMgr.s_Instance [JSProxyMgr] 2.07 KB 140 | m_GlobalObjects [Dictionary`2] 2.00 KB 141 | ... 142 | Styles.sBuiltinCameraModes [CameraMode[]] 2.00 KB 143 | BuildPlayerWindow.s_VersionPattern [Regex] 1.91 KB 144 | CSSSpec.rgx [Regex] 1.90 KB 145 | MonoCSharpCompilerOutputParser.sCompilerOutput [Regex] 1.82 KB 146 | ScriptableSingleton`1.s_Instance [: SavedSearchFilters (11334)] 1.80 KB 147 | m_SavedFilters [List`1] 1.73 KB 148 | ... 149 | MonoCSharpCompilerOutputParser.sInternalErrorCompilerOutput [Regex] 1.80 KB 150 | MicrosoftCSharpCompilerOutputParser.sCompilerOutput [Regex] 1.77 KB 151 | OpCodes.OneByteOpCode [OpCode[]] 1.76 KB 152 | XmlSerializable.typeMappings [Dictionary`2] 1.75 KB 153 | entries [Entry[]] 1.60 KB 154 | ... 155 | APIUpdaterRuntimeServices.ComponentsFromUnityEngine [List`1] 1.74 KB 156 | _items [Type[]] 1.70 KB 157 | BooCompilerOutputParser.sCompilerOutput [Regex] 1.73 KB 158 | CompilerParameters.SharedTypeSystemProvider [ReflectionTypeSystemProvider] 1.72 KB 159 | _referenceCache [MemoizedFunction`2] 1.70 KB 160 | SolutionSynchronizer.scriptReferenceExpression [Regex] 1.72 KB 161 | code [RegexCode] 1.06 KB 162 | ... 163 | AvatarControl.s_BonePositions [Vector2[,]] 1.72 KB 164 | SemVersion.parseEx [Regex] 1.68 KB 165 | Native.s_MeasureFunctions [LockDictionary`2] 1.66 KB 166 | _cacheItemDictionary [Dictionary`2] 1.61 KB 167 | ... 168 | FrameDebuggerWindow.s_FrameEventTypeNames [String[]] 1.60 KB 169 | Tokens.tokenList [String[]] 1.52 KB 170 | UnityScriptCompilerOutputParser.sCompilerOutput [Regex] 1.50 KB 171 | TypeReference.types [Dictionary`2] 1.39 KB 172 | entries [Entry[]] 1.25 KB 173 | ... 174 | AnalyticsEvent.enumRenameTable [Dictionary`2] 1.33 KB 175 | entries [Entry[]] 1.19 KB 176 | ... 177 | StackFilter.assertOrAssumeRegex [Regex] 1.32 KB 178 | code [RegexCode] 1.04 KB 179 | ... 180 | Settings.m_AddedPrefs [List`1] 1.27 KB 181 | _items [IPrefType[]] 1.23 KB 182 | CustomScriptAssembly.k__BackingField [CustomScriptAssemblyPlatform[]] 1.26 KB 183 | Styles.bbModeText [GUIContent] 1.20 KB 184 | m_Tooltip [String] 1.09 KB 185 | ... 186 | EditorStyles.s_Current [EditorStyles] 1.19 KB 187 | UnityScriptCompiler.UnityEditorPattern [Regex] 1.13 KB 188 | Styles.backFaceToleranceContent [GUIContent] 1.09 KB 189 | Styles.resolutionContent [GUIContent] 1.09 KB 190 | m_Tooltip [String] 1.01 KB 191 | ... 192 | Styles.boxProjectionText [GUIContent] 1.07 KB 193 | AssetStoreContext.s_GeneratedIDRegExp [Regex] 1.07 KB 194 | Il2CppOutputParser.sErrorRegexWithSourceInformation [Regex] 1.06 KB 195 | AvatarAutoMapper.s_MappingDataBody [BoneMappingItem[]] 1.05 KB 196 | ReflectionImporter.type_etype_mapping [Dictionary`2] 1.05 KB 197 | CSharpLanguage._crOnlyRegex [Regex] 1.04 KB 198 | CSharpLanguage._lfOnlyRegex [Regex] 1.04 KB 199 | CommandLineFormatter.Quotes [Regex] 1.01 KB 200 | UnityConnectServiceCollection.s_UnityConnectEditor [UnityConnectServiceCollection] 1.00 KB 201 | ProfilerChart.s_LocalizedChartNames [String[]] 1024 bytes 202 | -------------------------------------------------------------------------------- /snapshot-example/3-hierarchy.txt: -------------------------------------------------------------------------------- 1 | HierarchyObject [HierarchyObject: GameObject (-26450)] 2.72 KB 2 | Child1 [Child1: GameObject (-27044)] 2.44 KB 3 | SpriteHolder1 [SpriteHolder1: GameObject (-31716)] 1.20 KB 4 | Image [SpriteHolder1: Image (-35358)] 1.13 KB 5 | m_OnCullStateChanged [CullStateChangedEvent] 528 bytes 6 | m_TypeName [String] 272 bytes 7 | m_Calls [InvokableCallList] 168 bytes 8 | m_PersistentCalls [List`1] 40 bytes 9 | m_RuntimeCalls [List`1] 40 bytes 10 | m_ExecutingCalls [List`1] 40 bytes 11 | m_PersistentCalls [PersistentCallGroup] 64 bytes 12 | m_Calls [List`1] 40 bytes 13 | m_Material (destroyed Unity Object) [Material] 400 bytes 14 | m_Corners [Vector3[]] 48 bytes 15 | [0] [Vector3] 12 bytes 16 | [1] [Vector3] 12 bytes 17 | [2] [Vector3] 12 bytes 18 | [3] [Vector3] 12 bytes 19 | m_ColorTweenRunner [TweenRunner`1] 32 bytes 20 | m_Sprite [UISprite: Sprite (848)] 24 bytes 21 | CanvasRenderer [SpriteHolder1: CanvasRenderer (-35354)] 24 bytes 22 | RectTransform [SpriteHolder1: RectTransform (-35356)] 24 bytes 23 | SpriteHolder2 [SpriteHolder2: GameObject (-31872)] 1.20 KB 24 | Image [SpriteHolder2: Image (-34204)] 1.13 KB 25 | m_OnCullStateChanged [CullStateChangedEvent] 528 bytes 26 | m_TypeName [String] 272 bytes 27 | m_Calls [InvokableCallList] 168 bytes 28 | m_PersistentCalls [List`1] 40 bytes 29 | m_RuntimeCalls [List`1] 40 bytes 30 | m_ExecutingCalls [List`1] 40 bytes 31 | m_PersistentCalls [PersistentCallGroup] 64 bytes 32 | m_Calls [List`1] 40 bytes 33 | m_Material (destroyed Unity Object) [Material] 400 bytes 34 | m_Corners [Vector3[]] 48 bytes 35 | [0] [Vector3] 12 bytes 36 | [1] [Vector3] 12 bytes 37 | [2] [Vector3] 12 bytes 38 | [3] [Vector3] 12 bytes 39 | m_ColorTweenRunner [TweenRunner`1] 32 bytes 40 | m_Sprite [Knob: Sprite (860)] 24 bytes 41 | CanvasRenderer [SpriteHolder2: CanvasRenderer (-34200)] 24 bytes 42 | RectTransform [SpriteHolder2: RectTransform (-34202)] 24 bytes 43 | Transform [Child1: Transform (-27046)] 24 bytes 44 | Child2 [Child2: GameObject (-27656)] 48 bytes 45 | Transform [Child2: Transform (-27658)] 24 bytes 46 | Child3 [Child3: GameObject (-27786)] 48 bytes 47 | Transform [Child3: Transform (-27788)] 24 bytes 48 | Child4 [Child4: GameObject (-27942)] 48 bytes 49 | Transform [Child4: Transform (-27944)] 24 bytes 50 | Child5 [Child5: GameObject (-28070)] 48 bytes 51 | Transform [Child5: Transform (-28072)] 24 bytes 52 | Child6 [Child6: GameObject (-28246)] 48 bytes 53 | Transform [Child6: Transform (-28248)] 24 bytes 54 | Transform [HierarchyObject: Transform (-26452)] 24 bytes 55 | Main Camera [Main Camera: GameObject (2948)] 144 bytes 56 | Transform [Main Camera: Transform (2958)] 24 bytes 57 | Camera [Main Camera: Camera (2956)] 24 bytes 58 | GUILayer [Main Camera: GUILayer (2954)] 24 bytes 59 | FlareLayer [Main Camera: FlareLayer (2952)] 24 bytes 60 | AudioListener [Main Camera: AudioListener (2950)] 24 bytes 61 | Directional Light [Directional Light: GameObject (2942)] 72 bytes 62 | Transform [Directional Light: Transform (2946)] 24 bytes 63 | Light [Directional Light: Light (2944)] 24 bytes 64 | -------------------------------------------------------------------------------- /snapshot-example/5-prefabs.txt: -------------------------------------------------------------------------------- 1 | PreviewMaterials [PreviewMaterials: GameObject (6310)] 456 bytes 2 | cube [cube: GameObject (6294)] 96 bytes 3 | cylinder [cylinder: GameObject (6298)] 96 bytes 4 | sphere [sphere: GameObject (6308)] 96 bytes 5 | torus [torus: GameObject (6278)] 96 bytes 6 | HandlesGO [HandlesGO: GameObject (10256)] 456 bytes 7 | Cone [Cone: GameObject (10268)] 96 bytes 8 | Cube [Cube: GameObject (10270)] 96 bytes 9 | Cylinder [Cylinder: GameObject (10252)] 96 bytes 10 | Sphere [Sphere: GameObject (10292)] 96 bytes 11 | SceneCamera [SceneCamera: GameObject (-1129144)] 120 bytes 12 | SceneLight [SceneLight: GameObject (-1129166)] 72 bytes 13 | SceneLight [SceneLight: GameObject (-1129160)] 72 bytes 14 | SceneLight [SceneLight: GameObject (-1129154)] 72 bytes 15 | InternalIdentityTransform [InternalIdentityTransform: GameObject (-30)] 48 bytes 16 | -------------------------------------------------------------------------------- /snapshot-example/6-scriptable_objects.txt: -------------------------------------------------------------------------------- 1 | LightSkin [LightSkin: GUISkin (6540)] 401.4 KB 2 | m_CustomStyles [GUIStyle[]] 328.6 KB 3 | m_Styles [Dictionary`2] 60.7 KB 4 | entries [Entry[]] 57.0 KB 5 | buckets [Int32[]] 3.59 KB 6 | ... 7 | [: ProfilerWindow (3018)] 240.9 KB 8 | m_Charts [ProfilerChart[]] 218.3 KB 9 | [12] [ProfilerChart] 25.7 KB 10 | m_Series [ChartSeriesViewData[]] 24.6 KB 11 | [9] [ChartSeriesViewData] 2.47 KB 12 | k__BackingField [Single[]] 1.16 KB 13 | k__BackingField [Single[]] 1.16 KB 14 | ... 15 | [4] [ChartSeriesViewData] 2.45 KB 16 | k__BackingField [Single[]] 1.16 KB 17 | k__BackingField [Single[]] 1.16 KB 18 | ... 19 | [7] [ChartSeriesViewData] 2.45 KB 20 | k__BackingField [Single[]] 1.16 KB 21 | k__BackingField [Single[]] 1.16 KB 22 | ... 23 | [8] [ChartSeriesViewData] 2.45 KB 24 | k__BackingField [Single[]] 1.16 KB 25 | k__BackingField [Single[]] 1.16 KB 26 | ... 27 | [0] [ChartSeriesViewData] 2.45 KB 28 | k__BackingField [Single[]] 1.16 KB 29 | k__BackingField [Single[]] 1.16 KB 30 | ... 31 | [1] [ChartSeriesViewData] 2.45 KB 32 | k__BackingField [Single[]] 1.16 KB 33 | k__BackingField [Single[]] 1.16 KB 34 | ... 35 | [3] [ChartSeriesViewData] 2.45 KB 36 | k__BackingField [Single[]] 1.16 KB 37 | k__BackingField [Single[]] 1.16 KB 38 | ... 39 | [6] [ChartSeriesViewData] 2.45 KB 40 | k__BackingField [Single[]] 1.16 KB 41 | k__BackingField [Single[]] 1.16 KB 42 | ... 43 | [2] [ChartSeriesViewData] 2.44 KB 44 | k__BackingField [Single[]] 1.16 KB 45 | k__BackingField [Single[]] 1.16 KB 46 | ... 47 | [5] [ChartSeriesViewData] 2.44 KB 48 | k__BackingField [Single[]] 1.16 KB 49 | k__BackingField [Single[]] 1.16 KB 50 | ... 51 | ... 52 | [7] [ProfilerChart] 23.3 KB 53 | m_Series [ChartSeriesViewData[]] 22.2 KB 54 | [7] [ChartSeriesViewData] 2.47 KB 55 | k__BackingField [Single[]] 1.16 KB 56 | k__BackingField [Single[]] 1.16 KB 57 | ... 58 | [8] [ChartSeriesViewData] 2.47 KB 59 | k__BackingField [Single[]] 1.16 KB 60 | k__BackingField [Single[]] 1.16 KB 61 | ... 62 | [4] [ChartSeriesViewData] 2.46 KB 63 | k__BackingField [Single[]] 1.16 KB 64 | k__BackingField [Single[]] 1.16 KB 65 | ... 66 | [0] [ChartSeriesViewData] 2.45 KB 67 | k__BackingField [Single[]] 1.16 KB 68 | k__BackingField [Single[]] 1.16 KB 69 | ... 70 | [1] [ChartSeriesViewData] 2.45 KB 71 | k__BackingField [Single[]] 1.16 KB 72 | k__BackingField [Single[]] 1.16 KB 73 | ... 74 | [2] [ChartSeriesViewData] 2.45 KB 75 | k__BackingField [Single[]] 1.16 KB 76 | k__BackingField [Single[]] 1.16 KB 77 | ... 78 | [3] [ChartSeriesViewData] 2.45 KB 79 | k__BackingField [Single[]] 1.16 KB 80 | k__BackingField [Single[]] 1.16 KB 81 | ... 82 | [5] [ChartSeriesViewData] 2.45 KB 83 | k__BackingField [Single[]] 1.16 KB 84 | k__BackingField [Single[]] 1.16 KB 85 | ... 86 | [6] [ChartSeriesViewData] 2.45 KB 87 | k__BackingField [Single[]] 1.16 KB 88 | k__BackingField [Single[]] 1.16 KB 89 | ... 90 | ... 91 | [0] [ProfilerChart] 22.1 KB 92 | m_Series [ChartSeriesViewData[]] 19.6 KB 93 | [3] [ChartSeriesViewData] 2.46 KB 94 | k__BackingField [Single[]] 1.16 KB 95 | k__BackingField [Single[]] 1.16 KB 96 | ... 97 | [5] [ChartSeriesViewData] 2.46 KB 98 | k__BackingField [Single[]] 1.16 KB 99 | k__BackingField [Single[]] 1.16 KB 100 | ... 101 | [0] [ChartSeriesViewData] 2.45 KB 102 | k__BackingField [Single[]] 1.16 KB 103 | k__BackingField [Single[]] 1.16 KB 104 | ... 105 | [1] [ChartSeriesViewData] 2.44 KB 106 | k__BackingField [Single[]] 1.16 KB 107 | k__BackingField [Single[]] 1.16 KB 108 | ... 109 | [2] [ChartSeriesViewData] 2.44 KB 110 | k__BackingField [Single[]] 1.16 KB 111 | k__BackingField [Single[]] 1.16 KB 112 | ... 113 | [4] [ChartSeriesViewData] 2.44 KB 114 | k__BackingField [Single[]] 1.16 KB 115 | k__BackingField [Single[]] 1.16 KB 116 | ... 117 | [7] [ChartSeriesViewData] 2.44 KB 118 | k__BackingField [Single[]] 1.16 KB 119 | k__BackingField [Single[]] 1.16 KB 120 | ... 121 | [6] [ChartSeriesViewData] 2.43 KB 122 | k__BackingField [Single[]] 1.16 KB 123 | k__BackingField [Single[]] 1.16 KB 124 | ... 125 | m_StackedSampleSums [Single[]] 1.16 KB 126 | ... 127 | [3] [ProfilerChart] 21.9 KB 128 | m_Series [ChartSeriesViewData[]] 17.2 KB 129 | [5] [ChartSeriesViewData] 2.46 KB 130 | k__BackingField [Single[]] 1.16 KB 131 | k__BackingField [Single[]] 1.16 KB 132 | ... 133 | [0] [ChartSeriesViewData] 2.45 KB 134 | k__BackingField [Single[]] 1.16 KB 135 | k__BackingField [Single[]] 1.16 KB 136 | ... 137 | [1] [ChartSeriesViewData] 2.45 KB 138 | k__BackingField [Single[]] 1.16 KB 139 | k__BackingField [Single[]] 1.16 KB 140 | ... 141 | [3] [ChartSeriesViewData] 2.45 KB 142 | k__BackingField [Single[]] 1.16 KB 143 | k__BackingField [Single[]] 1.16 KB 144 | ... 145 | [4] [ChartSeriesViewData] 2.45 KB 146 | k__BackingField [Single[]] 1.16 KB 147 | k__BackingField [Single[]] 1.16 KB 148 | ... 149 | [6] [ChartSeriesViewData] 2.45 KB 150 | k__BackingField [Single[]] 1.16 KB 151 | k__BackingField [Single[]] 1.16 KB 152 | ... 153 | [2] [ChartSeriesViewData] 2.45 KB 154 | k__BackingField [Single[]] 1.16 KB 155 | k__BackingField [Single[]] 1.16 KB 156 | ... 157 | m_LineDrawingPoints [Vector3[]] 3.49 KB 158 | ... 159 | [9] [ProfilerChart] 20.8 KB 160 | m_Series [ChartSeriesViewData[]] 19.6 KB 161 | [5] [ChartSeriesViewData] 2.45 KB 162 | k__BackingField [Single[]] 1.16 KB 163 | k__BackingField [Single[]] 1.16 KB 164 | ... 165 | [6] [ChartSeriesViewData] 2.45 KB 166 | k__BackingField [Single[]] 1.16 KB 167 | k__BackingField [Single[]] 1.16 KB 168 | ... 169 | [7] [ChartSeriesViewData] 2.45 KB 170 | k__BackingField [Single[]] 1.16 KB 171 | k__BackingField [Single[]] 1.16 KB 172 | ... 173 | [1] [ChartSeriesViewData] 2.45 KB 174 | k__BackingField [Single[]] 1.16 KB 175 | k__BackingField [Single[]] 1.16 KB 176 | ... 177 | [3] [ChartSeriesViewData] 2.45 KB 178 | k__BackingField [Single[]] 1.16 KB 179 | k__BackingField [Single[]] 1.16 KB 180 | ... 181 | [4] [ChartSeriesViewData] 2.45 KB 182 | k__BackingField [Single[]] 1.16 KB 183 | k__BackingField [Single[]] 1.16 KB 184 | ... 185 | [0] [ChartSeriesViewData] 2.44 KB 186 | k__BackingField [Single[]] 1.16 KB 187 | k__BackingField [Single[]] 1.16 KB 188 | ... 189 | [2] [ChartSeriesViewData] 2.44 KB 190 | k__BackingField [Single[]] 1.16 KB 191 | k__BackingField [Single[]] 1.16 KB 192 | ... 193 | ... 194 | [8] [ProfilerChart] 18.4 KB 195 | m_Series [ChartSeriesViewData[]] 17.3 KB 196 | [3] [ChartSeriesViewData] 2.47 KB 197 | k__BackingField [Single[]] 1.16 KB 198 | k__BackingField [Single[]] 1.16 KB 199 | ... 200 | [0] [ChartSeriesViewData] 2.46 KB 201 | k__BackingField [Single[]] 1.16 KB 202 | k__BackingField [Single[]] 1.16 KB 203 | ... 204 | [1] [ChartSeriesViewData] 2.46 KB 205 | k__BackingField [Single[]] 1.16 KB 206 | k__BackingField [Single[]] 1.16 KB 207 | ... 208 | [2] [ChartSeriesViewData] 2.46 KB 209 | k__BackingField [Single[]] 1.16 KB 210 | k__BackingField [Single[]] 1.16 KB 211 | ... 212 | [4] [ChartSeriesViewData] 2.46 KB 213 | k__BackingField [Single[]] 1.16 KB 214 | k__BackingField [Single[]] 1.16 KB 215 | ... 216 | [5] [ChartSeriesViewData] 2.46 KB 217 | k__BackingField [Single[]] 1.16 KB 218 | k__BackingField [Single[]] 1.16 KB 219 | ... 220 | [6] [ChartSeriesViewData] 2.45 KB 221 | k__BackingField [Single[]] 1.16 KB 222 | k__BackingField [Single[]] 1.16 KB 223 | ... 224 | ... 225 | [6] [ProfilerChart] 18.3 KB 226 | m_Series [ChartSeriesViewData[]] 17.2 KB 227 | [1] [ChartSeriesViewData] 2.46 KB 228 | k__BackingField [Single[]] 1.16 KB 229 | k__BackingField [Single[]] 1.16 KB 230 | ... 231 | [2] [ChartSeriesViewData] 2.46 KB 232 | k__BackingField [Single[]] 1.16 KB 233 | k__BackingField [Single[]] 1.16 KB 234 | ... 235 | [4] [ChartSeriesViewData] 2.46 KB 236 | k__BackingField [Single[]] 1.16 KB 237 | k__BackingField [Single[]] 1.16 KB 238 | ... 239 | [5] [ChartSeriesViewData] 2.46 KB 240 | k__BackingField [Single[]] 1.16 KB 241 | k__BackingField [Single[]] 1.16 KB 242 | ... 243 | [0] [ChartSeriesViewData] 2.45 KB 244 | k__BackingField [Single[]] 1.16 KB 245 | k__BackingField [Single[]] 1.16 KB 246 | ... 247 | [3] [ChartSeriesViewData] 2.45 KB 248 | k__BackingField [Single[]] 1.16 KB 249 | k__BackingField [Single[]] 1.16 KB 250 | ... 251 | [6] [ChartSeriesViewData] 2.45 KB 252 | k__BackingField [Single[]] 1.16 KB 253 | k__BackingField [Single[]] 1.16 KB 254 | ... 255 | ... 256 | [1] [ProfilerChart] 18.3 KB 257 | m_Series [ChartSeriesViewData[]] 17.2 KB 258 | [3] [ChartSeriesViewData] 2.46 KB 259 | k__BackingField [Single[]] 1.16 KB 260 | k__BackingField [Single[]] 1.16 KB 261 | ... 262 | [4] [ChartSeriesViewData] 2.46 KB 263 | k__BackingField [Single[]] 1.16 KB 264 | k__BackingField [Single[]] 1.16 KB 265 | ... 266 | [2] [ChartSeriesViewData] 2.45 KB 267 | k__BackingField [Single[]] 1.16 KB 268 | k__BackingField [Single[]] 1.16 KB 269 | ... 270 | [1] [ChartSeriesViewData] 2.45 KB 271 | k__BackingField [Single[]] 1.16 KB 272 | k__BackingField [Single[]] 1.16 KB 273 | ... 274 | [5] [ChartSeriesViewData] 2.45 KB 275 | k__BackingField [Single[]] 1.16 KB 276 | k__BackingField [Single[]] 1.16 KB 277 | ... 278 | [0] [ChartSeriesViewData] 2.44 KB 279 | k__BackingField [Single[]] 1.16 KB 280 | k__BackingField [Single[]] 1.16 KB 281 | ... 282 | [6] [ChartSeriesViewData] 2.44 KB 283 | k__BackingField [Single[]] 1.16 KB 284 | k__BackingField [Single[]] 1.16 KB 285 | ... 286 | ... 287 | [2] [ProfilerChart] 14.4 KB 288 | m_Series [ChartSeriesViewData[]] 9.81 KB 289 | [1] [ChartSeriesViewData] 2.45 KB 290 | k__BackingField [Single[]] 1.16 KB 291 | k__BackingField [Single[]] 1.16 KB 292 | ... 293 | [2] [ChartSeriesViewData] 2.45 KB 294 | k__BackingField [Single[]] 1.16 KB 295 | k__BackingField [Single[]] 1.16 KB 296 | ... 297 | [3] [ChartSeriesViewData] 2.45 KB 298 | k__BackingField [Single[]] 1.16 KB 299 | k__BackingField [Single[]] 1.16 KB 300 | ... 301 | [0] [ChartSeriesViewData] 2.44 KB 302 | k__BackingField [Single[]] 1.16 KB 303 | k__BackingField [Single[]] 1.16 KB 304 | ... 305 | m_LineDrawingPoints [Vector3[]] 3.49 KB 306 | ... 307 | [5] [ProfilerChart] 10.9 KB 308 | m_Series [ChartSeriesViewData[]] 9.88 KB 309 | [1] [ChartSeriesViewData] 2.47 KB 310 | k__BackingField [Single[]] 1.16 KB 311 | k__BackingField [Single[]] 1.16 KB 312 | ... 313 | [0] [ChartSeriesViewData] 2.46 KB 314 | k__BackingField [Single[]] 1.16 KB 315 | k__BackingField [Single[]] 1.16 KB 316 | ... 317 | [2] [ChartSeriesViewData] 2.46 KB 318 | k__BackingField [Single[]] 1.16 KB 319 | k__BackingField [Single[]] 1.16 KB 320 | ... 321 | [3] [ChartSeriesViewData] 2.46 KB 322 | k__BackingField [Single[]] 1.16 KB 323 | k__BackingField [Single[]] 1.16 KB 324 | ... 325 | ... 326 | ... 327 | m_CPUFrameDataHierarchyView [ProfilerFrameDataHierarchyView] 15.3 KB 328 | m_TreeView [ProfilerFrameDataTreeView] 9.75 KB 329 | m_Rows [List`1] 7.85 KB 330 | _items [TreeViewItem[]] 7.81 KB 331 | m_TreeView [TreeViewController] 1.20 KB 332 | ... 333 | m_DetailedCallsView [ProfilerDetailedCallsView] 2.50 KB 334 | m_CalleesTreeView [CallsTreeViewController] 1.07 KB 335 | m_CallersTreeView [CallsTreeViewController] 1.07 KB 336 | ... 337 | m_MultiColumnHeaderState [MultiColumnHeaderState] 1.31 KB 338 | m_Columns [Column[]] 1.19 KB 339 | ... 340 | m_DetailedObjectsView [ProfilerDetailedObjectsView] 1.11 KB 341 | ... 342 | m_GPUFrameDataHierarchyView [ProfilerFrameDataHierarchyView] 4.04 KB 343 | m_DetailedCallsView [ProfilerDetailedCallsView] 2.33 KB 344 | m_CalleesTreeView [CallsTreeViewController] 1.07 KB 345 | m_CallersTreeView [CallsTreeViewController] 1.07 KB 346 | ... 347 | ... 348 | ... 349 | DefaultCommon [DefaultCommon: StyleSheet (7346)] 45.4 KB 350 | m_Rules [StyleRule[]] 27.7 KB 351 | [2] [StyleRule] 1.70 KB 352 | m_Properties [StyleProperty[]] 1.66 KB 353 | [31] [StyleRule] 1.48 KB 354 | m_Properties [StyleProperty[]] 1.45 KB 355 | [30] [StyleRule] 1.48 KB 356 | m_Properties [StyleProperty[]] 1.45 KB 357 | [28] [StyleRule] 1.48 KB 358 | m_Properties [StyleProperty[]] 1.45 KB 359 | [33] [StyleRule] 1.08 KB 360 | m_Properties [StyleProperty[]] 1.05 KB 361 | [38] [StyleRule] 1.03 KB 362 | m_Properties [StyleProperty[]] 1024 bytes 363 | [41] [StyleRule] 1.03 KB 364 | m_Properties [StyleProperty[]] 1024 bytes 365 | [6] [StyleRule] 1.02 KB 366 | [4] [StyleRule] 1.01 KB 367 | ... 368 | m_ComplexSelectors [StyleComplexSelector[]] 14.8 KB 369 | strings [String[]] 1.80 KB 370 | ... 371 | DefaultCommonDark [DefaultCommonDark: StyleSheet (7592)] 35.7 KB 372 | m_ComplexSelectors [StyleComplexSelector[]] 20.1 KB 373 | m_Rules [StyleRule[]] 9.02 KB 374 | strings [String[]] 6.33 KB 375 | ... 376 | [: SceneView (3026)] 16.9 KB 377 | svRot [SceneViewRotation] 8.60 KB 378 | dirNameVisible [AnimBool[]] 5.48 KB 379 | dirVisible [AnimBool[]] 1.83 KB 380 | ... 381 | grid [SceneViewGrid] 1.84 KB 382 | ... 383 | GameSkin [GameSkin: GUISkin (728)] 12.5 KB 384 | m_Styles [Dictionary`2] 1.09 KB 385 | ... 386 | [: AnimatorControllerTool (3022)] 11.3 KB 387 | m_GraphUnderlayUI [IMGUIContainer] 1.49 KB 388 | ... 389 | [: InspectorWindow (3028)] 1.23 KB 390 | [: Graph (-1558)] 1.17 KB 391 | [: Graph (-1562)] 1.15 KB 392 | -------------------------------------------------------------------------------- /snapshot-example/generic-static-fields.txt: -------------------------------------------------------------------------------- 1 | Mono.Collections.Generic.ReadOnlyCollection`1.empty 2 | Mono.Empty`1.Array 3 | Unity.Jobs.IJobExtensions+JobStruct`1.<>f__mg$cache0 4 | Unity.Jobs.IJobExtensions+JobStruct`1.jobReflectionData 5 | Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1.<>f__mg$cache0 6 | Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1.jobReflectionData 7 | Unity.Jobs.LowLevel.Unsafe.BatchQueryJobStruct`1.jobReflectionData 8 | UnityEditor.Experimental.UIElements.BaseCompoundField`1.s_FieldDescriptions 9 | UnityEditor.Experimental.UIElements.GraphView.BaseTypeFactory`2.k_KeyType 10 | UnityEditor.Experimental.UIElements.GraphView.BaseTypeFactory`2.k_ValueType 11 | UnityEditor.Experimental.UIElements.GraphView.EdgeDragHelper`1.s_nodeAdapter 12 | UnityEditor.GenericPresetLibraryInspector`1.s_EditButtonStyle 13 | UnityEditor.JointEditor`1+Styles.editAngularLimitsButton 14 | UnityEditor.JointEditor`1+Styles.editAngularLimitsUndoMessage 15 | UnityEditor.PackageManager.UI.OperationSignal`1.<>f__am$cache0 16 | UnityEditor.PackageManager.UI.OperationSignal`1.<>f__am$cache1 17 | UnityEditor.PresetLibraryEditor`1.kCheckoutButtonMargin 18 | UnityEditor.PresetLibraryEditor`1.kCheckoutButtonMaxWidth 19 | UnityEditor.PresetLibraryEditor`1.kGridLabelHeight 20 | UnityEditor.PresetLibraryEditor`1.s_Styles 21 | UnityEditor.PresetLibraryEditor`1+PresetContextMenu.s_Caller 22 | UnityEditor.PresetLibraryEditor`1+PresetContextMenu.s_PresetIndex 23 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache0 24 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache1 25 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache2 26 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache3 27 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache4 28 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.<>f__mg$cache5 29 | UnityEditor.PresetLibraryEditor`1+SettingsMenu.s_Owner 30 | UnityEditor.ScriptableSingleton`1.s_Instance 31 | UnityEditor.ScriptableSingletonDictionary`2.k_Extension 32 | UnityEditor.ScriptableSingletonDictionary`2.s_Instance 33 | UnityEditorInternal.QuadTreeNode`1.kSmallestAreaForQuadTreeNode 34 | UnityEditorInternal.QuadTreeNode`1.m_DebugBoxFillColor 35 | UnityEditorInternal.QuadTreeNode`1.m_DebugFillColor 36 | UnityEditorInternal.QuadTreeNode`1.m_DebugWireColor 37 | UnityEngine.Experimental.UIElements.EventBase`1.s_Pool 38 | UnityEngine.Experimental.UIElements.EventBase`1.s_TypeId 39 | UnityEngine.Experimental.UIElements.StyleSheets.StyleValue`1.defaultStyle 40 | UnityEngine.Experimental.UIElements.UQuery+IsOfType`1.s_Instance 41 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1.s_Action 42 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1.s_List 43 | UnityEngine.Experimental.UIElements.UQuery+QueryState`1+DelegateQueryMatcher`1.s_Instance 44 | UnityEngine.Jobs.IJobParallelForTransformExtensions+TransformParallelForLoopStruct`1.<>f__mg$cache0 45 | UnityEngine.Jobs.IJobParallelForTransformExtensions+TransformParallelForLoopStruct`1.jobReflectionData 46 | UnityEngine.Networking.SyncList`1+Operation.OP_ADD 47 | UnityEngine.Networking.SyncList`1+Operation.OP_CLEAR 48 | UnityEngine.Networking.SyncList`1+Operation.OP_DIRTY 49 | UnityEngine.Networking.SyncList`1+Operation.OP_INSERT 50 | UnityEngine.Networking.SyncList`1+Operation.OP_REMOVE 51 | UnityEngine.Networking.SyncList`1+Operation.OP_REMOVEAT 52 | UnityEngine.Networking.SyncList`1+Operation.OP_SET 53 | UnityEngine.Playables.ScriptPlayable`1.m_NullPlayable 54 | UnityEngine.UI.ListPool`1.<>f__mg$cache0 55 | UnityEngine.UI.ListPool`1.s_ListPool 56 | -------------------------------------------------------------------------------- /snapshot-example/log.txt: -------------------------------------------------------------------------------- 1 | Mono Size Min: 1.01 GB 2 | Mono Size Max: 1.18 GB 3 | Total Allocated: 86.5 MB 4 | Total Reserved: 258.5 MB 5 | 6 | User Roots size: 424 bytes 7 | Static Roots size: 2.85 MB 8 | Hierarchy size: 2.93 KB 9 | Animator Controllers size: 0 bytes 10 | Prefabs size: 1.27 KB 11 | Scriptable Objects size: 771.8 KB 12 | Unity Objects size: 51.6 KB 13 | Total size: 3.66 MB 14 | -------------------------------------------------------------------------------- /snapshot-example/types-native.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 46.7 MB 2372 Texture2D 3 | 4.49 MB 31 Object 4 | 790.2 KB 112 Mesh 5 | 465.5 KB 631 MonoScript 6 | 439.7 KB 62 PluginImporter 7 | 0 bytes 10793 String 8 | 0 bytes 1175 Char 9 | 0 bytes 13763 Int32 10 | 0 bytes 244 Color 11 | 0 bytes 49389 Single 12 | 0 bytes 16133 Boolean 13 | 0 bytes 55 Object 14 | 0 bytes 37874 Byte 15 | 0 bytes 321 KeyCode 16 | 0 bytes 877 Vector3 17 | 0 bytes 3 DateTimeFormatInfo 18 | 0 bytes 463 String[] 19 | 0 bytes 70 Contraction 20 | 0 bytes 557 Vector2 21 | 0 bytes 70 Vector4 22 | 0 bytes 244 Double 23 | 0 bytes 15652 Int64 24 | 0 bytes 156 Type[] 25 | 0 bytes 539 RuntimeType 26 | 0 bytes 2664 Entry 27 | 0 bytes 1385 GUIStyle 28 | 0 bytes 5 GUIStyle[] 29 | 0 bytes 10011 GUIStyleState 30 | 0 bytes 169 RectOffset 31 | 0 bytes 10012 Texture2D[] 32 | 0 bytes 1875 Entry 33 | 0 bytes 80 Rect 34 | 0 bytes 88 Object[] 35 | 0 bytes 78 GUILayoutGroup 36 | 0 bytes 84 List`1 37 | 0 bytes 40 GUILayoutEntry[] 38 | 0 bytes 48 Action 39 | 0 bytes 1664 GUIContent 40 | 0 bytes 931 UInt32 41 | 0 bytes 8 StylePainter 42 | 0 bytes 15 VisualElement 43 | 0 bytes 44 HashSet`1 44 | 0 bytes 22 RenderData 45 | 0 bytes 38 CSSNode 46 | 0 bytes 26 VisualElementStylesData 47 | 0 bytes 27 List`1 48 | 0 bytes 15 IMGUIContainer 49 | 0 bytes 79 WeakReference 50 | 0 bytes 96 GUILayoutEntry 51 | 0 bytes 25 SplitterState 52 | 0 bytes 125 Slot 53 | 0 bytes 116 RuleMatcher 54 | 0 bytes 116 StyleComplexSelector 55 | 0 bytes 107 StyleRule 56 | 0 bytes 116 StyleSelector[] 57 | 0 bytes 107 StyleProperty[] 58 | 0 bytes 199 StyleSelector 59 | 0 bytes 332 StyleProperty 60 | 0 bytes 313 StyleSelectorPart 61 | 0 bytes 332 StyleValueHandle 62 | 0 bytes 89 Entry 63 | 0 bytes 29 ExclusiveReference 64 | 0 bytes 29 RegexCode 65 | 0 bytes 29 Regex 66 | 0 bytes 73 MixerParameterDefinition 67 | 0 bytes 115 GUIContent[] 68 | 0 bytes 2613 bucket 69 | 0 bytes 50 Hashtable 70 | 0 bytes 28 PrefColor 71 | 0 bytes 200 ContactPoint2D 72 | 0 bytes 58 PrefKey 73 | 0 bytes 65 MonoProperty 74 | 0 bytes 65 MonoPropertyInfo 75 | 0 bytes 95 Entry 76 | 0 bytes 628 Entry 77 | 0 bytes 375 List`1 78 | 0 bytes 375 MonoEditorType[] 79 | 0 bytes 221 MonoEditorType 80 | 0 bytes 95 MonoAssembly 81 | 0 bytes 83 List`1 82 | 0 bytes 17 RenameOverlay 83 | 0 bytes 36 InvokableCallList 84 | 0 bytes 2 ListElement[] 85 | 0 bytes 9 BuiltinResource[] 86 | 0 bytes 108 List`1 87 | 0 bytes 36 List`1 88 | 0 bytes 239 ListElement 89 | 0 bytes 8 TreeViewItem[] 90 | 0 bytes 165 BuiltinResource 91 | 0 bytes 39 GameViewSize 92 | 0 bytes 50 BoneMappingItem 93 | 0 bytes 49 BonePoseData 94 | 0 bytes 49 Entry 95 | 0 bytes 49 FontSetting 96 | 0 bytes 77 TargetAssembly 97 | 0 bytes 68 Func`2 98 | 0 bytes 77 List`1 99 | 0 bytes 128 ScriptCompilerOptions 100 | 0 bytes 67 Func`3 101 | 0 bytes 13 TargetAssembly[] 102 | 0 bytes 89 PrecompiledAssembly 103 | 0 bytes 127 CustomScriptAssembly 104 | 0 bytes 189 PackageAssembly 105 | 0 bytes 65 c__AnonStorey1 106 | 0 bytes 65 c__AnonStorey2 107 | 0 bytes 292 UnityType 108 | 0 bytes 1 UnityType[] 109 | 0 bytes 431 Entry 110 | 0 bytes 431 Entry 111 | 0 bytes 13 IvyInfo 112 | 0 bytes 28 PackageVersion 113 | 0 bytes 29 IvyArtifact 114 | 0 bytes 475 OpCode 115 | 0 bytes 69 BitSet 116 | 0 bytes 404 Node 117 | 0 bytes 404 Node[] 118 | 0 bytes 28 BitArray 119 | 0 bytes 74 Entry 120 | 0 bytes 23 MonoField 121 | 0 bytes 5 AssemblyBuilder 122 | 0 bytes 5 ModuleBuilder 123 | 0 bytes 20 CustomAttributeBuilder 124 | 0 bytes 12 TypeDesc 125 | 0 bytes 30 TypeBuilder 126 | 0 bytes 50 Internal 127 | 0 bytes 55 Entry 128 | 0 bytes 96 MethodBuilder 129 | 0 bytes 20 ConstructorBuilder 130 | 0 bytes 33 FieldBuilder 131 | 0 bytes 25 PropertyBuilder 132 | 0 bytes 51 ParameterBuilder 133 | 0 bytes 13 ChartViewData 134 | 0 bytes 26 ChartSeriesViewData[] 135 | 0 bytes 79 ChartSeriesViewData 136 | 0 bytes 36 Column 137 | 0 bytes 208 LabelLayoutData 138 | -------------------------------------------------------------------------------- /snapshot-example/types-self.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 854.1 KB 10793 String 3 | 808.0 KB 404 Node[] 4 | 469.3 KB 10011 GUIStyleState 5 | 192.9 KB 49389 Single 6 | 173.1 KB 1385 GUIStyle 7 | 122.3 KB 15652 Int64 8 | 65.0 KB 1664 GUIContent 9 | 63.0 KB 16133 Boolean 10 | 55.6 KB 2372 Texture2D 11 | 53.8 KB 13763 Int32 12 | 52.0 KB 2664 Entry 13 | 51.0 KB 2613 bucket 14 | 43.9 KB 1875 Entry 15 | 37.0 KB 37874 Byte 16 | 25.3 KB 539 RuntimeType 17 | 18.8 KB 96 MethodBuilder 18 | 18.3 KB 292 UnityType 19 | 16.3 KB 463 String[] 20 | 15.8 KB 8 TreeViewItem[] 21 | 15.8 KB 404 Node 22 | 14.8 KB 631 MonoScript 23 | 14.7 KB 628 Entry 24 | 14.6 KB 375 List`1 25 | 13.0 KB 26 VisualElementStylesData 26 | 11.7 KB 375 MonoEditorType[] 27 | 11.2 KB 239 ListElement 28 | 10.9 KB 200 ContactPoint2D 29 | 10.4 KB 332 StyleProperty 30 | 10.4 KB 78 GUILayoutGroup 31 | 10.4 KB 221 MonoEditorType 32 | 10.3 KB 877 Vector3 33 | 10.1 KB 431 Entry 34 | 9.92 KB 127 CustomScriptAssembly 35 | 9.59 KB 10012 Texture2D[] 36 | 9.26 KB 5 GUIStyle[] 37 | 8.42 KB 431 Entry 38 | 7.77 KB 199 StyleSelector 39 | 6.11 KB 313 StyleSelectorPart 40 | 6.09 KB 30 TypeBuilder 41 | 6.02 KB 77 TargetAssembly 42 | 6.00 KB 96 GUILayoutEntry 43 | 5.55 KB 79 ChartSeriesViewData 44 | 5.28 KB 169 RectOffset 45 | 5.16 KB 165 BuiltinResource 46 | 4.53 KB 116 StyleComplexSelector 47 | 4.45 KB 95 MonoAssembly 48 | 4.35 KB 557 Vector2 49 | 4.22 KB 108 List`1 50 | 4.06 KB 208 LabelLayoutData 51 | 3.91 KB 50 Hashtable 52 | 3.81 KB 244 Color 53 | 3.71 KB 475 OpCode 54 | 3.69 KB 189 PackageAssembly 55 | 3.64 KB 931 UInt32 56 | 3.63 KB 15 VisualElement 57 | 3.63 KB 15 IMGUIContainer 58 | 3.61 KB 33 FieldBuilder 59 | 3.59 KB 51 ParameterBuilder 60 | 3.34 KB 107 StyleRule 61 | 3.30 KB 115 GUIContent[] 62 | 3.28 KB 70 Contraction 63 | 3.28 KB 84 List`1 64 | 3.24 KB 83 List`1 65 | 3.17 KB 58 PrefKey 66 | 3.14 KB 73 MixerParameterDefinition 67 | 3.13 KB 25 PropertyBuilder 68 | 3.05 KB 65 MonoProperty 69 | 3.01 KB 77 List`1 70 | 3.00 KB 128 ScriptCompilerOptions 71 | 2.95 KB 29 Regex 72 | 2.93 KB 50 BoneMappingItem 73 | 2.79 KB 65 MonoPropertyInfo 74 | 2.75 KB 44 HashSet`1 75 | 2.68 KB 49 BonePoseData 76 | 2.63 KB 28 PrefColor 77 | 2.63 KB 112 Mesh 78 | 2.59 KB 107 StyleProperty[] 79 | 2.59 KB 332 StyleValueHandle 80 | 2.53 KB 36 Column 81 | 2.38 KB 38 CSSNode 82 | 2.28 KB 1 UnityType[] 83 | 2.23 KB 22 RenderData 84 | 2.23 KB 95 Entry 85 | 2.19 KB 20 ConstructorBuilder 86 | 2.13 KB 2 ListElement[] 87 | 2.04 KB 29 RegexCode 88 | 2.04 KB 29 IvyArtifact 89 | 2.03 KB 65 c__AnonStorey1 90 | 1.99 KB 17 RenameOverlay 91 | 1.95 KB 125 Slot 92 | 1.92 KB 88 Object[] 93 | 1.91 KB 244 Double 94 | 1.85 KB 79 WeakReference 95 | 1.83 KB 39 GameViewSize 96 | 1.81 KB 40 GUILayoutEntry[] 97 | 1.81 KB 116 RuleMatcher 98 | 1.76 KB 25 SplitterState 99 | 1.74 KB 89 Entry 100 | 1.69 KB 36 InvokableCallList 101 | 1.62 KB 69 BitSet 102 | 1.59 KB 68 Func`2 103 | 1.59 KB 12 TypeDesc 104 | 1.57 KB 67 Func`3 105 | 1.56 KB 50 Internal 106 | 1.55 KB 116 StyleSelector[] 107 | 1.52 KB 65 c__AnonStorey2 108 | 1.48 KB 5 AssemblyBuilder 109 | 1.45 KB 62 PluginImporter 110 | 1.42 KB 13 IvyInfo 111 | 1.41 KB 36 List`1 112 | 1.41 KB 20 CustomAttributeBuilder 113 | 1.39 KB 89 PrecompiledAssembly 114 | 1.35 KB 156 Type[] 115 | 1.31 KB 28 PackageVersion 116 | 1.29 KB 55 Object 117 | 1.29 KB 9 BuiltinResource[] 118 | 1.26 KB 23 MonoField 119 | 1.25 KB 321 KeyCode 120 | 1.25 KB 80 Rect 121 | 1.23 KB 26 ChartSeriesViewData[] 122 | 1.21 KB 31 Object 123 | 1.20 KB 13 TargetAssembly[] 124 | 1.16 KB 74 Entry 125 | 1.15 KB 49 Entry 126 | 1.15 KB 49 FontSetting 127 | 1.15 KB 1175 Char 128 | 1.13 KB 29 ExclusiveReference 129 | 1.13 KB 5 ModuleBuilder 130 | 1.13 KB 3 DateTimeFormatInfo 131 | 1.13 KB 48 Action 132 | 1.12 KB 13 ChartViewData 133 | 1.09 KB 70 Vector4 134 | 1.09 KB 28 BitArray 135 | 1.07 KB 55 Entry 136 | 1.06 KB 8 StylePainter 137 | 1.05 KB 27 List`1 138 | -------------------------------------------------------------------------------- /snapshot-example/types-total.txt: -------------------------------------------------------------------------------- 1 | Size Count Type 2 | 2.97 MB 404 Node 3 | 2.95 MB 404 Node[] 4 | 854.1 KB 10793 String 5 | 680.2 KB 1385 GUIStyle 6 | 590.7 KB 5 GUIStyle[] 7 | 504.5 KB 10011 GUIStyleState 8 | 267.3 KB 50 Hashtable 9 | 263.4 KB 2613 bucket 10 | 245.4 KB 1664 GUIContent 11 | 194.9 KB 26 ChartSeriesViewData[] 12 | 193.7 KB 79 ChartSeriesViewData 13 | 192.9 KB 49389 Single 14 | 138.3 KB 5 AssemblyBuilder 15 | 133.1 KB 5 ModuleBuilder 16 | 123.3 KB 69 BitSet 17 | 122.3 KB 15652 Int64 18 | 116.1 KB 1875 Entry 19 | 92.8 KB 463 String[] 20 | 71.1 KB 628 Entry 21 | 63.0 KB 16133 Boolean 22 | 59.4 KB 15 VisualElement 23 | 55.6 KB 2372 Texture2D 24 | 55.4 KB 30 TypeBuilder 25 | 55.0 KB 2664 Entry 26 | 53.9 KB 78 GUILayoutGroup 27 | 53.8 KB 13763 Int32 28 | 49.9 KB 1 UnityType[] 29 | 47.6 KB 292 UnityType 30 | 47.0 KB 375 List`1 31 | 46.5 KB 29 Regex 32 | 45.9 KB 84 List`1 33 | 44.7 KB 13 TargetAssembly[] 34 | 43.5 KB 77 TargetAssembly 35 | 42.6 KB 40 GUILayoutEntry[] 36 | 37.0 KB 37874 Byte 37 | 36.9 KB 15 IMGUIContainer 38 | 36.0 KB 107 StyleRule 39 | 34.3 KB 116 StyleComplexSelector 40 | 32.8 KB 127 CustomScriptAssembly 41 | 32.7 KB 107 StyleProperty[] 42 | 32.4 KB 375 MonoEditorType[] 43 | 32.2 KB 2 ListElement[] 44 | 30.1 KB 332 StyleProperty 45 | 30.1 KB 239 ListElement 46 | 29.7 KB 116 StyleSelector[] 47 | 28.5 KB 29 RegexCode 48 | 28.1 KB 199 StyleSelector 49 | 27.7 KB 539 RuntimeType 50 | 26.0 KB 96 MethodBuilder 51 | 24.1 KB 68 Func`2 52 | 22.5 KB 65 c__AnonStorey1 53 | 22.1 KB 95 MonoAssembly 54 | 21.8 KB 89 PrecompiledAssembly 55 | 20.7 KB 221 MonoEditorType 56 | 20.3 KB 313 StyleSelectorPart 57 | 18.9 KB 9 BuiltinResource[] 58 | 18.1 KB 10012 Texture2D[] 59 | 17.7 KB 44 HashSet`1 60 | 17.6 KB 165 BuiltinResource 61 | 17.4 KB 8 TreeViewItem[] 62 | 16.9 KB 73 MixerParameterDefinition 63 | 14.8 KB 631 MonoScript 64 | 14.4 KB 125 Slot 65 | 14.2 KB 26 VisualElementStylesData 66 | 13.9 KB 50 Internal 67 | 13.8 KB 65 c__AnonStorey2 68 | 12.3 KB 49 Entry 69 | 10.9 KB 200 ContactPoint2D 70 | 10.3 KB 877 Vector3 71 | 10.1 KB 431 Entry 72 | 9.86 KB 189 PackageAssembly 73 | 9.50 KB 88 Object[] 74 | 9.27 KB 65 MonoProperty 75 | 8.42 KB 431 Entry 76 | 8.41 KB 115 GUIContent[] 77 | 8.10 KB 49 FontSetting 78 | 7.89 KB 29 IvyArtifact 79 | 7.86 KB 36 InvokableCallList 80 | 7.80 KB 58 PrefKey 81 | 7.09 KB 38 CSSNode 82 | 6.22 KB 65 MonoPropertyInfo 83 | 6.17 KB 108 List`1 84 | 6.11 KB 83 List`1 85 | 6.00 KB 96 GUILayoutEntry 86 | 5.98 KB 13 IvyInfo 87 | 5.60 KB 70 Contraction 88 | 5.28 KB 169 RectOffset 89 | 5.02 KB 12 TypeDesc 90 | 4.87 KB 89 Entry 91 | 4.75 KB 28 PrefColor 92 | 4.66 KB 33 FieldBuilder 93 | 4.42 KB 95 Entry 94 | 4.35 KB 557 Vector2 95 | 4.19 KB 36 Column 96 | 4.06 KB 208 LabelLayoutData 97 | 4.05 KB 51 ParameterBuilder 98 | 3.81 KB 244 Color 99 | 3.71 KB 475 OpCode 100 | 3.64 KB 931 UInt32 101 | 3.60 KB 77 List`1 102 | 3.55 KB 156 Type[] 103 | 3.38 KB 39 GameViewSize 104 | 3.37 KB 25 PropertyBuilder 105 | 3.09 KB 28 PackageVersion 106 | 3.05 KB 17 RenameOverlay 107 | 3.00 KB 128 ScriptCompilerOptions 108 | 2.93 KB 50 BoneMappingItem 109 | 2.88 KB 3 DateTimeFormatInfo 110 | 2.79 KB 23 MonoField 111 | 2.72 KB 49 BonePoseData 112 | 2.63 KB 112 Mesh 113 | 2.59 KB 332 StyleValueHandle 114 | 2.53 KB 13 ChartViewData 115 | 2.45 KB 31 Object 116 | 2.40 KB 25 SplitterState 117 | 2.23 KB 22 RenderData 118 | 2.19 KB 20 ConstructorBuilder 119 | 2.15 KB 20 CustomAttributeBuilder 120 | 1.91 KB 244 Double 121 | 1.85 KB 79 WeakReference 122 | 1.81 KB 116 RuleMatcher 123 | 1.66 KB 28 BitArray 124 | 1.64 KB 36 List`1 125 | 1.57 KB 67 Func`3 126 | 1.56 KB 48 Action 127 | 1.45 KB 62 PluginImporter 128 | 1.29 KB 55 Object 129 | 1.25 KB 321 KeyCode 130 | 1.25 KB 80 Rect 131 | 1.16 KB 74 Entry 132 | 1.15 KB 1175 Char 133 | 1.13 KB 29 ExclusiveReference 134 | 1.09 KB 70 Vector4 135 | 1.07 KB 55 Entry 136 | 1.06 KB 8 StylePainter 137 | 1.05 KB 27 List`1 138 | -------------------------------------------------------------------------------- /snapshot-example/types/Cubemap.txt: -------------------------------------------------------------------------------- 1 | (UnityEngine.Cubemap) [native 256.8 KB, managed 24 bytes] root paths: 2 | 3 | UnityBlackCube (UnityEngine.Cubemap) [native 532 bytes, managed 24 bytes] root paths: 4 | 5 | UnityDefaultCube (UnityEngine.Cubemap) [native 532 bytes, managed 24 bytes] root paths: 6 | 7 | -------------------------------------------------------------------------------- /snapshot-example/types/CubemapArray.txt: -------------------------------------------------------------------------------- 1 | UnityDefaultCubeArray (UnityEngine.CubemapArray) [native 24 bytes, managed 24 bytes] root paths: 2 | 3 | -------------------------------------------------------------------------------- /snapshot-example/types/RenderTexture.txt: -------------------------------------------------------------------------------- 1 | TempBuffer 343 1142x642 (UnityEngine.RenderTexture) [native 16.8 MB, managed 24 bytes] root paths: 2 | 3 | GameView RT (UnityEngine.RenderTexture) [native 5.59 MB, managed 24 bytes] root paths: 4 | GameView.s_LastFocusedGameView.m_TargetTexture 5 | 6 | Camera DepthTexture (UnityEngine.RenderTexture) [native 2.80 MB, managed 24 bytes] root paths: 7 | 8 | null [managed 456 bytes] root paths: 9 | .m_SceneTargetTexture 10 | 11 | -------------------------------------------------------------------------------- /snapshot-example/types/Sprite.txt: -------------------------------------------------------------------------------- 1 | Knob (UnityEngine.Sprite) [native 1.72 KB, managed 24 bytes] root paths: 2 | HierarchyObject.Child1.SpriteHolder2.Image.m_Sprite 3 | 4 | UISprite (UnityEngine.Sprite) [native 1.56 KB, managed 24 bytes] root paths: 5 | HierarchyObject.Child1.SpriteHolder1.Image.m_Sprite 6 | 7 | UnitySplash-cube (UnityEngine.Sprite) [native 1.46 KB, managed 24 bytes] root paths: 8 | 9 | -------------------------------------------------------------------------------- /snapshot-example/types/Texture.txt: -------------------------------------------------------------------------------- 1 | null [managed 24 bytes] root paths: 2 | ConsoleWindow.ms_ConsoleWindow.m_Notification.m_Image 3 | 4 | null [managed 24 bytes] root paths: 5 | ProjectBrowser.s_LastInteractedProjectBrowser.m_Notification.m_Image 6 | 7 | null [managed 24 bytes] root paths: 8 | SceneHierarchyWindow.s_LastInteractedHierarchy.m_Notification.m_Image 9 | 10 | null [managed 24 bytes] root paths: 11 | AudioMixerWindow.s_Instance.m_Notification.m_Image 12 | 13 | null [managed 24 bytes] root paths: 14 | GameView.s_LastFocusedGameView.m_Notification.m_Image 15 | 16 | null [managed 24 bytes] root paths: 17 | .m_Notification.m_Image 18 | 19 | null [managed 24 bytes] root paths: 20 | .m_Notification.m_Image 21 | 22 | null [managed 24 bytes] root paths: 23 | .m_Notification.m_Image 24 | 25 | null [managed 24 bytes] root paths: 26 | .m_Notification.m_Image 27 | 28 | -------------------------------------------------------------------------------- /snapshot-example/types/Texture2DArray.txt: -------------------------------------------------------------------------------- 1 | UnityDefault2DArray (UnityEngine.Texture2DArray) [native 4 bytes, managed 24 bytes] root paths: 2 | 3 | -------------------------------------------------------------------------------- /snapshot-example/types/Texture3D.txt: -------------------------------------------------------------------------------- 1 | UnityDitherMask3D (UnityEngine.Texture3D) [native 256 bytes, managed 24 bytes] root paths: 2 | 3 | UnityDefault3D (UnityEngine.Texture3D) [native 4 bytes, managed 24 bytes] root paths: 4 | 5 | -------------------------------------------------------------------------------- /snapshot-example/types/Unit.txt: -------------------------------------------------------------------------------- 1 | Sample.Unit [managed 160 bytes] root paths: 2 | Game.Instance [Game].player 3 | Game.Instance [Game].allUnits._items.[0] 4 | 5 | Sample.Unit [managed 56 bytes] root paths: 6 | Game.Instance [Game].player.Pet 7 | Game.Instance [Game].allUnits._items.[1] 8 | 9 | Sample.Unit [managed 56 bytes] root paths: 10 | Game.Instance [Game].allUnits._items.[2] 11 | Game.Enemies.Units.[0] 12 | 13 | Sample.Unit [managed 56 bytes] root paths: 14 | Game.Instance [Game].allUnits._items.[3] 15 | Game.Enemies.Units.[1] 16 | 17 | --------------------------------------------------------------------------------