├── Packages ├── manifest.json └── manifest.json.meta ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── EditorBuildSettings.asset ├── NetworkManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorSettings.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── docs └── images │ ├── Analytics360VideoGTD.png │ ├── Analytics360VideoJob.png │ ├── Analytics360VideoTex.png │ ├── Analytics360VideoFull.png │ ├── Analytics360VideoPlayer.png │ ├── Analytics360VideoSender.png │ ├── Analytics360VideoSkybox.png │ ├── Analytics360VideoActivate.png │ ├── Analytics360VideoFlatHeat.png │ ├── Analytics360VideoMaterial.png │ ├── Analytics360VideoRawData.png │ ├── Analytics360VideoAddSender.png │ ├── Analytics360VideoHeatmapper.png │ └── Analytics360VideoValidator.png ├── Assets ├── AssetStorePackage │ ├── Plugins │ │ ├── Heatmaps │ │ │ ├── Internal │ │ │ │ ├── Lib │ │ │ │ │ ├── Ionic.Zlib.dll │ │ │ │ │ ├── MiniJSON.cs.meta │ │ │ │ │ ├── Ionic.Zlib.dll.meta │ │ │ │ │ └── MiniJSON.cs │ │ │ │ ├── Models │ │ │ │ │ ├── DateTimeUtils.cs │ │ │ │ │ ├── HeatPoint.cs.meta │ │ │ │ │ ├── DateTimeUtils.cs.meta │ │ │ │ │ ├── HeatmapViewModel.cs.meta │ │ │ │ │ └── HeatPoint.cs │ │ │ │ ├── Lib.meta │ │ │ │ ├── Config.meta │ │ │ │ ├── Models.meta │ │ │ │ ├── Renderer.meta │ │ │ │ ├── Services.meta │ │ │ │ ├── Shaders.meta │ │ │ │ ├── Controllers.meta │ │ │ │ ├── Shaders │ │ │ │ │ ├── heatmap.compute.meta │ │ │ │ │ └── heatmap.compute │ │ │ │ ├── Renderer │ │ │ │ │ ├── AggregationMethod.cs │ │ │ │ │ ├── GradientUtils.cs.meta │ │ │ │ │ ├── VideoRenderer.cs.meta │ │ │ │ │ ├── AggregationMethod.cs.meta │ │ │ │ │ ├── GradientContainer.cs.meta │ │ │ │ │ ├── IHeatmapRenderer.cs.meta │ │ │ │ │ ├── Hotspots.cs.meta │ │ │ │ │ ├── GradientContainer.cs │ │ │ │ │ ├── IHeatmapRenderer.cs │ │ │ │ │ ├── GradientUtils.cs │ │ │ │ │ ├── VideoRenderer.cs │ │ │ │ │ └── Hotspots.cs │ │ │ │ ├── Services │ │ │ │ │ └── HeatmapAggregator.cs.meta │ │ │ │ ├── Config │ │ │ │ │ ├── UnityAnalyticsEventType.cs.meta │ │ │ │ │ └── UnityAnalyticsEventType.cs │ │ │ │ └── Controllers │ │ │ │ │ ├── HeatmapDataProcessor.cs.meta │ │ │ │ │ └── HeatmapDataProcessor.cs │ │ │ ├── Heatmaps.mdproj.meta │ │ │ ├── Internal.meta │ │ │ ├── Data Collection.meta │ │ │ ├── Heatmap Render.meta │ │ │ ├── Heatmap Render │ │ │ │ ├── Skybox-Panoramic-Heatmap.shader.meta │ │ │ │ └── Skybox-Panoramic-Heatmap.shader │ │ │ ├── Data Collection │ │ │ │ ├── HeatmapEvent.cs.meta │ │ │ │ ├── HeatmapSender.cs.meta │ │ │ │ ├── HeatmapSender.cs │ │ │ │ └── HeatmapEvent.cs │ │ │ └── Heatmaps.mdproj │ │ ├── Common.meta │ │ ├── Heatmaps.meta │ │ ├── RawDataExportImporter.meta │ │ ├── Common │ │ │ ├── IonicGZip.cs.meta │ │ │ └── IonicGZip.cs │ │ └── RawDataExportImporter │ │ │ └── RawDataClient.cs.meta │ ├── Editor │ │ ├── Heatmaps │ │ │ ├── Resources │ │ │ │ ├── unity_analytics_heatmaps_failed.png │ │ │ │ ├── unity_analytics_heatmaps_none_dark.png │ │ │ │ ├── unity_analytics_heatmaps_play_dark.png │ │ │ │ ├── unity_analytics_heatmaps_running.png │ │ │ │ ├── unity_analytics_heatmaps_rwd_dark.png │ │ │ │ ├── unity_analytics_heatmaps_rwd_light.png │ │ │ │ ├── unity_analytics_heatmaps_success.png │ │ │ │ ├── unity_analytics_heatmaps_heatmapper.png │ │ │ │ ├── unity_analytics_heatmaps_none_light.png │ │ │ │ ├── unity_analytics_heatmaps_number_dark.png │ │ │ │ ├── unity_analytics_heatmaps_pause_dark.png │ │ │ │ ├── unity_analytics_heatmaps_pause_light.png │ │ │ │ ├── unity_analytics_heatmaps_play_light.png │ │ │ │ ├── unity_analytics_heatmaps_union_dark.png │ │ │ │ ├── unity_analytics_heatmaps_union_light.png │ │ │ │ ├── unity_analytics_heatmaps_number_light.png │ │ │ │ ├── unity_analytics_heatmaps_failed.png.meta │ │ │ │ ├── unity_analytics_heatmaps_running.png.meta │ │ │ │ ├── unity_analytics_heatmaps_rwd_dark.png.meta │ │ │ │ ├── unity_analytics_heatmaps_success.png.meta │ │ │ │ ├── unity_analytics_heatmaps_heatmapper.png.meta │ │ │ │ ├── unity_analytics_heatmaps_none_dark.png.meta │ │ │ │ ├── unity_analytics_heatmaps_none_light.png.meta │ │ │ │ ├── unity_analytics_heatmaps_number_dark.png.meta │ │ │ │ ├── unity_analytics_heatmaps_number_light.png.meta │ │ │ │ ├── unity_analytics_heatmaps_pause_dark.png.meta │ │ │ │ ├── unity_analytics_heatmaps_pause_light.png.meta │ │ │ │ ├── unity_analytics_heatmaps_play_dark.png.meta │ │ │ │ ├── unity_analytics_heatmaps_play_light.png.meta │ │ │ │ ├── unity_analytics_heatmaps_rwd_light.png.meta │ │ │ │ ├── unity_analytics_heatmaps_union_dark.png.meta │ │ │ │ └── unity_analytics_heatmaps_union_light.png.meta │ │ │ ├── Views.meta │ │ │ ├── Resources.meta │ │ │ └── Views │ │ │ │ ├── Components.meta │ │ │ │ ├── Heatmapper.cs.meta │ │ │ │ ├── AggregationInspector.cs.meta │ │ │ │ ├── Components │ │ │ │ ├── DatePicker.cs.meta │ │ │ │ ├── ListGroup.cs.meta │ │ │ │ ├── EditorGUIBinding.cs.meta │ │ │ │ ├── SmootherControl.cs.meta │ │ │ │ ├── TextFieldList.cs.meta │ │ │ │ ├── HeatmapClipNameList.cs.meta │ │ │ │ ├── HeatmapClipNameList.cs │ │ │ │ ├── TextFieldList.cs │ │ │ │ ├── ListGroup.cs │ │ │ │ ├── SmootherControl.cs │ │ │ │ └── DatePicker.cs │ │ │ │ ├── FlattenedHeatmapView.cs.meta │ │ │ │ ├── HeatmapRendererInspector.cs.meta │ │ │ │ ├── FlattenedHeatmapView.cs │ │ │ │ ├── AggregationInspector.cs │ │ │ │ ├── Heatmapper.cs │ │ │ │ └── HeatmapRendererInspector.cs │ │ ├── Heatmaps.meta │ │ ├── RawDataExportImporter.meta │ │ └── RawDataExportImporter │ │ │ └── RawDataInspector.cs.meta │ ├── Editor.meta │ └── Plugins.meta └── AssetStorePackage.meta ├── .gitignore └── LICENSE /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.3.0b6 2 | -------------------------------------------------------------------------------- /docs/images/Analytics360VideoGTD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoGTD.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoJob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoJob.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoTex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoTex.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoFull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoFull.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoPlayer.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoSender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoSender.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoSkybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoSkybox.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoActivate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoActivate.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoFlatHeat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoFlatHeat.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoMaterial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoMaterial.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoRawData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoRawData.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoAddSender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoAddSender.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoHeatmapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoHeatmapper.png -------------------------------------------------------------------------------- /docs/images/Analytics360VideoValidator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/docs/images/Analytics360VideoValidator.png -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib/Ionic.Zlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib/Ionic.Zlib.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_failed.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_running.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_light.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_success.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_heatmapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_heatmapper.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_light.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_light.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_light.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_dark.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_light.png -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/360-Video-Heatmaps/master/Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_light.png -------------------------------------------------------------------------------- /Packages/manifest.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cecba69bb9164224b36752207636496 3 | timeCreated: 1513637617 4 | licenseType: Pro 5 | TextScriptImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c238225edea024c2b8df349394939c3f 3 | folderAsset: yes 4 | timeCreated: 1512691582 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models/DateTimeUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace UnityAnalytics 3 | { 4 | public class DateTimeUtils 5 | { 6 | public static DateTime s_Epoch = new DateTime(1970,1,1,0,0,0,0,System.DateTimeKind.Utc); 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31d8d23c21c2346f489ea4b8ea895323 3 | folderAsset: yes 4 | timeCreated: 1438098821 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ee84e478a26b43ed897ed7b69c9b6ff 3 | folderAsset: yes 4 | timeCreated: 1437429523 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Common.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 539cd1dc7f3cb4859928b76482359a8f 3 | folderAsset: yes 4 | timeCreated: 1509999950 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Heatmaps.mdproj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ca3c691e42eb48f0baff5a632e91350 3 | timeCreated: 1437429523 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f21d9411463fe4c518583dc787a70979 3 | folderAsset: yes 4 | timeCreated: 1438293695 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5c608afd7add48c88e7fdc16c3a391e 3 | folderAsset: yes 4 | timeCreated: 1437429523 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc1aae7c6c4fe4030b056a8d2df57df3 3 | folderAsset: yes 4 | timeCreated: 1444707777 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62249380d6a53419c8af2248825f2225 3 | folderAsset: yes 4 | timeCreated: 1463713534 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/RawDataExportImporter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4923726aa9e5a4d07a43247389e81ebc 3 | folderAsset: yes 4 | timeCreated: 1509999757 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c823b6cdb9bf14ed8a0ad66690227c68 3 | folderAsset: yes 4 | timeCreated: 1512760561 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfdf5ae6e9b3a41938676ed035d2e7e3 3 | folderAsset: yes 4 | timeCreated: 1438385450 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/RawDataExportImporter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 336aaf036161b4535a37634bdb0247fb 3 | folderAsset: yes 4 | timeCreated: 1509999791 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6238eb5270fde46bfb6f852753b8cbc0 3 | folderAsset: yes 4 | timeCreated: 1471146040 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Data Collection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 563986ea2eed04fdcb7b9b2fa6556ea3 3 | folderAsset: yes 4 | timeCreated: 1512760550 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Heatmap Render.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84f7580997b7341a1b4b9b21eebd5a49 3 | folderAsset: yes 4 | timeCreated: 1512760710 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Config.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0930d3a2e921d40bbb5f4bb4377c2b3f 3 | folderAsset: yes 4 | timeCreated: 1444707935 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d044b59d14c8483c8ddf2641f0995ea 3 | folderAsset: yes 4 | timeCreated: 1470590513 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ecd5096688ba475ea13c7b46da06db9 3 | folderAsset: yes 4 | timeCreated: 1437429523 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Services.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebffa5d7cc33b4bd4b9f036239b81d55 3 | folderAsset: yes 4 | timeCreated: 1444708626 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 982837f674326450197589a7ed0d3422 3 | folderAsset: yes 4 | timeCreated: 1437760909 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Controllers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1080133c164f04a9e8c95a4f35f374dd 3 | folderAsset: yes 4 | timeCreated: 1470595871 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Shaders/heatmap.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff969f478115f472980c928bc942fa56 3 | timeCreated: 1505256706 4 | licenseType: Pro 5 | ComputeShaderImporter: 6 | externalObjects: {} 7 | currentAPIMask: 196608 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Heatmap Render/Skybox-Panoramic-Heatmap.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6bc35204d28841369e212c37e8b22c5 3 | timeCreated: 1505407735 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/AggregationMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityAnalytics360VideoHeatmap 4 | { 5 | public enum AggregationMethod 6 | { 7 | Increment, 8 | Cumulative, 9 | Average, 10 | Max, 11 | Min, 12 | First, 13 | Last, 14 | Percentile 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Common/IonicGZip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7fd47e454afe48218b7d4e1e5e221d3 3 | timeCreated: 1464048959 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Heatmapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37d29778284e24f8186804b8cfa2a858 3 | timeCreated: 1437429523 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib/MiniJSON.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adec011f8959049f5accb530c4586615 3 | timeCreated: 1444699744 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/AggregationInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d34ee6154c4743b1b5f0749c2c3eba4 3 | timeCreated: 1512690865 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/DatePicker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b5aa70313e0c4f88928766412f1bdbe 3 | timeCreated: 1470758172 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/ListGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20e613089e0a74d51b7f242a94f6b824 3 | timeCreated: 1471377655 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/FlattenedHeatmapView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33a5b2e52e86d4dea9be8bde90e20067 3 | timeCreated: 1513107479 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/RawDataExportImporter/RawDataInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0c2ffc68c6f4488a8b8e328a9049f83 3 | timeCreated: 1461961853 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Data Collection/HeatmapEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b2a6822dabcf433db9bbd852dfaee1f 3 | timeCreated: 1437429523 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models/HeatPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1280ddf724987485a8cd8346a83f09f5 3 | timeCreated: 1437429523 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/RawDataExportImporter/RawDataClient.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3a32f1eab614447da88cdd81ab49aab 3 | timeCreated: 1465508050 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/EditorGUIBinding.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43ea6d38276954c8db58acd019e1122c 3 | timeCreated: 1471196349 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/SmootherControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa489924348944ae0a643f341085edd3 3 | timeCreated: 1471231413 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/TextFieldList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26d9ebf15fbb74732a06602c84474b51 3 | timeCreated: 1471232169 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/HeatmapRendererInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61597699cb653465786a93e272bef2fa 3 | timeCreated: 1438296107 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Data Collection/HeatmapSender.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 334944594a826499d8df0f639515cca4 3 | timeCreated: 1511216740 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models/DateTimeUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d7a4f98487b14ea0adfacc0eeca3639 3 | timeCreated: 1464232099 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models/HeatmapViewModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dccd48c0fb03a4ce3bfed4cec201164d 3 | timeCreated: 1470590513 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/GradientUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb8136157adfc4e909e76427850e6adc 3 | timeCreated: 1472864727 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/VideoRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06bdd9ac563ed438f9e9bdc191fd0f43 3 | timeCreated: 1510103102 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/HeatmapClipNameList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07d2af98bf0104a96a2459bc72894088 3 | timeCreated: 1511757496 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/AggregationMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15515b3140cec4ea7b0c6348978fe058 3 | timeCreated: 1461623559 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/GradientContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fddd7b3aa09845f38cee8786e39337d 3 | timeCreated: 1460506453 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/IHeatmapRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96e0f8efa1daa4ae8be69fa60bead724 3 | timeCreated: 1437175417 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Services/HeatmapAggregator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0d39c22d04f7414194b9a109ca28f00 3 | timeCreated: 1439059470 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Config/UnityAnalyticsEventType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 440389feffcb2451697647ef5086b4cf 3 | timeCreated: 1438818367 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Controllers/HeatmapDataProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7534739c6188a4755a42197820728221 3 | timeCreated: 1470595871 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Config/UnityAnalyticsEventType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityAnalytics360VideoHeatmap 4 | { 5 | // Note variance from C# code standard. We need these to match consts on server. 6 | public enum UnityAnalyticsEventType 7 | { 8 | appStart, 9 | appRunning, 10 | custom, 11 | transaction, 12 | userInfo, 13 | deviceInfo, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/HeatmapClipNameList.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace UnityAnalytics360VideoHeatmap 5 | { 6 | public class HeatmapClipNameList : MonoBehaviour 7 | { 8 | public delegate void ChangeHandler(string[] array); 9 | 10 | public static void ListGroup(string[] array, ChangeHandler change) 11 | { 12 | if (array == null) 13 | { 14 | return; 15 | } 16 | 17 | change(array); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/Hotspots.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a146546dfd6f14cf7947ab9ea67ec9c5 3 | timeCreated: 1512760177 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - _player: {instanceID: 0} 10 | - shader: {fileID: 7200000, guid: ff969f478115f472980c928bc942fa56, type: 3} 11 | - gradient: {instanceID: 0} 12 | - renderTexture: {instanceID: 0} 13 | - videoMaterial: {instanceID: 0} 14 | - composite: {instanceID: 0} 15 | executionOrder: 0 16 | icon: {instanceID: 0} 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib/Ionic.Zlib.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abd1f95c0baf24d4ba1711633693c8b0 3 | timeCreated: 1463523671 4 | licenseType: Pro 5 | PluginImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | - first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | - first: 19 | Editor: Editor 20 | second: 21 | enabled: 1 22 | settings: 23 | DefaultValueInitialized: true 24 | - first: 25 | Windows Store Apps: WindowsStoreApps 26 | second: 27 | enabled: 0 28 | settings: 29 | CPU: AnyCPU 30 | userData: 31 | assetBundleName: 32 | assetBundleVariant: 33 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Models/HeatPoint.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Heat point. 3 | /// 4 | /// This struct is used by the rendering system to define each individual 5 | /// heat map datum. 6 | 7 | using System; 8 | using UnityEngine; 9 | 10 | namespace UnityAnalytics360VideoHeatmap 11 | { 12 | public struct HeatPoint : IEquatable 13 | { 14 | public Vector3 position; 15 | public Vector3 rotation; 16 | public int density; 17 | public float time; 18 | 19 | public bool Equals(HeatPoint other) 20 | { 21 | if(position == other.position 22 | && rotation == other.rotation 23 | && density == other.density 24 | && time == other.time) 25 | { 26 | return true; 27 | } 28 | return false; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Unity Technologies 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 | -------------------------------------------------------------------------------- /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: 7 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_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/GradientContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityAnalytics360VideoHeatmap 5 | { 6 | public class GradientContainer : MonoBehaviour 7 | { 8 | public Gradient ColorGradient; 9 | 10 | static Color s_HighDensityColor = new Color(1f, 0, 0, 1f); 11 | static Color s_MediumDensityColor = new Color(1f, 1f, 0, 1f); 12 | static Color s_LowDensityColor = new Color(0, 1f, 1f, 1f); 13 | 14 | 15 | public GradientContainer() 16 | { 17 | ColorGradient = new Gradient(); 18 | GradientColorKey[] colorKeys = new GradientColorKey[3]; 19 | colorKeys[0].color = s_LowDensityColor; 20 | colorKeys[0].time = 0f; 21 | colorKeys[1].color = s_MediumDensityColor; 22 | colorKeys[1].time = 0.1f; 23 | colorKeys[2].color = s_HighDensityColor; 24 | colorKeys[2].time = 1f; 25 | 26 | GradientAlphaKey[] alphaKeys = new GradientAlphaKey[3]; 27 | alphaKeys[0].alpha = .2f; 28 | alphaKeys[0].time = 0f; 29 | alphaKeys[1].alpha = .5f; 30 | alphaKeys[1].time = .1f; 31 | alphaKeys[2].alpha = 1f; 32 | alphaKeys[2].time = 1f; 33 | 34 | ColorGradient.SetKeys(colorKeys, alphaKeys); 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /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_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/FlattenedHeatmapView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace UnityAnalytics360VideoHeatmap 7 | { 8 | public class FlattenedHeatmapView : EditorWindow 9 | { 10 | RenderTexture _composite; 11 | 12 | [MenuItem("Window/Unity Analytics/360 Video Heatmaps/Flattened Heatmap View")] 13 | static void ShowPreviewWindow() 14 | { 15 | EditorWindow.GetWindow(typeof(FlattenedHeatmapView)); 16 | } 17 | 18 | void OnGUI() 19 | { 20 | if (_composite == null) 21 | { 22 | var go = GameObject.Find("UnityAnalytics__Heatmap"); 23 | if (go) 24 | { 25 | var heatmap = go.GetComponent(); 26 | if (heatmap) 27 | { 28 | _composite = heatmap.composite; 29 | } 30 | } 31 | } 32 | 33 | float x = 0; 34 | float y = 0; 35 | float w = position.width; 36 | float h = 0; 37 | 38 | if (_composite != null) 39 | { 40 | h = _composite.height * w / _composite.width; 41 | EditorGUI.DrawPreviewTexture(new Rect(x, y, w, h), _composite); 42 | } 43 | 44 | y += h; 45 | } 46 | 47 | void OnInspectorUpdate() 48 | { 49 | Repaint(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Heatmaps.mdproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Default 5 | AnyCPU 6 | GenericProject 7 | {CB6F8974-2395-4B9E-B8AE-0705AC6509F2} 8 | 9 | 10 | .\ 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Shaders/heatmap.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel CSVRHeatMap 3 | 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | RWTexture2D _result; 7 | RWStructuredBuffer _points; 8 | RWStructuredBuffer _properties; 9 | int _numPoints; 10 | float _decay; 11 | 12 | RWTexture2D _composite; 13 | RWTexture2D _gradient; 14 | 15 | Texture2D _video; 16 | SamplerState sampler_video; 17 | 18 | [numthreads(8,8,1)] 19 | void CSVRHeatMap (uint3 id : SV_DispatchThreadID) 20 | { 21 | float heat = _result[id.xy]; 22 | heat *= _decay; 23 | 24 | float width, height; 25 | _result.GetDimensions(width, height); 26 | 27 | half h = 0; 28 | for (int i = 0; i < _numPoints; ++i) 29 | { 30 | half dx = abs(id.x - _points[i].x); 31 | half dy = id.y - _points[i].y; 32 | 33 | if (dx > 0.5 * width) 34 | dx = width - dx; 35 | 36 | half dist = sqrt(dx*dx + dy*dy); 37 | 38 | half radius = _properties[i].x; 39 | half intensity = _properties[i].y; 40 | 41 | half hi = 1 - saturate(dist / radius); 42 | h += hi * intensity; 43 | } 44 | heat = saturate(heat + saturate(h)); 45 | _result[id.xy] = heat; 46 | 47 | // handle composite texture 48 | float gw, gh; 49 | _gradient.GetDimensions(gw, gh); 50 | float4 grad = _gradient[uint2(0.99 * heat * gw, 0.99 * heat * gh)]; 51 | float4 rgba = _video.SampleLevel(sampler_video, float2((float)id.x / (float)width, (float)id.y / (float)height), 0); 52 | rgba.xyz = (1 - grad.w) * rgba.xyz + rgba.xyz * grad.xyz * grad.w; 53 | _composite[id.xy] = rgba; 54 | } 55 | -------------------------------------------------------------------------------- /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 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/IHeatmapRenderer.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Interface for a Heat Map renderer 3 | /// 4 | /// If you choose to create your own custom renderer, we 5 | /// recommend abiding by this interface. 6 | 7 | using System; 8 | using System.Collections.Generic; 9 | using UnityEngine; 10 | 11 | namespace UnityAnalytics360VideoHeatmap 12 | { 13 | public interface IHeatmapRenderer 14 | { 15 | /// 16 | /// Sets the heatmap data 17 | /// 18 | /// An array of HeatPoints defining the map and its density. 19 | /// Density value considered to be 100%. 20 | void UpdatePointData(Dictionary data, float maxDensity); 21 | 22 | /// 23 | /// Updates the time limits. 24 | /// 25 | /// Allows the user to limit the display of data by time within the game. 26 | /// Start time. 27 | /// End time. 28 | void UpdateTimeLimits(float startTime, float endTime); 29 | 30 | /// 31 | /// Gating value to prevent the renderer from rendering. 32 | /// 33 | /// true if allow render; otherwise, false. 34 | bool allowRender{ get; set; } 35 | 36 | /// 37 | /// The number of points currently displayed. 38 | /// 39 | /// Count of currently displayed points 40 | int currentPoints{ get; } 41 | 42 | /// 43 | /// The number of points in the current dataset. 44 | /// 45 | /// Count of all points in the current set 46 | int totalPoints{ get; } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/TextFieldList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace UnityAnalytics360VideoHeatmap 7 | { 8 | public class AnalyticsTextFieldList 9 | { 10 | private static GUIContent s_AddFieldContent = new GUIContent("+", "Add field"); 11 | private static GUILayoutOption s_ButtonWidth = GUILayout.MaxWidth(20f); 12 | 13 | 14 | public delegate void TextFieldListChangeHandler(List list); 15 | 16 | public static List TextFieldList (List m_ArbitraryFields, TextFieldListChangeHandler change) 17 | { 18 | 19 | if (m_ArbitraryFields.Count == 0) 20 | { 21 | m_ArbitraryFields.Add("Field name"); 22 | } 23 | 24 | EditorGUI.BeginChangeCheck(); 25 | 26 | for (var a = 0; a < m_ArbitraryFields.Count; a++) 27 | { 28 | using (new GUILayout.HorizontalScope()) 29 | { 30 | m_ArbitraryFields[a] = EditorGUILayout.TextField(m_ArbitraryFields[a]); 31 | 32 | EditorGUI.BeginDisabledGroup(m_ArbitraryFields.Count == 1); 33 | if (GUILayout.Button("-", s_ButtonWidth)) 34 | { 35 | m_ArbitraryFields.RemoveAt(a); 36 | break; 37 | } 38 | EditorGUI.EndDisabledGroup(); 39 | 40 | if (a == m_ArbitraryFields.Count-1 && GUILayout.Button(s_AddFieldContent, s_ButtonWidth)) 41 | { 42 | m_ArbitraryFields.Add("Field name"); 43 | } 44 | } 45 | } 46 | 47 | if (EditorGUI.EndChangeCheck()) 48 | { 49 | change(m_ArbitraryFields); 50 | } 51 | 52 | return m_ArbitraryFields; 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/ListGroup.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Visual component for managing a list of popup lists. 3 | /// 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using UnityEditor; 8 | using UnityEngine; 9 | 10 | namespace UnityAnalytics360VideoHeatmap 11 | { 12 | public class AnalyticsListGroup 13 | { 14 | 15 | public delegate void ChangeHandler(List value); 16 | 17 | 18 | public static List ListGroup(Listvalue, List> lists, ChangeHandler change) 19 | { 20 | ////Debug.Log(value.ToString()); 21 | ////Debug.Log(lists.ToString()); 22 | if (lists == null || value == null) 23 | { 24 | return null; 25 | } 26 | 27 | EditorGUI.BeginChangeCheck(); 28 | 29 | if (value.Count > 1) 30 | { 31 | using (new EditorGUILayout.HorizontalScope()) 32 | { 33 | EditorGUILayout.LabelField("Data Set Options", GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 34 | 35 | using (new EditorGUILayout.VerticalScope()) 36 | { 37 | for (int a = 0; a < value.Count; a++) 38 | { 39 | ////Debug.Log(value[a]); 40 | ////Debug.Log(lists); 41 | if (lists[a].Contains("Heatmap.PlayerLook")) 42 | { 43 | continue; 44 | } 45 | 46 | var listArray = lists[a].ToArray(); 47 | value[a] = EditorGUILayout.Popup(value[a], listArray); 48 | } 49 | } 50 | } 51 | } 52 | 53 | if (EditorGUI.EndChangeCheck()) 54 | { 55 | change(value); 56 | } 57 | return value; 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/GradientUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityAnalytics360VideoHeatmap 5 | { 6 | public class GradientUtils 7 | { 8 | public static Color PickGradientColor(Gradient gradient, float percent) 9 | { 10 | return (gradient == null) ? Color.magenta : gradient.Evaluate(percent); 11 | } 12 | 13 | public static bool CompareGradients(Gradient gradient, Gradient otherGradient) 14 | { 15 | if (gradient == null || otherGradient == null) 16 | { 17 | return false; 18 | } 19 | 20 | // Compare the lengths before checking actual colors and alpha components 21 | if (gradient.colorKeys.Length != otherGradient.colorKeys.Length || gradient.alphaKeys.Length != otherGradient.alphaKeys.Length) { 22 | return false; 23 | } 24 | 25 | // Compare all the colors 26 | for (int a = 0; a < gradient.colorKeys.Length; a++) 27 | { 28 | // Test if the color and alpha is the same 29 | GradientColorKey key = gradient.colorKeys[a]; 30 | GradientColorKey otherKey = otherGradient.colorKeys[a]; 31 | if (key.color != otherKey.color || key.time != otherKey.time) { 32 | return false; 33 | } 34 | } 35 | 36 | // Compare all the alphas 37 | for (int a = 0; a < gradient.alphaKeys.Length; a++) 38 | { 39 | // Test if the color and alpha is the same 40 | GradientAlphaKey key = gradient.alphaKeys[a]; 41 | GradientAlphaKey otherKey = otherGradient.alphaKeys[a]; 42 | if (key.alpha != otherKey.alpha || key.time != otherKey.time) 43 | { 44 | return false; 45 | } 46 | } 47 | 48 | // They're the same 49 | return true; 50 | } 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_failed.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d821bcec251614db69b44f63017fb25d 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_running.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a50bbedf15844489ba5279bc4405f663 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5101704bcea19466ea3d7aa5e596f026 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_success.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35f6382bad4c94fe98f3bae4c615f790 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_heatmapper.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 970254eaca62b48c19ba2b8a37e4be59 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7906aa478f2864ef797fea65323bdb02 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_none_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c043bd35ad4e247d8b78af8af7b7b540 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a10c22a4b3ba47eba457543b2797ccb 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_number_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbdd0a3bb4a5d49a883f6dac743718f7 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c813ef568cfc54e89975e3cba1865aee 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_pause_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32974842b7e2246a39105589ec930963 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 999e7e026af4f4b5a8a3c6d5880bbabc 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_play_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8820cc7d4dcda4e05aabae34844b5d04 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_rwd_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 929eceb046d7843acbd78dfd41913446 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c19831b708ada4c39b5e9a118c3e72be 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Resources/unity_analytics_heatmaps_union_light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39ed6f06956bf4774809defcff5e0898 3 | timeCreated: 1513116735 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | physicsShape: [] 74 | spritePackingTag: 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Common/IonicGZip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.IO; 4 | using System.Text; 5 | using Ionic.Zlib; 6 | using System.Collections.Generic; 7 | 8 | 9 | public class IonicGZip 10 | { 11 | 12 | public static string[] DecompressFiles(string[] args) 13 | { 14 | var results = new List(); 15 | foreach(var fileName in args) 16 | { 17 | string response = DecompressFile(fileName); 18 | results.Add(response); 19 | } 20 | return results.ToArray(); 21 | } 22 | 23 | public static string DecompressFile(string fileName) 24 | { 25 | byte[] file = File.ReadAllBytes(fileName); 26 | byte[] decompressed = Decompress(file); 27 | return Encoding.UTF8.GetString(decompressed); 28 | } 29 | 30 | static byte[] Decompress(byte[] gzip) 31 | { 32 | // Create a GZIP stream with decompression mode. 33 | // ... Then create a buffer and write into while reading from the GZIP stream. 34 | using (GZipStream stream = new GZipStream(new MemoryStream(gzip), CompressionMode.Decompress)) 35 | { 36 | const int size = 4096; 37 | byte[] buffer = new byte[size]; 38 | using (MemoryStream memory = new MemoryStream()) 39 | { 40 | int count = 0; 41 | do 42 | { 43 | count = stream.Read(buffer, 0, size); 44 | if (count > 0) 45 | { 46 | memory.Write(buffer, 0, count); 47 | } 48 | } 49 | while (count > 0); 50 | return memory.ToArray(); 51 | } 52 | } 53 | } 54 | 55 | public static void CompressAndSave(string savePath, string data) 56 | { 57 | // Write string to temporary file. 58 | string temp = Path.GetTempFileName(); 59 | File.WriteAllText(temp, data); 60 | 61 | // Read file into byte array buffer. 62 | byte[] b; 63 | using (FileStream f = new FileStream(temp, FileMode.Open)) 64 | { 65 | b = new byte[f.Length]; 66 | f.Read(b, 0, (int)f.Length); 67 | } 68 | 69 | // Use GZipStream to write compressed bytes to target file. 70 | using (FileStream f2 = new FileStream(savePath, FileMode.Create)) 71 | { 72 | using (GZipStream gz = new GZipStream(f2, CompressionMode.Compress, false)) 73 | { 74 | gz.Write(b, 0, b.Length); 75 | } 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/SmootherControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | using System.Linq; 5 | 6 | namespace UnityAnalytics360VideoHeatmap 7 | { 8 | public class AnalyticsSmootherControl 9 | { 10 | private static GUIContent[] s_SmootherOptionsContent; 11 | 12 | private static Texture2D darkSkinUnionIcon = Resources.Load("unity_analytics_heatmaps_union_dark") as Texture2D; 13 | private static Texture2D darkSkinNumberIcon = Resources.Load("unity_analytics_heatmaps_number_dark") as Texture2D; 14 | private static Texture2D darkSkinNoneIcon = Resources.Load("unity_analytics_heatmaps_none_dark") as Texture2D; 15 | 16 | private static Texture2D lightSkinUnionIcon = Resources.Load("unity_analytics_heatmaps_union_light") as Texture2D; 17 | private static Texture2D lightSkinNumberIcon = Resources.Load("unity_analytics_heatmaps_number_light") as Texture2D; 18 | private static Texture2D lightSkinNoneIcon = Resources.Load("unity_analytics_heatmaps_none_light") as Texture2D; 19 | 20 | public delegate void ChangeHandler(int toggler, float value); 21 | 22 | public static void SmootherControl (int toggler, float value, 23 | string label, string tooltip, ChangeHandler change, 24 | int endIndex = -1) 25 | { 26 | if (s_SmootherOptionsContent == null) 27 | { 28 | var unionIcon = lightSkinUnionIcon; 29 | var smoothIcon = lightSkinNumberIcon; 30 | var noneIcon = lightSkinNoneIcon; 31 | if (EditorGUIUtility.isProSkin) 32 | { 33 | unionIcon = darkSkinUnionIcon; 34 | smoothIcon = darkSkinNumberIcon; 35 | noneIcon = darkSkinNoneIcon; 36 | } 37 | 38 | s_SmootherOptionsContent = new GUIContent[] { 39 | new GUIContent(smoothIcon, "Smooth to value"), 40 | new GUIContent(noneIcon, "No smoothing"), 41 | new GUIContent(unionIcon, "Unify all") 42 | }; 43 | } 44 | 45 | using (new EditorGUILayout.VerticalScope()) 46 | { 47 | var options = endIndex == -1 ? s_SmootherOptionsContent : 48 | s_SmootherOptionsContent.Take(endIndex).ToArray(); 49 | 50 | EditorGUI.BeginChangeCheck(); 51 | int oldToggle = toggler; 52 | toggler = GUILayout.Toolbar(toggler, options, GUILayout.MaxWidth(100)); 53 | 54 | float lw = EditorGUIUtility.labelWidth; 55 | EditorGUIUtility.labelWidth = 50; 56 | float fw = EditorGUIUtility.fieldWidth; 57 | EditorGUIUtility.fieldWidth = 20; 58 | EditorGUI.BeginDisabledGroup(toggler != HeatmapDataProcessor.SMOOTH_VALUE); 59 | value = EditorGUILayout.FloatField(new GUIContent(label, tooltip), value); 60 | value = Mathf.Max(0, value); 61 | EditorGUI.EndDisabledGroup(); 62 | EditorGUIUtility.labelWidth = lw; 63 | EditorGUIUtility.fieldWidth = fw; 64 | 65 | if (EditorGUI.EndChangeCheck() || oldToggle != toggler) 66 | { 67 | change(toggler, value); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Data Collection/HeatmapSender.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Send Heatmap event based on VideoPlayer. 3 | /// 4 | 5 | using System.Collections; 6 | using System.Collections.Generic; 7 | using UnityEngine; 8 | using UnityEngine.Video; 9 | using UnityAnalytics360VideoHeatmap; 10 | 11 | namespace UnityAnalytics360VideoHeatmap 12 | { 13 | public class HeatmapSender : MonoBehaviour 14 | { 15 | public VideoPlayer videoPlayer; 16 | 17 | private int k_currentSendEventRatio; 18 | private bool k_eventSender; 19 | 20 | private int k_eventLimit = 5000; 21 | private float k_eventInterval = 1.0f; 22 | private WaitForSeconds k_waitForSecond; 23 | private Dictionary k_clipDict; 24 | 25 | void Start() 26 | { 27 | if (videoPlayer == null) 28 | { 29 | videoPlayer = FindObjectOfType(); 30 | } 31 | 32 | EnsureRatio(); 33 | k_eventInterval = DetermineEventInterval(k_eventLimit); 34 | k_waitForSecond = new WaitForSeconds(k_eventInterval); 35 | 36 | #if UNITY_EDITOR 37 | StartCoroutine(SendHeatmapEvent()); 38 | #else 39 | if (k_eventSender) 40 | StartCoroutine(SendHeatmapEvent()); 41 | #endif 42 | } 43 | 44 | /// 45 | /// Make sure the ratio is most updated. 46 | /// 47 | private void EnsureRatio() 48 | { 49 | k_eventSender = PlayerPrefs.GetInt("_360VideoHeatMap_EventSender", 0) == 0 ? true : false; 50 | k_currentSendEventRatio = PlayerPrefs.GetInt("_360VideoHeatMap_EventRatio", 10); 51 | 52 | int m_newSendEventRatio = RemoteSettings.GetInt("heatmaps_sample_rate", 10); 53 | 54 | // If the ratio has changed or the role has not been assigned before, reassign the user. 55 | if (!PlayerPrefs.HasKey("_360VideoHeatMap_EventSender") || k_currentSendEventRatio != m_newSendEventRatio) 56 | { 57 | k_currentSendEventRatio = m_newSendEventRatio; 58 | EnsureUserRole(); 59 | PlayerPrefs.SetInt("_360VideoHeatMap_EventSender", k_eventSender == true ? 0 : 1); 60 | PlayerPrefs.SetInt("_360VideoHeatMap_EventRatio", k_currentSendEventRatio); 61 | } 62 | } 63 | 64 | /// 65 | /// Check if the user is allowed to send event based on the RemoteSetting key. 66 | /// 67 | private void EnsureUserRole() 68 | { 69 | if (k_currentSendEventRatio >= 100) 70 | { 71 | k_eventSender = true; 72 | return; 73 | } 74 | 75 | if (k_currentSendEventRatio <= 0) 76 | { 77 | k_eventSender = false; 78 | return; 79 | } 80 | 81 | int m_random = Random.Range(0, 100); 82 | if (m_random <= k_currentSendEventRatio) 83 | { 84 | k_eventSender = true; 85 | return; 86 | } 87 | 88 | k_eventSender = false; 89 | } 90 | 91 | /// 92 | /// Send the event only when VideoPlayer, clip exist and the video is playing. 93 | /// 94 | IEnumerator SendHeatmapEvent() 95 | { 96 | if (k_clipDict == null) 97 | k_clipDict = new Dictionary(); 98 | 99 | while (true) 100 | { 101 | if (videoPlayer != null && videoPlayer.clip != null && videoPlayer.isPlaying) 102 | { 103 | float m_standardTime = videoPlayer.frame / (float)videoPlayer.frameCount; 104 | k_clipDict["clipName"] = videoPlayer.clip.name; 105 | HeatmapEvent.Send("PlayerLook", this.transform, m_standardTime, k_clipDict); 106 | } 107 | 108 | yield return k_waitForSecond; 109 | } 110 | } 111 | 112 | /// 113 | /// Determine what's the time interval for event sending to not exceed the event limit. 114 | /// 115 | float DetermineEventInterval(int eventLimit) 116 | { 117 | float m_minimumInterval = 3600 / (float)eventLimit; 118 | return Mathf.Ceil(m_minimumInterval); 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/AggregationInspector.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Inspector for the Aggregation portion of the Heatmapper. 3 | /// 4 | 5 | using System; 6 | using System.Collections; 7 | using System.Collections.Generic; 8 | using System.IO; 9 | using UnityEditor; 10 | using UnityEngine; 11 | using UnityAnalytics; 12 | using System.Linq; 13 | 14 | namespace UnityAnalytics360VideoHeatmap 15 | { 16 | public class AggregationInspector 17 | { 18 | const string k_UseCustomDataPathKey = "UnityAnalyticsHeatmapUsePersistentDataPathKey"; 19 | 20 | string m_DataPath = "./"; 21 | 22 | HeatmapDataProcessor m_Processor; 23 | private GUIContent m_DataPathContent = new GUIContent("Input Path", "Where to retrieve data (defaults to Application.persistentDataPath"); 24 | private GUIContent m_DatesContent = new GUIContent("Dates", "ISO-8601 datetimes (YYYY-MM-DD)"); 25 | 26 | string m_StartDate = ""; 27 | string m_EndDate = ""; 28 | bool m_ValidDates = true; 29 | 30 | GUIStyle m_ValidDateStyle; 31 | GUIStyle m_InvalidDateStyle; 32 | 33 | const int k_FetchInitValue = 30; 34 | 35 | public AggregationInspector(HeatmapDataProcessor processor) 36 | { 37 | m_Processor = processor; 38 | } 39 | 40 | public static AggregationInspector Init(HeatmapDataProcessor processor) 41 | { 42 | return new AggregationInspector(processor); 43 | } 44 | 45 | public void OnEnable() 46 | { 47 | // Restore cached paths 48 | m_DataPath = m_Processor.m_RawDataPath; 49 | m_EndDate = m_Processor.m_EndDate; 50 | m_StartDate = m_Processor.m_StartDate; 51 | } 52 | 53 | public void OnGUI() 54 | { 55 | if (m_ValidDateStyle == null) 56 | { 57 | m_ValidDateStyle = new GUIStyle("button"); 58 | m_InvalidDateStyle = new GUIStyle("button"); 59 | m_InvalidDateStyle.normal.textColor = Color.red; 60 | } 61 | 62 | using (new GUILayout.VerticalScope()) 63 | { 64 | EditorGUILayout.LabelField("Data", EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 65 | 66 | using (new GUILayout.HorizontalScope()) 67 | { 68 | EditorGUILayout.LabelField(m_DataPathContent, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 69 | m_DataPath = Application.dataPath; 70 | UseCustomDataPathChange(true); 71 | EditorGUILayout.SelectableLabel(m_DataPath + "/RawDataFolder", EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight)); 72 | } 73 | 74 | using (new GUILayout.HorizontalScope()) 75 | { 76 | EditorGUILayout.LabelField(m_DatesContent, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 77 | 78 | GUIStyle dateFieldStyle = m_ValidDates ? m_ValidDateStyle : m_InvalidDateStyle; 79 | dateFieldStyle.padding = new RectOffset(0, 0, ((int)EditorGUIUtility.singleLineHeight / 3), 0); 80 | m_StartDate = AnalyticsDatePicker.DatePicker(m_StartDate, dateFieldStyle, StartDateChange, DateFailure, DateValidationStart); 81 | m_EndDate = AnalyticsDatePicker.DatePicker(m_EndDate, dateFieldStyle, EndDateChange, DateFailure, DateValidationEnd); 82 | } 83 | 84 | EditorGUILayout.Space(); 85 | } 86 | } 87 | 88 | void UseCustomDataPathChange(bool value) 89 | { 90 | EditorPrefs.SetBool(k_UseCustomDataPathKey, value); 91 | DataPathChange(m_DataPath); 92 | } 93 | 94 | void DataPathChange(string value) 95 | { 96 | if (string.IsNullOrEmpty(value)) 97 | { 98 | m_DataPath = Application.persistentDataPath; 99 | } 100 | m_Processor.m_RawDataPath = value; 101 | } 102 | 103 | void StartDateChange(string value) 104 | { 105 | m_ValidDates = true; 106 | m_Processor.m_StartDate = value; 107 | HeatmapViewModel.startDate = value; 108 | } 109 | 110 | void EndDateChange(string value) 111 | { 112 | m_ValidDates = true; 113 | m_Processor.m_EndDate = value; 114 | HeatmapViewModel.endDate = value; 115 | } 116 | 117 | void DateFailure() 118 | { 119 | m_ValidDates = false; 120 | } 121 | 122 | bool DateValidationStart(string value) 123 | { 124 | return DateValidation(value, m_EndDate); 125 | } 126 | 127 | bool DateValidationEnd(string value) 128 | { 129 | return DateValidation(m_StartDate, value); 130 | } 131 | 132 | bool DateValidation(string start, string end) 133 | { 134 | DateTime startDate; 135 | DateTime endDate; 136 | try 137 | { 138 | startDate = DateTime.Parse(start); 139 | endDate = DateTime.Parse(end); 140 | } 141 | catch 142 | { 143 | return false; 144 | } 145 | // Midnight tonight 146 | var today = DateTime.Today.AddDays(1).ToUniversalTime(); 147 | return startDate < endDate && endDate <= today; 148 | } 149 | } 150 | } -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/VideoRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System; 5 | using UnityEngine; 6 | using UnityEngine.Video; 7 | using UnityEngine.Analytics; 8 | using UnityAnalytics360VideoHeatmap; 9 | 10 | [RequireComponent(typeof(Hotspots))] 11 | [ExecuteInEditMode] 12 | public class VideoRenderer : MonoBehaviour, IHeatmapRenderer { 13 | Dictionary m_Data; 14 | 15 | float m_StartTime = 0f; 16 | float m_EndTime = 1.0f; 17 | 18 | [Range(1, 50)] 19 | public float minRadius = 35; 20 | [Range(1, 50)] 21 | public float maxRadius; 22 | 23 | [Range(0, 1)] 24 | public float decay; 25 | 26 | Hotspots hotspots = null; 27 | 28 | // Default, but allow user to define 29 | // governs fidelity of heatmap render - needs to be same asepct ratio as video 30 | public int heatMapWidth 31 | { 32 | get { return hotspots.heatMapWidth; } 33 | set { hotspots.heatMapWidth = value; } 34 | } 35 | public int heatMapHeight 36 | { 37 | get { return hotspots.heatMapHeight; } 38 | set { hotspots.heatMapHeight = value; } 39 | } 40 | 41 | //max number of points that can be displayed 42 | public int numPoints 43 | { 44 | get { return hotspots.numPoints; } 45 | set { hotspots.numPoints = value; } 46 | } 47 | 48 | //can be private 49 | //public Texture2D gradient; 50 | //number of colors in gradient - more is smoother, less you get more banding 51 | public int gradientSize 52 | { 53 | get { return hotspots.gradientSize; } 54 | set { hotspots.gradientSize = value; } 55 | } 56 | 57 | //dev needs to set to be same as one in video 58 | public Material videoMaterial 59 | { 60 | get { return hotspots.videoMaterial; } 61 | set 62 | { 63 | if(hotspots.videoMaterial == null || hotspots.videoMaterial != value) 64 | { 65 | hotspots.videoMaterial = value; 66 | hotspots.Init(true); 67 | } 68 | } 69 | } 70 | 71 | // can be exposed a la heatmap UI 72 | public Gradient _gradient 73 | { 74 | get { return hotspots._gradient; } 75 | set { hotspots._gradient = value; } 76 | } 77 | 78 | void OnEnable() { 79 | allowRender = true; 80 | hotspots = gameObject.GetComponent(); 81 | HeatmapViewModel.CurrentHeatpointsUpdated += RenderHeatmap; 82 | } 83 | 84 | /// 85 | /// Sets the heatmap data 86 | /// 87 | /// An array of HeatPoints defining the map and its density. 88 | /// Density value considered to be 100%. 89 | public void UpdatePointData(Dictionary data, float maxDensity) 90 | { 91 | m_Data = data; 92 | } 93 | 94 | /// 95 | /// Updates the time limits. 96 | /// 97 | /// Allows the user to limit the display of data by time within the game. 98 | /// Start time. 99 | /// End time. 100 | public void UpdateTimeLimits(float startTime, float endTime) 101 | { 102 | if (m_StartTime != startTime || m_EndTime != endTime) 103 | { 104 | m_StartTime = startTime; 105 | m_EndTime = endTime; 106 | } 107 | } 108 | 109 | /// 110 | /// Renders the heat map. 111 | /// 112 | void RenderHeatmap(List listOfHeatpoints) 113 | { 114 | List otherPoints = new List(); 115 | 116 | foreach(HeatPoint[] heatpointArr in listOfHeatpoints) 117 | { 118 | for (int a = 0; a < heatpointArr.Length; a++) 119 | { 120 | // FILTER FOR TIME & POSITION 121 | var pt = heatpointArr[a]; 122 | otherPoints.Add(pt); 123 | } 124 | } 125 | 126 | HeatPoint[] filteredData = otherPoints.ToArray(); 127 | 128 | hotspots.minRadius = minRadius; 129 | hotspots.maxRadius = maxRadius; 130 | hotspots.decay = decay; 131 | hotspots.SetPoints(filteredData); 132 | 133 | totalPoints = listOfHeatpoints.Count; 134 | } 135 | 136 | int GetTotalPoints () 137 | { 138 | int retTotal = 0; 139 | 140 | foreach (KeyValuePair entry in m_Data) 141 | { 142 | retTotal += entry.Value.Length; 143 | } 144 | 145 | return retTotal; 146 | } 147 | 148 | bool FilterPoint(HeatPoint pt) 149 | { 150 | if (pt.time < m_StartTime || pt.time > m_EndTime) 151 | { 152 | return false; 153 | } 154 | else 155 | return true; 156 | } 157 | 158 | /// 159 | /// Gating value to prevent the renderer from rendering. 160 | /// 161 | /// true if allow render; otherwise, false. 162 | public bool allowRender { get; set; } 163 | 164 | /// 165 | /// The number of points currently displayed. 166 | /// 167 | /// Count of currently displayed points 168 | public int currentPoints { get; set; } 169 | 170 | /// 171 | /// The number of points in the current dataset. 172 | /// 173 | /// Count of all points in the current set 174 | public int totalPoints { get; set; } 175 | 176 | bool hasData() 177 | { 178 | return m_Data != null && m_Data.Count > 0; 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /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 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Heatmapper.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Heatmapper inspector. 3 | /// 4 | /// This code drives the Heatmapper inspector 5 | /// The HeatmapDataParser handles loading and parsing the data. 6 | /// The HeatmapRendererInspector speaks to the Renderer to achieve a desired look. 7 | 8 | using System.Collections.Generic; 9 | using UnityAnalytics360VideoHeatmap; 10 | using UnityEditor; 11 | using UnityEngine; 12 | using UnityEngine.Video; 13 | using System; 14 | 15 | namespace UnityAnalytics360VideoHeatmap 16 | { 17 | public class Heatmapper : EditorWindow 18 | { 19 | [MenuItem("Window/Unity Analytics/360 Video Heatmaps/Heatmapper")] 20 | static void HeatmapperMenuOption() 21 | { 22 | EditorWindow.GetWindow(typeof(Heatmapper)); 23 | } 24 | 25 | static Texture m_HeatmapperIconTexture; 26 | 27 | // Views 28 | AggregationInspector m_AggregationView; 29 | HeatmapRendererInspector m_RenderView; 30 | 31 | // Data handler 32 | HeatmapDataProcessor m_Processor; 33 | 34 | //ViewModel 35 | HeatmapViewModel viewModel; 36 | 37 | GameObject m_HeatMapInstance; 38 | 39 | Vector2 m_ScrollPosition; 40 | 41 | void OnEnable() 42 | { 43 | EnsureHeatmapInstance(); 44 | viewModel = HeatmapViewModel.instance; 45 | m_Processor = new HeatmapDataProcessor(); 46 | m_Processor.RestoreSettings(); 47 | m_RenderView = HeatmapRendererInspector.Init(this, m_Processor); 48 | m_AggregationView = AggregationInspector.Init(m_Processor); 49 | m_AggregationView.OnEnable(); 50 | m_HeatmapperIconTexture = Resources.Load("unity_analytics_heatmaps_heatmapper") as Texture; 51 | viewModel.ManualOverride(); 52 | 53 | } 54 | 55 | void OnFocus() 56 | { 57 | SystemProcess(); 58 | } 59 | 60 | void OnGUI() 61 | { 62 | if (Event.current.type == EventType.Layout) 63 | { 64 | EnsureHeatmapInstance(); 65 | } 66 | 67 | // Guistyle 68 | GUIStyle m_boxStyle = new GUIStyle("box"); 69 | m_boxStyle.padding = new RectOffset(6, 6, 8, 8); 70 | 71 | EditorGUILayout.Space(); 72 | EditorGUILayout.LabelField(new GUIContent(" 360 Video Heatmapper", m_HeatmapperIconTexture), EditorStyles.boldLabel); 73 | 74 | using (new EditorGUILayout.VerticalScope(m_boxStyle)) 75 | { 76 | using (var scroll = new EditorGUILayout.ScrollViewScope(m_ScrollPosition)) 77 | { 78 | m_ScrollPosition = scroll.scrollPosition; 79 | 80 | using (new EditorGUILayout.VerticalScope()) 81 | { 82 | m_AggregationView.OnGUI(); 83 | } 84 | 85 | using (new EditorGUILayout.HorizontalScope()) 86 | { 87 | //TODO: Clean up 88 | EditorGUILayout.LabelField("Video Player", EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 89 | var temp = EditorGUILayout.ObjectField(HeatmapViewModel.videoPlayer, typeof(VideoPlayer), allowSceneObjects: true) as VideoPlayer; 90 | if(temp != null) 91 | HeatmapViewModel.videoPlayer = temp; 92 | } 93 | 94 | using (new EditorGUILayout.VerticalScope()) 95 | { 96 | if (m_RenderView != null) 97 | { 98 | m_RenderView.OnGUI(); 99 | } 100 | } 101 | } 102 | } 103 | } 104 | 105 | void Update() 106 | { 107 | Repaint(); 108 | } 109 | 110 | void SystemProcess() 111 | { 112 | EnsureHeatmapInstance(); 113 | } 114 | 115 | public void SwapRenderer(Type renderer) 116 | { 117 | AttemptReconnectWithHeatmapInstance(); 118 | CreateHeatmapInstance(renderer); 119 | } 120 | 121 | void EnsureHeatmapInstance() 122 | { 123 | AttemptReconnectWithHeatmapInstance(); 124 | if (m_HeatMapInstance == null) 125 | { 126 | CreateHeatmapInstance(); 127 | } 128 | if (m_RenderView != null) 129 | { 130 | m_RenderView.SetGameObject(m_HeatMapInstance); 131 | } 132 | } 133 | 134 | /// 135 | /// Attempts to reconnect with a heatmap instance. 136 | /// 137 | void AttemptReconnectWithHeatmapInstance() 138 | { 139 | m_HeatMapInstance = GameObject.Find("UnityAnalytics__Heatmap"); 140 | } 141 | 142 | /// 143 | /// Creates the heat map instance. 144 | /// 145 | void CreateHeatmapInstance(bool force = false) 146 | { 147 | if (force) 148 | { 149 | DestroyHeatmapInstance(); 150 | } 151 | CreateHeatmapInstance(typeof(VideoRenderer)); 152 | } 153 | 154 | void CreateHeatmapInstance(Type t) 155 | { 156 | DestroyHeatmapInstance(); 157 | m_HeatMapInstance = new GameObject(); 158 | m_HeatMapInstance.tag = "EditorOnly"; 159 | m_HeatMapInstance.name = "UnityAnalytics__Heatmap"; 160 | m_HeatMapInstance.AddComponent(t); 161 | m_HeatMapInstance.GetComponent().allowRender = true; 162 | } 163 | 164 | void DestroyHeatmapInstance() 165 | { 166 | if (m_HeatMapInstance) 167 | { 168 | m_HeatMapInstance.transform.parent = null; 169 | DestroyImmediate(m_HeatMapInstance); 170 | } 171 | } 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Renderer/Hotspots.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using UnityEngine.Video; 6 | using UnityEngine.Assertions; 7 | using System.IO; 8 | using UnityAnalytics360VideoHeatmap; 9 | using UnityEngine.Analytics; 10 | 11 | [ExecuteInEditMode] 12 | public class Hotspots : MonoBehaviour 13 | { 14 | // Try resource.loadAsset - if not, user has to assign 15 | public ComputeShader shader; 16 | 17 | // Default, but allow user to define 18 | // governs fidelity of heatmap render - needs to be same asepct ratio as video 19 | public int heatMapWidth = 1024; 20 | public int heatMapHeight = 512; 21 | 22 | //max number of points that can be displayed 23 | [Range(1, 2000)] 24 | public int numPoints = 500; 25 | 26 | int currPoints = 0; 27 | 28 | //can be private 29 | public Texture2D gradient; 30 | //number of colors in gradient - more is smoother, less you get more banding 31 | [Range(1, 256)] 32 | public int gradientSize = 16; 33 | 34 | //can be private 35 | public RenderTexture renderTexture; 36 | //dev needs to set to be same as one in video 37 | public Material videoMaterial; 38 | //hidden 39 | public RenderTexture composite; 40 | 41 | //hidden 42 | public Vector2[] points; 43 | public Vector2[] props; 44 | 45 | int kernelHeatmap; 46 | 47 | ComputeBuffer pointsBuffer; 48 | ComputeBuffer propsBuffer; 49 | ComputeBuffer argsBuffer; 50 | 51 | // already have controls from heatmap UI 52 | [Range(1, 50)] 53 | public float minRadius; 54 | [Range(1, 50)] 55 | public float maxRadius; 56 | 57 | [Range(0, 1)] 58 | public float minIntensity = 0; 59 | [Range(0, 1)] 60 | public float maxIntensity = 1; 61 | 62 | [Range(0, 1)] 63 | public float decay = 0.5f; 64 | 65 | // can be exposed a la heatmap UI 66 | public Gradient _gradient = new Gradient(); 67 | 68 | bool inited = false; 69 | 70 | // Use this for initialization 71 | void Start () 72 | { 73 | Init(); 74 | } 75 | 76 | private void OnEnable() 77 | { 78 | Init(); 79 | } 80 | 81 | public void Init(bool force = false) 82 | { 83 | var _player = HeatmapViewModel.videoPlayer; 84 | if (inited == false && _player != null && videoMaterial != null && _gradient != null) 85 | { 86 | inited = true; 87 | 88 | Assert.IsTrue(SystemInfo.supportsComputeShaders); 89 | 90 | if (_player != null) 91 | { 92 | renderTexture = new RenderTexture(heatMapWidth, heatMapHeight, 0, RenderTextureFormat.RFloat); 93 | renderTexture.enableRandomWrite = true; 94 | renderTexture.Create(); 95 | 96 | composite = new RenderTexture(heatMapWidth, heatMapHeight, 0, RenderTextureFormat.ARGBFloat); 97 | composite.enableRandomWrite = true; 98 | composite.Create(); 99 | 100 | //set up the default gradient 101 | SetUpDefaultGradient(); 102 | 103 | gradient = new Texture2D(gradientSize, gradientSize, TextureFormat.RGBA32, false); 104 | gradient.wrapMode = TextureWrapMode.Clamp; 105 | gradient.filterMode = FilterMode.Point; 106 | for (var y = 0; y < gradientSize; ++y) 107 | for (var x = 0; x < gradientSize; ++x) 108 | gradient.SetPixel(x, y, _gradient.Evaluate((float)x / (float)gradientSize)); 109 | gradient.Apply(); 110 | 111 | points = new Vector2[numPoints]; 112 | props = new Vector2[numPoints]; 113 | 114 | shader = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("ff969f478115f472980c928bc942fa56")); 115 | kernelHeatmap = shader.FindKernel("CSVRHeatMap"); 116 | 117 | pointsBuffer = new ComputeBuffer(numPoints, 2 * 4); 118 | propsBuffer = new ComputeBuffer(numPoints, 2 * 4); 119 | argsBuffer = new ComputeBuffer(3, 4); 120 | } 121 | } 122 | } 123 | 124 | public void SetUpDefaultGradient () 125 | { 126 | GradientColorKey[] gck = new GradientColorKey[4]; 127 | gck[0].color = Color.white; 128 | gck[0].time = 0.0f; 129 | gck[1].color = new Color(NormalizeColorVal(56f), NormalizeColorVal(90f), NormalizeColorVal(255f)); 130 | gck[1].time = 0.33f; 131 | gck[2].color = new Color(NormalizeColorVal(255f), NormalizeColorVal(255f), 0); 132 | gck[2].time = 0.66f; 133 | gck[3].color = new Color(NormalizeColorVal(255f), 0, 0); 134 | gck[3].time = 1.0f; 135 | GradientAlphaKey[] gak = new GradientAlphaKey[4]; 136 | gak[0].alpha = 0.0f; 137 | gak[0].time = 0.0f; 138 | gak[1].alpha = 1.0f; 139 | gak[1].time = 0.33f; 140 | gak[2].alpha = 1.0f; 141 | gak[2].time = 0.66f; 142 | gak[3].alpha = 1.0f; 143 | gak[3].time = 1.0f; 144 | _gradient.SetKeys(gck, gak); 145 | } 146 | 147 | float NormalizeColorVal (float val) 148 | { 149 | return val / 255f; 150 | } 151 | 152 | // Update is called once per frame 153 | public void Update () 154 | { 155 | Init(); 156 | } 157 | 158 | public void SetPoints(HeatPoint[] heatPoints) 159 | { 160 | if (heatPoints != null && heatPoints.Length > 0 && renderTexture != null) 161 | { 162 | currPoints = heatPoints.Length; 163 | points = new Vector2[currPoints]; 164 | props = new Vector2[currPoints]; 165 | 166 | for (var i = 0; i < currPoints; ++i) 167 | { 168 | var hp = heatPoints[i]; 169 | points[i] = ProjectEquirectangular(hp.rotation); 170 | props[i] = new Vector2(maxRadius, hp.density); 171 | } 172 | } 173 | RenderHeatmap(); 174 | } 175 | 176 | void RenderHeatmap() 177 | { 178 | if (pointsBuffer == null || propsBuffer == null || renderTexture == null || composite == null || HeatmapViewModel.videoPlayer == null || HeatmapViewModel.videoPlayer.targetTexture == null || gradient == null || videoMaterial == null || gradientSize == 0) 179 | return; 180 | 181 | shader.SetBuffer(kernelHeatmap, "_points", pointsBuffer); 182 | shader.SetBuffer(kernelHeatmap, "_properties", propsBuffer); 183 | shader.SetInt("_numPoints", currPoints); 184 | shader.SetFloat("_decay", decay); 185 | shader.SetTexture(kernelHeatmap, "_result", renderTexture); 186 | shader.SetTexture(kernelHeatmap, "_composite", composite); 187 | shader.SetTexture(kernelHeatmap, "_video", HeatmapViewModel.videoPlayer.targetTexture); 188 | shader.SetTexture(kernelHeatmap, "_gradient", gradient); 189 | 190 | if (videoMaterial != null) 191 | { 192 | videoMaterial.SetTexture("_HeatmapTex", renderTexture); 193 | videoMaterial.SetTexture("_HeatmapGradient", gradient); 194 | } 195 | 196 | 197 | if (points != null && props != null && pointsBuffer != null && propsBuffer != null && argsBuffer != null) 198 | { 199 | pointsBuffer.SetData(points); 200 | propsBuffer.SetData(props); 201 | argsBuffer.SetData(new int[3] { heatMapWidth / 8, heatMapHeight / 8, 1 }); 202 | } 203 | if (argsBuffer != null) 204 | { 205 | shader.DispatchIndirect(kernelHeatmap, argsBuffer, 0); 206 | } 207 | 208 | EditorUtility.SetDirty(this); 209 | } 210 | 211 | Vector2 ProjectEquirectangular(Vector3 coords) 212 | { 213 | Vector3 normalizedCoords = Vector3.Normalize(coords); 214 | float latitude = Mathf.Acos(normalizedCoords.y); 215 | float longitude = Mathf.Atan2(normalizedCoords.z, normalizedCoords.x); 216 | float spherex = longitude * (0.5f / Mathf.PI); 217 | float spherey = latitude * (1.0f / Mathf.PI); 218 | Vector2 sphereCoords = new Vector2(0.5f - spherex, 1.0f - spherey); 219 | sphereCoords.x *= renderTexture.width; 220 | sphereCoords.y *= renderTexture.height; 221 | return sphereCoords; 222 | } 223 | } 224 | 225 | 226 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Data Collection/HeatmapEvent.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Adapter API for sending Heatmap analytics events 3 | /// 4 | /// This is simply an adapter. As such, you could choose not to 5 | /// use it at all, but by passing your events through this API you gain type 6 | /// safety and ensure that you're conforming to the data that the aggregator 7 | /// and Heatmapper expect to receive. 8 | /// 9 | /// The script is designed to work in Unity 4.6 > 5.x 10 | 11 | using System; 12 | using System.Collections.Generic; 13 | using UnityEngine; 14 | using System.IO; 15 | 16 | using analyticsResultNamespace = UnityEngine.Analytics; 17 | using analyticsEventNamespace = UnityEngine.Analytics.Analytics; 18 | 19 | namespace UnityAnalytics360VideoHeatmap 20 | { 21 | public class HeatmapEvent 22 | { 23 | private static Dictionary s_Dictionary = new Dictionary(); 24 | 25 | private static bool s_SaveToLocal = false; 26 | private static string s_LocalSavePath; 27 | 28 | private static string s_SessionId; 29 | 30 | /// 31 | /// When set to true, HeatmapEvents are saved to a local file, instead of sent to the server. 32 | /// 33 | /// If set to true save to a local file. 34 | public static bool saveToLocal 35 | { 36 | get 37 | { 38 | return s_SaveToLocal; 39 | } 40 | set 41 | { 42 | s_SaveToLocal = value; 43 | } 44 | } 45 | 46 | /// 47 | /// Sets the local save path. 48 | /// 49 | /// The path on the local drive where HeatmapEvents will be saved. 50 | public static string localSavePath 51 | { 52 | get 53 | { 54 | return s_LocalSavePath; 55 | } 56 | set 57 | { 58 | s_LocalSavePath = value; 59 | } 60 | } 61 | 62 | /// 63 | /// Send the event with position, rotation, time and an optional dictionary. 64 | /// 65 | public static analyticsResultNamespace.AnalyticsResult Send(string eventName, Transform trans, float time, Dictionary options = null) 66 | { 67 | AddXY(trans.position.x, trans.position.y); 68 | AddZ(trans.position.z); 69 | AddRotation(trans.forward); 70 | AddTime(time); 71 | AddOptions(options); 72 | return Commit(eventName); 73 | } 74 | 75 | /// 76 | /// Transmit the event 77 | /// 78 | protected static analyticsResultNamespace.AnalyticsResult Commit(string eventName) 79 | { 80 | analyticsResultNamespace.AnalyticsResult result; 81 | if (s_SaveToLocal) 82 | { 83 | string path = String.IsNullOrEmpty(s_LocalSavePath) ? System.IO.Path.Combine(Application.dataPath, "RawDataFolder") : s_LocalSavePath; 84 | result = analyticsResultNamespace.AnalyticsResult.Ok; 85 | using (var writer = new StreamWriter(path, true)) 86 | { 87 | s_SessionId = (String.IsNullOrEmpty(s_SessionId)) ? System.Guid.NewGuid().ToString() : s_SessionId; 88 | ////Debug.Log(s_Dictionary.ContainsKey("x")); 89 | string evt = WriteEvent("Heatmap." + eventName, s_Dictionary, "TestDevice-3", s_SessionId, Application.platform.ToString(), Debug.isDebugBuild); 90 | writer.WriteLine(evt); 91 | } 92 | } 93 | else 94 | { 95 | result = analyticsEventNamespace.CustomEvent("Heatmap." + eventName, s_Dictionary); 96 | } 97 | s_Dictionary.Clear(); 98 | return result; 99 | } 100 | 101 | /// 102 | /// Convenience method for adding X/Y to dict 103 | /// 104 | protected static void AddXY(float x, float y) 105 | { 106 | ////Debug.Log("x = " + x + " y = " + y); 107 | s_Dictionary["x"] = x; 108 | s_Dictionary["y"] = y; 109 | } 110 | 111 | /// 112 | /// Convenience method for adding Z to dict 113 | /// 114 | protected static void AddZ(float z) 115 | { 116 | s_Dictionary["z"] = z; 117 | } 118 | 119 | /// 120 | /// Convenience method for adding time to dict 121 | /// 122 | protected static void AddTime(float time) 123 | { 124 | s_Dictionary["t"] = time; 125 | } 126 | 127 | /// 128 | /// Convenience method for adding rotation 129 | /// 130 | protected static void AddRotation(Vector3 r) 131 | { 132 | s_Dictionary["rx"] = r.x; 133 | s_Dictionary["ry"] = r.y; 134 | s_Dictionary["rz"] = r.z; 135 | } 136 | 137 | protected static void AddDestination(Vector3 v) 138 | { 139 | s_Dictionary["dx"] = v.x; 140 | s_Dictionary["dy"] = v.y; 141 | s_Dictionary["dz"] = v.z; 142 | } 143 | 144 | /// 145 | /// Convenience method for adding options to dict 146 | /// 147 | protected static void AddOptions(Dictionary options) 148 | { 149 | if (options != null) 150 | { 151 | foreach (KeyValuePair entry in options) 152 | { 153 | s_Dictionary[entry.Key] = entry.Value; 154 | } 155 | } 156 | } 157 | 158 | public static string WriteEvent(string eventName, Dictionary parameters, string deviceId, string sessionId, string platform, bool isDebug = false) 159 | { 160 | double currentMilliseconds = Math.Floor((DateTime.UtcNow - UnityAnalytics.DateTimeUtils.s_Epoch).TotalMilliseconds); 161 | 162 | string evt = ""; 163 | evt += currentMilliseconds + "\t"; 164 | 165 | // AppID 166 | #if UNITY_5 167 | evt += (string.IsNullOrEmpty(Application.cloudProjectId)) ? "1234-abcd-5678-efgh" : Application.cloudProjectId; 168 | #else 169 | evt += "1234-abcd-5678-efgh"; 170 | #endif 171 | evt += "\t"; 172 | 173 | // Event Type 174 | evt += "custom\t"; 175 | 176 | // User ID, Session ID 177 | evt += deviceId + "\t"; 178 | evt += sessionId + "\t"; 179 | 180 | // Remote IP 181 | evt += "1.1.1.1\t"; 182 | 183 | // Platform 184 | evt += platform + "\t"; 185 | 186 | // SDK Version 187 | evt += "5.6,3f1\t"; 188 | 189 | // IsDebug 190 | evt += isDebug + "\t"; 191 | 192 | // User agent 193 | evt += "Corridor%20Z/3 CFNetwork/758.2.8 Darwin/15.0.0\t"; 194 | 195 | // Submit time 196 | evt += currentMilliseconds + "\t"; 197 | 198 | // Event Name 199 | evt += eventName + "\t"; 200 | 201 | evt += WriteParams(eventName, parameters); 202 | 203 | return evt; 204 | } 205 | 206 | static string WriteParams(string eventName, Dictionary parameters) 207 | { 208 | string json = "{"; 209 | 210 | foreach(KeyValuePair kv in parameters) 211 | { 212 | json += Quotify(kv.Key) + ":" + Quotify(kv.Value.ToString()); 213 | json += ","; 214 | } 215 | json += Quotify("unity.name") + ":" + Quotify(eventName) + "}"; 216 | return json; 217 | } 218 | 219 | static string Quotify(string value) 220 | { 221 | return "\"" + value + "\""; 222 | } 223 | 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Controllers/HeatmapDataProcessor.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Manages the loading and processing of Heatmap data 3 | /// 4 | /// 5 | /// Heatmap data is loaded from GZip or text files and stored in the 6 | /// HeatmapViewModel as a CustomRawData[]. From there, it is aggregated 7 | /// into a HeatPoint[] before being sent to the renderer. 8 | /// 9 | /// This class manages all that loading and processing, working out the 10 | /// minimum work required to dynamically update the map. 11 | 12 | using System; 13 | using System.Collections.Generic; 14 | using UnityEngine; 15 | using UnityAnalytics; 16 | using UnityEditor; 17 | using System.Collections; 18 | using System.Linq; 19 | 20 | namespace UnityAnalytics360VideoHeatmap 21 | { 22 | public class HeatmapDataProcessor 23 | { 24 | const string k_DataPathKey = "UnityAnalyticsHeatmapDataPathKey"; 25 | const string k_SpaceKey = "UnityAnalyticsHeatmapAggregationSpace"; 26 | const string k_KeyToTime = "UnityAnalyticsHeatmapAggregationTime"; 27 | const string k_RotationKey = "UnityAnalyticsHeatmapAggregationRotation"; 28 | const string k_SmoothSpaceKey = "UnityAnalyticsHeatmapAggregationAggregateSpace"; 29 | const string k_SmoothTimeKey = "UnityAnalyticsHeatmapAggregationAggregateTime"; 30 | const string k_SmoothRotationKey = "UnityAnalyticsHeatmapAggregationAggregateRotation"; 31 | const string k_StartTimeKey = "UnityAnalyticsHeatmapAggregateStartTime"; 32 | const string k_EndTimeKey = "UnityAnalyticsHeatmapAggregateEndTime"; 33 | 34 | 35 | const string k_SeparateSessionKey = "UnityAnalyticsHeatmapAggregationAggregateSessionIDs"; 36 | const string k_SeparateDebugKey = "UnityAnalyticsHeatmapAggregationAggregateDebug"; 37 | const string k_SeparatePlatformKey = "UnityAnalyticsHeatmapAggregationAggregatePlatform"; 38 | const string k_SeparateCustomKey = "UnityAnalyticsHeatmapAggregationAggregateCustom"; 39 | 40 | const string k_ArbitraryFieldsKey = "UnityAnalyticsHeatmapAggregationArbitraryFields"; 41 | 42 | const float k_DefaultSpace = 10f; 43 | const float k_DefaultTime = 10f; 44 | const float k_DefaultRotation = 15f; 45 | 46 | 47 | public const int SMOOTH_VALUE = 0; 48 | public const int SMOOTH_NONE = 1; 49 | public const int SMOOTH_UNION = 2; 50 | 51 | public HeatmapViewModel m_ViewModel; 52 | public HeatmapAggregator m_Aggregator; 53 | 54 | bool m_DateChangeHasOccurred = true; 55 | 56 | private string _rawDataPath = ""; 57 | public string m_RawDataPath 58 | { 59 | get{ 60 | return _rawDataPath; 61 | } 62 | set{ 63 | _rawDataPath = value; 64 | m_Aggregator.SetDataPath(_rawDataPath); 65 | EditorPrefs.SetString(k_DataPathKey, value); 66 | } 67 | } 68 | [SerializeField] 69 | string _startDate = ""; 70 | public string m_StartDate 71 | { 72 | get { 73 | return _startDate; 74 | } 75 | set { 76 | string oldDate = _startDate; 77 | _startDate = value; 78 | if (_startDate != oldDate) 79 | { 80 | EditorPrefs.SetString(Application.cloudProjectId + k_StartTimeKey, _startDate); 81 | m_DateChangeHasOccurred = true; 82 | } 83 | } 84 | } 85 | [SerializeField] 86 | string _endDate = ""; 87 | public string m_EndDate 88 | { 89 | get { 90 | return _endDate; 91 | } 92 | set { 93 | string oldDate = _endDate; 94 | _endDate = value; 95 | if (_endDate != oldDate) 96 | { 97 | EditorPrefs.SetString(Application.cloudProjectId + k_EndTimeKey, _endDate); 98 | m_DateChangeHasOccurred = true; 99 | } 100 | } 101 | } 102 | 103 | bool _separateSessions = false; 104 | public bool m_SeparateSessions{ 105 | get{ 106 | return _separateSessions; 107 | } 108 | set{ 109 | _separateSessions = value; 110 | EditorPrefs.SetBool(k_SeparateSessionKey, _separateSessions); 111 | } 112 | } 113 | bool _separatePlatform; 114 | public bool m_SeparatePlatform 115 | { 116 | get { 117 | return _separatePlatform; 118 | } 119 | set { 120 | _separatePlatform = value; 121 | EditorPrefs.SetBool(k_SeparateSessionKey, _separatePlatform); 122 | } 123 | } 124 | bool _separateDebug; 125 | public bool m_SeparateDebug 126 | { 127 | get { 128 | return _separateDebug; 129 | } 130 | set { 131 | _separateDebug = value; 132 | EditorPrefs.SetBool(k_SeparateDebugKey, _separateDebug); 133 | } 134 | } 135 | bool _separateCustomField; 136 | public bool m_SeparateCustomField 137 | { 138 | get { 139 | return _separateCustomField; 140 | } 141 | set { 142 | _separateCustomField = value; 143 | EditorPrefs.SetBool(k_SeparateCustomKey, _separateCustomField); 144 | } 145 | } 146 | 147 | List _separationFields = new List(); 148 | public List m_SeparationFields 149 | { 150 | get { 151 | return _separationFields; 152 | } 153 | set { 154 | _separationFields = value; 155 | string currentArbitraryFieldsString = string.Join("|", _separationFields.ToArray()); 156 | EditorPrefs.SetString(k_ArbitraryFieldsKey, currentArbitraryFieldsString); 157 | } 158 | } 159 | 160 | public delegate void AggregationHandler(string jsonPath); 161 | public delegate void PointHandler(HeatPoint[] heatData); 162 | 163 | 164 | static public AggregationMethod[] m_RemapOptionIds = new AggregationMethod[]{ 165 | AggregationMethod.Increment, 166 | AggregationMethod.Cumulative, 167 | AggregationMethod.Average, 168 | AggregationMethod.Min, 169 | AggregationMethod.Max, 170 | AggregationMethod.First, 171 | AggregationMethod.Last, 172 | AggregationMethod.Percentile 173 | }; 174 | 175 | public HeatmapDataProcessor() 176 | { 177 | m_Aggregator = new HeatmapAggregator(m_RawDataPath); 178 | HeatmapViewModel.StartEndDateUpdated += HeatmapViewModel_StartEndDateUpdated; 179 | } 180 | 181 | void HeatmapViewModel_StartEndDateUpdated(string startDate, string endDate) 182 | { 183 | m_StartDate = startDate; 184 | m_EndDate = endDate; 185 | RawDataClient.GetInstance().m_DataPath = m_RawDataPath; 186 | ProcessAggregation(); 187 | } 188 | 189 | public void RestoreSettings() 190 | { 191 | // Restore cached paths 192 | m_RawDataPath = EditorPrefs.GetString(k_DataPathKey); 193 | 194 | // Set dates based on today (should this be cached?) 195 | // Yes, yes it should. 196 | m_EndDate = EditorPrefs.HasKey(Application.cloudProjectId+k_EndTimeKey) ? EditorPrefs.GetString(Application.cloudProjectId+k_EndTimeKey) : String.Format("{0:yyyy-MM-dd}", DateTime.UtcNow); 197 | m_StartDate = EditorPrefs.HasKey(Application.cloudProjectId + k_StartTimeKey) ? EditorPrefs.GetString(Application.cloudProjectId + k_StartTimeKey) : String.Format("{0:yyyy-MM-dd}", DateTime.UtcNow.Subtract(new TimeSpan(5, 0, 0, 0))); 198 | 199 | // Restore list of arbitrary separation fields 200 | string loadedArbitraryFields = EditorPrefs.GetString(k_ArbitraryFieldsKey); 201 | string[] arbitraryFieldsList; 202 | if (string.IsNullOrEmpty(loadedArbitraryFields)) 203 | { 204 | arbitraryFieldsList = new string[]{ }; 205 | } 206 | else 207 | { 208 | arbitraryFieldsList = loadedArbitraryFields.Split('|'); 209 | } 210 | m_SeparationFields = new List(arbitraryFieldsList); 211 | } 212 | 213 | /// 214 | /// Fetch the files within the currently specified date range. 215 | /// 216 | public void Fetch() 217 | { 218 | RawDataClient.GetInstance().m_DataPath = m_RawDataPath; 219 | ProcessAggregation(); 220 | } 221 | 222 | void ProcessAggregation() 223 | { 224 | //TODO: Where settings for aggregation go 225 | DateTime start, end; 226 | try 227 | { 228 | start = DateTime.Parse(m_StartDate).ToUniversalTime(); 229 | } 230 | catch 231 | { 232 | start = DateTime.Parse("2000-01-01").ToUniversalTime(); 233 | } 234 | try 235 | { 236 | end = DateTime.Parse(m_EndDate).ToUniversalTime().Add(new TimeSpan(24,0,0)); 237 | } 238 | catch 239 | { 240 | end = DateTime.UtcNow; 241 | } 242 | 243 | if (m_DateChangeHasOccurred || RawDataClient.GetInstance().m_ManifestInvalidated || 244 | HeatmapViewModel.m_RawDataFileList == null || HeatmapViewModel.m_RawDataFileList.Count == 0) 245 | { 246 | RawDataClient.GetInstance().m_DataPath = m_RawDataPath; 247 | HeatmapViewModel.m_RawDataFileList = RawDataClient.GetInstance().GetFiles( 248 | new UnityAnalyticsEventType[]{ UnityAnalyticsEventType.custom }, start, end); 249 | m_DateChangeHasOccurred = false; 250 | if (HeatmapViewModel.m_RawDataFileList.Count == 0) 251 | { 252 | return; 253 | } 254 | } 255 | m_Aggregator.Process(HeatmapViewModel.m_RawDataFileList, start, end); 256 | } 257 | } 258 | } 259 | 260 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Heatmap Render/Skybox-Panoramic-Heatmap.shader: -------------------------------------------------------------------------------- 1 | Shader "Skybox/Panoramic-Heatmap" { 2 | Properties { 3 | _Tint ("Tint Color", Color) = (.5, .5, .5, .5) 4 | [Gamma] _Exposure ("Exposure", Range(0, 8)) = 1.0 5 | _Rotation ("Rotation", Range(0, 360)) = 0 6 | [NoScaleOffset] _MainTex ("Spherical (HDR)", 2D) = "grey" {} 7 | [NoScaleOffset] _HeatmapTex ("Spherical Heatmap (HDR)", 2D) = "grey" {} 8 | [NoScaleOffset] _HeatmapGradient ("Gradient Lookup", 2D) = "grey" {} 9 | [KeywordEnum(6 Frames Layout, Latitude Longitude Layout)] _Mapping("Mapping", Float) = 1 10 | [Enum(360 Degrees, 0, 180 Degrees, 1)] _ImageType("Image Type", Float) = 0 11 | [Toggle] _MirrorOnBack("Mirror on Back", Float) = 0 12 | [Enum(None, 0, Side by Side, 1, Over Under, 2)] _Layout("3D Layout", Float) = 0 13 | } 14 | 15 | SubShader { 16 | Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" } 17 | Cull Off ZWrite Off 18 | 19 | Pass { 20 | 21 | CGPROGRAM 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | #pragma target 2.0 25 | #pragma multi_compile __ _MAPPING_6_FRAMES_LAYOUT 26 | 27 | #include "UnityCG.cginc" 28 | 29 | sampler2D _MainTex; 30 | sampler2D _HeatmapTex; 31 | sampler2D _HeatmapGradient; 32 | float4 _MainTex_TexelSize; 33 | half4 _MainTex_HDR; 34 | half4 _Tint; 35 | half _Exposure; 36 | float _Rotation; 37 | #ifndef _MAPPING_6_FRAMES_LAYOUT 38 | bool _MirrorOnBack; 39 | int _ImageType; 40 | int _Layout; 41 | #endif 42 | 43 | #ifndef _MAPPING_6_FRAMES_LAYOUT 44 | inline float2 ToRadialCoords(float3 coords) 45 | { 46 | float3 normalizedCoords = normalize(coords); 47 | float latitude = acos(normalizedCoords.y); 48 | float longitude = atan2(normalizedCoords.z, normalizedCoords.x); 49 | float2 sphereCoords = float2(longitude, latitude) * float2(0.5/UNITY_PI, 1.0/UNITY_PI); 50 | return float2(0.5,1.0) - sphereCoords; 51 | } 52 | #endif 53 | 54 | #ifdef _MAPPING_6_FRAMES_LAYOUT 55 | inline float2 ToCubeCoords(float3 coords, float3 layout, float4 edgeSize, float4 faceXCoordLayouts, float4 faceYCoordLayouts, float4 faceZCoordLayouts) 56 | { 57 | // Determine the primary axis of the normal 58 | float3 absn = abs(coords); 59 | float3 absdir = absn > float3(max(absn.y,absn.z), max(absn.x,absn.z), max(absn.x,absn.y)) ? 1 : 0; 60 | // Convert the normal to a local face texture coord [-1,+1], note that tcAndLen.z==dot(coords,absdir) 61 | // and thus its sign tells us whether the normal is pointing positive or negative 62 | float3 tcAndLen = mul(absdir, float3x3(coords.zyx, coords.xzy, float3(-coords.xy,coords.z))); 63 | tcAndLen.xy /= tcAndLen.z; 64 | // Flip-flop faces for proper orientation and normalize to [-0.5,+0.5] 65 | bool2 positiveAndVCross = float2(tcAndLen.z, layout.x) > 0; 66 | tcAndLen.xy *= (positiveAndVCross[0] ? absdir.yx : (positiveAndVCross[1] ? float2(absdir[2],0) : float2(0,absdir[2]))) - 0.5; 67 | // Clamp values which are close to the face edges to avoid bleeding/seams (ie. enforce clamp texture wrap mode) 68 | tcAndLen.xy = clamp(tcAndLen.xy, edgeSize.xy, edgeSize.zw); 69 | // Scale and offset texture coord to match the proper square in the texture based on layout. 70 | float4 coordLayout = mul(float4(absdir,0), float4x4(faceXCoordLayouts, faceYCoordLayouts, faceZCoordLayouts, faceZCoordLayouts)); 71 | tcAndLen.xy = (tcAndLen.xy + (positiveAndVCross[0] ? coordLayout.xy : coordLayout.zw)) * layout.yz; 72 | return tcAndLen.xy; 73 | } 74 | #endif 75 | 76 | float3 RotateAroundYInDegrees (float3 vertex, float degrees) 77 | { 78 | float alpha = degrees * UNITY_PI / 180.0; 79 | float sina, cosa; 80 | sincos(alpha, sina, cosa); 81 | float2x2 m = float2x2(cosa, -sina, sina, cosa); 82 | return float3(mul(m, vertex.xz), vertex.y).xzy; 83 | } 84 | 85 | struct appdata_t { 86 | float4 vertex : POSITION; 87 | UNITY_VERTEX_INPUT_INSTANCE_ID 88 | }; 89 | 90 | struct v2f { 91 | float4 vertex : SV_POSITION; 92 | float3 texcoord : TEXCOORD0; 93 | #ifdef _MAPPING_6_FRAMES_LAYOUT 94 | float3 layout : TEXCOORD1; 95 | float4 edgeSize : TEXCOORD2; 96 | float4 faceXCoordLayouts : TEXCOORD3; 97 | float4 faceYCoordLayouts : TEXCOORD4; 98 | float4 faceZCoordLayouts : TEXCOORD5; 99 | #else 100 | float2 image180ScaleAndCutoff : TEXCOORD1; 101 | float4 layout3DScaleAndOffset : TEXCOORD2; 102 | #endif 103 | UNITY_VERTEX_OUTPUT_STEREO 104 | }; 105 | 106 | v2f vert (appdata_t v) 107 | { 108 | v2f o; 109 | UNITY_SETUP_INSTANCE_ID(v); 110 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 111 | float3 rotated = RotateAroundYInDegrees(v.vertex, _Rotation); 112 | o.vertex = UnityObjectToClipPos(rotated); 113 | o.texcoord = v.vertex.xyz; 114 | #ifdef _MAPPING_6_FRAMES_LAYOUT 115 | // layout and edgeSize are solely based on texture dimensions and can thus be precalculated in the vertex shader. 116 | float sourceAspect = float(_MainTex_TexelSize.z) / float(_MainTex_TexelSize.w); 117 | // Use the halfway point between the 1:6 and 3:4 aspect ratios of the strip and cross layouts to 118 | // guess at the correct format. 119 | bool3 aspectTest = 120 | sourceAspect > 121 | float3(1.0, 1.0f / 6.0f + (3.0f / 4.0f - 1.0f / 6.0f) / 2.0f, 6.0f / 1.0f + (4.0f / 3.0f - 6.0f / 1.0f) / 2.0f); 122 | // For a given face layout, the coordinates of the 6 cube faces are fixed: build a compact representation of the 123 | // coordinates of the center of each face where the first float4 represents the coordinates of the X axis faces, 124 | // the second the Y, and the third the Z. The first two float componenents (xy) of each float4 represent the face 125 | // coordinates on the positive axis side of the cube, and the second (zw) the negative. 126 | // layout.x is a boolean flagging the vertical cross layout (for special handling of flip-flops later) 127 | // layout.yz contains the inverse of the layout dimensions (ie. the scale factor required to convert from 128 | // normalized face coords to full texture coordinates) 129 | if (aspectTest[0]) // horizontal 130 | { 131 | if (aspectTest[2]) 132 | { // horizontal strip 133 | o.faceXCoordLayouts = float4(0.5,0.5,1.5,0.5); 134 | o.faceYCoordLayouts = float4(2.5,0.5,3.5,0.5); 135 | o.faceZCoordLayouts = float4(4.5,0.5,5.5,0.5); 136 | o.layout = float3(-1,1.0/6.0,1.0/1.0); 137 | } 138 | else 139 | { // horizontal cross 140 | o.faceXCoordLayouts = float4(2.5,1.5,0.5,1.5); 141 | o.faceYCoordLayouts = float4(1.5,2.5,1.5,0.5); 142 | o.faceZCoordLayouts = float4(1.5,1.5,3.5,1.5); 143 | o.layout = float3(-1,1.0/4.0,1.0/3.0); 144 | } 145 | } 146 | else 147 | { 148 | if (aspectTest[1]) 149 | { // vertical cross 150 | o.faceXCoordLayouts = float4(2.5,2.5,0.5,2.5); 151 | o.faceYCoordLayouts = float4(1.5,3.5,1.5,1.5); 152 | o.faceZCoordLayouts = float4(1.5,2.5,1.5,0.5); 153 | o.layout = float3(1,1.0/3.0,1.0/4.0); 154 | } 155 | else 156 | { // vertical strip 157 | o.faceXCoordLayouts = float4(0.5,5.5,0.5,4.5); 158 | o.faceYCoordLayouts = float4(0.5,3.5,0.5,2.5); 159 | o.faceZCoordLayouts = float4(0.5,1.5,0.5,0.5); 160 | o.layout = float3(-1,1.0/1.0,1.0/6.0); 161 | } 162 | } 163 | // edgeSize specifies the minimum (xy) and maximum (zw) normalized face texture coordinates that will be used for 164 | // sampling in the texture. Setting these to the effective size of a half pixel horizontally and vertically 165 | // effectively enforces clamp mode texture wrapping for each individual face. 166 | o.edgeSize.xy = _MainTex_TexelSize.xy * 0.5 / o.layout.yz - 0.5; 167 | o.edgeSize.zw = -o.edgeSize.xy; 168 | #else // !_MAPPING_6_FRAMES_LAYOUT 169 | // Calculate constant horizontal scale and cutoff for 180 (vs 360) image type 170 | if (_ImageType == 0) // 360 degree 171 | o.image180ScaleAndCutoff = float2(1.0, 1.0); 172 | else // 180 degree 173 | o.image180ScaleAndCutoff = float2(2.0, _MirrorOnBack ? 1.0 : 0.5); 174 | // Calculate constant scale and offset for 3D layouts 175 | if (_Layout == 0) // No 3D layout 176 | o.layout3DScaleAndOffset = float4(0,0,1,1); 177 | else if (_Layout == 1) // Side-by-Side 3D layout 178 | o.layout3DScaleAndOffset = float4(unity_StereoEyeIndex,0,0.5,1); 179 | else // Over-Under 3D layout 180 | o.layout3DScaleAndOffset = float4(0, 1-unity_StereoEyeIndex,1,0.5); 181 | #endif 182 | return o; 183 | } 184 | 185 | fixed4 frag (v2f i) : SV_Target 186 | { 187 | #ifdef _MAPPING_6_FRAMES_LAYOUT 188 | float2 tc = ToCubeCoords(i.texcoord, i.layout, i.edgeSize, i.faceXCoordLayouts, i.faceYCoordLayouts, i.faceZCoordLayouts); 189 | #else 190 | float2 tc = ToRadialCoords(i.texcoord); 191 | if (tc.x > i.image180ScaleAndCutoff[1]) 192 | return half4(0,0,0,1); 193 | tc.x = fmod(tc.x*i.image180ScaleAndCutoff[0], 1); 194 | tc = (tc + i.layout3DScaleAndOffset.xy) * i.layout3DScaleAndOffset.zw; 195 | #endif 196 | 197 | half4 tex = tex2D (_MainTex, tc); 198 | 199 | // apply heat 200 | float heat = tex2D (_HeatmapTex, tc); 201 | float4 grad = tex2D (_HeatmapGradient, float2(heat, heat)); 202 | tex.rgb = (1 - grad.w) * tex.rgb + grad.w * tex.rgb * grad.xyz; 203 | 204 | half3 c = DecodeHDR (tex, _MainTex_HDR); 205 | c = c * _Tint.rgb * unity_ColorSpaceDouble.rgb; 206 | c *= _Exposure; 207 | 208 | return half4(c, 1); 209 | } 210 | ENDCG 211 | } 212 | } 213 | 214 | 215 | CustomEditor "SkyboxPanoramicShaderGUI" 216 | Fallback Off 217 | 218 | } 219 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/Components/DatePicker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace UnityAnalytics360VideoHeatmap 6 | { 7 | public static class AnalyticsDatePicker { 8 | 9 | //private static GUIStyle fieldStyle; 10 | private static Vector2 fieldOffset = new Vector2(0, -2f); 11 | private static Vector2 winSize = new Vector2(300f, 175f); 12 | 13 | public static string s_CachedValue; 14 | private static int s_CachedControlId; 15 | private static bool s_DoDropDown = false; 16 | 17 | public static string DatePicker(string value, 18 | GUIStyle fieldStyle, 19 | EditorGUIBinding.TextFieldChangeHandler change, 20 | EditorGUIBinding.TextFieldFailureHandler failure = null, 21 | EditorGUIBinding.TextFieldValidationHandler validate = null) 22 | { 23 | int controlID = GUIUtility.GetControlID (FocusType.Keyboard); 24 | Rect controlRect = EditorGUILayout.GetControlRect(false); 25 | 26 | fieldStyle.contentOffset = fieldOffset; 27 | fieldStyle.clipping = TextClipping.Overflow; 28 | 29 | EditorGUI.BeginChangeCheck(); 30 | EditorGUI.LabelField(controlRect, value, fieldStyle); 31 | DatePickerWindow window = null; 32 | 33 | switch (Event.current.GetTypeForControl(controlID)) 34 | { 35 | case EventType.MouseDown: 36 | if (controlRect.Contains(Event.current.mousePosition) && Event.current.button == 0) 37 | { 38 | GUIUtility.hotControl = controlID; 39 | Event.current.Use(); 40 | } 41 | break; 42 | case EventType.MouseUp: 43 | if (GUIUtility.hotControl == controlID && Event.current.button == 0 44 | && controlRect.Contains(Event.current.mousePosition)) 45 | { 46 | s_DoDropDown = true; 47 | Event.current.Use(); 48 | } 49 | break; 50 | case EventType.Repaint: 51 | if (GUIUtility.hotControl == controlID && s_DoDropDown) 52 | { 53 | s_DoDropDown = false; 54 | s_CachedControlId = controlID; 55 | GUIUtility.hotControl = 0; 56 | Vector2 position = EditorGUIUtility.GUIToScreenPoint(new Vector2(controlRect.x, controlRect.y+controlRect.height)); 57 | window = ScriptableObject.CreateInstance(); 58 | window.ShowAsDropDown(new Rect(position.x, position.y-winSize.y, winSize.x, winSize.y), winSize, value); 59 | } 60 | break; 61 | } 62 | 63 | if (s_CachedControlId == controlID && s_CachedValue != null) 64 | { 65 | value = s_CachedValue; 66 | s_CachedControlId = 0; 67 | s_CachedValue = null; 68 | GUI.changed = true; 69 | } 70 | 71 | if (EditorGUI.EndChangeCheck()) 72 | { 73 | DatePickerApplyChangeHandlers(value, change, failure, validate); 74 | } 75 | 76 | return value; 77 | } 78 | 79 | private static void DatePickerApplyChangeHandlers(string text, 80 | EditorGUIBinding.TextFieldChangeHandler change, 81 | EditorGUIBinding.TextFieldFailureHandler failure, 82 | EditorGUIBinding.TextFieldValidationHandler validate) 83 | { 84 | bool validated = (validate == null) ? true : validate(text); 85 | if (validated) 86 | { 87 | change(text); 88 | } 89 | else if (!validated && failure != null) 90 | { 91 | failure(); 92 | } 93 | } 94 | } 95 | 96 | public class DatePickerWindow : EditorWindow 97 | { 98 | public string value; 99 | private DatePickerModel model; 100 | private bool doCommit = false; 101 | private GUILayoutOption itemWidth; 102 | 103 | private static GUIStyle fieldStyle; 104 | private static GUIStyle dateStyle; 105 | private static RectOffset dateFieldRectOffset; 106 | 107 | private static string[] m_MonthsOfTheYear = new string[12] 108 | {"January", "February", "March", "April", 109 | "May", "June", "July", "August", 110 | "September", "October", "November", "December"}; 111 | 112 | public void ShowAsDropDown(Rect buttonRect, Vector2 windowSize, string dateValue) 113 | { 114 | base.ShowAsDropDown(buttonRect, windowSize); 115 | value = dateValue; 116 | itemWidth = GUILayout.Width(35f); 117 | } 118 | 119 | void OnEnable() 120 | { 121 | model = new DatePickerModel(); 122 | dateFieldRectOffset = new RectOffset(0, 0, 2, 0); 123 | 124 | if (fieldStyle == null) 125 | { 126 | fieldStyle = new GUIStyle(); 127 | fieldStyle.alignment = TextAnchor.MiddleCenter; 128 | 129 | dateStyle = new GUIStyle(); 130 | dateStyle.alignment = TextAnchor.MiddleCenter; 131 | dateStyle.margin = dateFieldRectOffset; 132 | dateStyle.stretchWidth = true; 133 | dateStyle.clipping = TextClipping.Overflow; 134 | } 135 | } 136 | 137 | void OnGUI() 138 | { 139 | value = EditorGUILayout.TextField(value); 140 | if (string.IsNullOrEmpty(value)) 141 | return; 142 | 143 | model.Update(value); 144 | using(new EditorGUILayout.HorizontalScope()) 145 | { 146 | if (GUILayout.Button("<")) 147 | { 148 | model.decrementMonth(); 149 | model.Calculate(); 150 | } 151 | 152 | int monthIndex = Mathf.Clamp(model.m_Month - 1, 0, 11); 153 | EditorGUILayout.LabelField(model.m_Year + " " + m_MonthsOfTheYear[monthIndex], dateStyle); 154 | if (GUILayout.Button(">")) 155 | { 156 | model.incrementMonth(); 157 | model.Calculate(); 158 | } 159 | } 160 | 161 | using (new EditorGUILayout.VerticalScope("box")) 162 | { 163 | for (int a = 0; a < 6; a++) 164 | { 165 | using(new EditorGUILayout.HorizontalScope()) 166 | { 167 | for (int b = a*7; b < (a*7)+7; b++) 168 | { 169 | var dt = model.m_MonthDays[b]; 170 | if (dt == 0) 171 | { 172 | EditorGUILayout.LabelField(" ", itemWidth); 173 | } 174 | else if (dt == model.m_Date) 175 | { 176 | EditorGUILayout.LabelField(dt.ToString(), fieldStyle, itemWidth); 177 | } 178 | else if (GUILayout.Button(dt.ToString(), itemWidth)) 179 | { 180 | //TODO: Commit the new date 181 | model.m_Date = dt; 182 | doCommit = true; 183 | } 184 | } 185 | } 186 | } 187 | } 188 | value = model.dateString; 189 | if (doCommit || Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Return) 190 | { 191 | Commit(); 192 | } 193 | } 194 | 195 | void OnInspectorUpdate() 196 | { 197 | if (AnalyticsDatePicker.s_CachedValue != null) 198 | { 199 | Close(); 200 | } 201 | } 202 | 203 | void Commit() 204 | { 205 | AnalyticsDatePicker.s_CachedValue = value; 206 | doCommit = false; 207 | } 208 | } 209 | 210 | public class DatePickerModel 211 | { 212 | private int _year; 213 | public int m_Year 214 | { 215 | get 216 | { 217 | return _year; 218 | } 219 | set 220 | { 221 | _year = value; 222 | dateString = _year + "-" + MinFormat(m_Month) + "-" + MinFormat(m_Date); 223 | } 224 | } 225 | private int _month; 226 | public int m_Month 227 | { 228 | get 229 | { 230 | return _month; 231 | } 232 | set 233 | { 234 | _month = value; 235 | dateString = m_Year + "-" + MinFormat(_month) + "-" + MinFormat(m_Date); 236 | } 237 | } 238 | private int _date; 239 | public int m_Date 240 | { 241 | get 242 | { 243 | return _date; 244 | } 245 | set 246 | { 247 | _date = value; 248 | dateString = m_Year + "-" + MinFormat(m_Month) + "-" + MinFormat(_date); 249 | } 250 | } 251 | 252 | private string _dateString; 253 | public string dateString 254 | { 255 | get 256 | { 257 | return _dateString; 258 | } 259 | private set 260 | { 261 | _dateString = value; 262 | } 263 | } 264 | 265 | public void decrementMonth() 266 | { 267 | if (m_Month - 1 < 1) 268 | { 269 | m_Year --; 270 | m_Month = 12; 271 | } 272 | else 273 | { 274 | m_Month --; 275 | } 276 | } 277 | 278 | public void incrementMonth() 279 | { 280 | if (m_Month + 1 > 12) 281 | { 282 | m_Year ++; 283 | m_Month = 1; 284 | } 285 | else 286 | { 287 | m_Month ++; 288 | } 289 | } 290 | 291 | 292 | int[] m_DaysInMonths = new int[12]{31, 28, 31, 30, 31, 30, 31, 30, 30, 31, 30, 31}; 293 | public int[] m_MonthDays; 294 | 295 | public void Update(string date) 296 | { 297 | dateString = date; 298 | string[] elements = date.Split('-'); 299 | try { 300 | m_Year = int.Parse(elements[0]); 301 | m_Month = int.Parse(elements[1]); 302 | m_Date = int.Parse(elements[2]); 303 | } catch { 304 | //No-op 305 | } 306 | Calculate(); 307 | } 308 | 309 | public void Calculate() 310 | { 311 | if (!CheckDateValidity()) 312 | { 313 | return; 314 | } 315 | var date = new DateTime(m_Year, m_Month, 1); 316 | int firstDay = (int)date.DayOfWeek; 317 | int daysInMonth = GetDaysInMonth(); 318 | 319 | m_MonthDays = new int[42]; 320 | for(int a = 0; a < 42; a++) 321 | { 322 | if (a >= firstDay && a < daysInMonth+firstDay) 323 | { 324 | m_MonthDays[a] = a + 1 - firstDay; 325 | } 326 | } 327 | } 328 | 329 | int GetDaysInMonth() 330 | { 331 | int days = m_DaysInMonths[m_Month-1]; 332 | // leap year calculation 333 | if (m_Month == 2 && m_Year % 4 == 0 && (m_Year % 100 != 0 || m_Year % 400 == 0)) 334 | { 335 | days ++; 336 | } 337 | return days; 338 | } 339 | 340 | bool CheckDateValidity() 341 | { 342 | try 343 | { 344 | new DateTime(m_Year, m_Month, m_Date); 345 | return true; 346 | } 347 | catch 348 | { 349 | return false; 350 | } 351 | } 352 | 353 | string MinFormat(int number) 354 | { 355 | return number < 10 ? "0" + number : number.ToString(); 356 | } 357 | } 358 | } 359 | 360 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Plugins/Heatmaps/Internal/Lib/MiniJSON.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Calvin Rien 3 | * 4 | * Based on the JSON parser by Patrick van Bergen 5 | * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html 6 | * 7 | * Simplified it so that it doesn't throw exceptions 8 | * and can be used in Unity iPhone with maximum code stripping. 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining 11 | * a copy of this software and associated documentation files (the 12 | * "Software"), to deal in the Software without restriction, including 13 | * without limitation the rights to use, copy, modify, merge, publish, 14 | * distribute, sublicense, and/or sell copies of the Software, and to 15 | * permit persons to whom the Software is furnished to do so, subject to 16 | * the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | */ 29 | using System; 30 | using System.Collections; 31 | using System.Collections.Generic; 32 | using System.IO; 33 | using System.Text; 34 | 35 | namespace MiniJSON { 36 | // Example usage: 37 | // 38 | // using UnityEngine; 39 | // using System.Collections; 40 | // using System.Collections.Generic; 41 | // using MiniJSON; 42 | // 43 | // public class MiniJSONTest : MonoBehaviour { 44 | // void Start () { 45 | // var jsonString = "{ \"array\": [1.44,2,3], " + 46 | // "\"object\": {\"key1\":\"value1\", \"key2\":256}, " + 47 | // "\"string\": \"The quick brown fox \\\"jumps\\\" over the lazy dog \", " + 48 | // "\"unicode\": \"\\u3041 Men\u00fa sesi\u00f3n\", " + 49 | // "\"int\": 65536, " + 50 | // "\"float\": 3.1415926, " + 51 | // "\"bool\": true, " + 52 | // "\"null\": null }"; 53 | // 54 | // var dict = Json.Deserialize(jsonString) as Dictionary; 55 | // 56 | // //Debug.Log("deserialized: " + dict.GetType()); 57 | // //Debug.Log("dict['array'][0]: " + ((List) dict["array"])[0]); 58 | // //Debug.Log("dict['string']: " + (string) dict["string"]); 59 | // //Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles 60 | // //Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs 61 | // //Debug.Log("dict['unicode']: " + (string) dict["unicode"]); 62 | // 63 | // var str = Json.Serialize(dict); 64 | // 65 | // //Debug.Log("serialized: " + str); 66 | // } 67 | // } 68 | 69 | /// 70 | /// This class encodes and decodes JSON strings. 71 | /// Spec. details, see http://www.json.org/ 72 | /// 73 | /// JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. 74 | /// All numbers are parsed to doubles. 75 | /// 76 | public static class Json { 77 | /// 78 | /// Parses the string json into a value 79 | /// 80 | /// A JSON string. 81 | /// An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false 82 | public static object Deserialize(string json) { 83 | // save the string for debug information 84 | if (json == null) { 85 | return null; 86 | } 87 | 88 | return Parser.Parse(json); 89 | } 90 | 91 | sealed class Parser : IDisposable { 92 | const string WORD_BREAK = "{}[],:\""; 93 | 94 | public static bool IsWordBreak(char c) { 95 | return Char.IsWhiteSpace(c) || WORD_BREAK.IndexOf(c) != -1; 96 | } 97 | 98 | enum TOKEN { 99 | NONE, 100 | CURLY_OPEN, 101 | CURLY_CLOSE, 102 | SQUARED_OPEN, 103 | SQUARED_CLOSE, 104 | COLON, 105 | COMMA, 106 | STRING, 107 | NUMBER, 108 | TRUE, 109 | FALSE, 110 | NULL 111 | }; 112 | 113 | StringReader json; 114 | 115 | Parser(string jsonString) { 116 | json = new StringReader(jsonString); 117 | } 118 | 119 | public static object Parse(string jsonString) { 120 | using (var instance = new Parser(jsonString)) { 121 | return instance.ParseValue(); 122 | } 123 | } 124 | 125 | public void Dispose() { 126 | json.Dispose(); 127 | json = null; 128 | } 129 | 130 | Dictionary ParseObject() { 131 | Dictionary table = new Dictionary(); 132 | 133 | // ditch opening brace 134 | json.Read(); 135 | 136 | // { 137 | while (true) { 138 | switch (NextToken) { 139 | case TOKEN.NONE: 140 | return null; 141 | case TOKEN.COMMA: 142 | continue; 143 | case TOKEN.CURLY_CLOSE: 144 | return table; 145 | default: 146 | // name 147 | string name = ParseString(); 148 | if (name == null) { 149 | return null; 150 | } 151 | 152 | // : 153 | if (NextToken != TOKEN.COLON) { 154 | return null; 155 | } 156 | // ditch the colon 157 | json.Read(); 158 | 159 | // value 160 | table[name] = ParseValue(); 161 | break; 162 | } 163 | } 164 | } 165 | 166 | List ParseArray() { 167 | List array = new List(); 168 | 169 | // ditch opening bracket 170 | json.Read(); 171 | 172 | // [ 173 | var parsing = true; 174 | while (parsing) { 175 | TOKEN nextToken = NextToken; 176 | 177 | switch (nextToken) { 178 | case TOKEN.NONE: 179 | return null; 180 | case TOKEN.COMMA: 181 | continue; 182 | case TOKEN.SQUARED_CLOSE: 183 | parsing = false; 184 | break; 185 | default: 186 | object value = ParseByToken(nextToken); 187 | 188 | array.Add(value); 189 | break; 190 | } 191 | } 192 | 193 | return array; 194 | } 195 | 196 | object ParseValue() { 197 | TOKEN nextToken = NextToken; 198 | return ParseByToken(nextToken); 199 | } 200 | 201 | object ParseByToken(TOKEN token) { 202 | 203 | switch (token) { 204 | case TOKEN.STRING: 205 | return ParseString(); 206 | case TOKEN.NUMBER: 207 | return ParseNumber(); 208 | case TOKEN.CURLY_OPEN: 209 | return ParseObject(); 210 | case TOKEN.SQUARED_OPEN: 211 | return ParseArray(); 212 | case TOKEN.TRUE: 213 | return true; 214 | case TOKEN.FALSE: 215 | return false; 216 | case TOKEN.NULL: 217 | return null; 218 | default: 219 | return null; 220 | } 221 | } 222 | 223 | string ParseString() { 224 | StringBuilder s = new StringBuilder(); 225 | char c; 226 | 227 | // ditch opening quote 228 | json.Read(); 229 | 230 | bool parsing = true; 231 | while (parsing) { 232 | 233 | if (json.Peek() == -1) { 234 | parsing = false; 235 | break; 236 | } 237 | 238 | c = NextChar; 239 | switch (c) { 240 | case '"': 241 | parsing = false; 242 | break; 243 | case '\\': 244 | if (json.Peek() == -1) { 245 | parsing = false; 246 | break; 247 | } 248 | 249 | c = NextChar; 250 | switch (c) { 251 | case '"': 252 | case '\\': 253 | case '/': 254 | s.Append(c); 255 | break; 256 | case 'b': 257 | s.Append('\b'); 258 | break; 259 | case 'f': 260 | s.Append('\f'); 261 | break; 262 | case 'n': 263 | s.Append('\n'); 264 | break; 265 | case 'r': 266 | s.Append('\r'); 267 | break; 268 | case 't': 269 | s.Append('\t'); 270 | break; 271 | case 'u': 272 | var hex = new char[4]; 273 | 274 | for (int i=0; i< 4; i++) { 275 | hex[i] = NextChar; 276 | } 277 | 278 | s.Append((char) Convert.ToInt32(new string(hex), 16)); 279 | break; 280 | } 281 | break; 282 | default: 283 | s.Append(c); 284 | break; 285 | } 286 | } 287 | 288 | return s.ToString(); 289 | } 290 | 291 | object ParseNumber() { 292 | string number = NextWord; 293 | 294 | if (number.IndexOf('.') == -1) { 295 | long parsedInt; 296 | Int64.TryParse(number, out parsedInt); 297 | return parsedInt; 298 | } 299 | 300 | double parsedDouble; 301 | Double.TryParse(number, out parsedDouble); 302 | return parsedDouble; 303 | } 304 | 305 | void EatWhitespace() { 306 | while (Char.IsWhiteSpace(PeekChar)) { 307 | json.Read(); 308 | 309 | if (json.Peek() == -1) { 310 | break; 311 | } 312 | } 313 | } 314 | 315 | char PeekChar { 316 | get { 317 | return Convert.ToChar(json.Peek()); 318 | } 319 | } 320 | 321 | char NextChar { 322 | get { 323 | return Convert.ToChar(json.Read()); 324 | } 325 | } 326 | 327 | string NextWord { 328 | get { 329 | StringBuilder word = new StringBuilder(); 330 | 331 | while (!IsWordBreak(PeekChar)) { 332 | word.Append(NextChar); 333 | 334 | if (json.Peek() == -1) { 335 | break; 336 | } 337 | } 338 | 339 | return word.ToString(); 340 | } 341 | } 342 | 343 | TOKEN NextToken { 344 | get { 345 | EatWhitespace(); 346 | 347 | if (json.Peek() == -1) { 348 | return TOKEN.NONE; 349 | } 350 | 351 | switch (PeekChar) { 352 | case '{': 353 | return TOKEN.CURLY_OPEN; 354 | case '}': 355 | json.Read(); 356 | return TOKEN.CURLY_CLOSE; 357 | case '[': 358 | return TOKEN.SQUARED_OPEN; 359 | case ']': 360 | json.Read(); 361 | return TOKEN.SQUARED_CLOSE; 362 | case ',': 363 | json.Read(); 364 | return TOKEN.COMMA; 365 | case '"': 366 | return TOKEN.STRING; 367 | case ':': 368 | return TOKEN.COLON; 369 | case '0': 370 | case '1': 371 | case '2': 372 | case '3': 373 | case '4': 374 | case '5': 375 | case '6': 376 | case '7': 377 | case '8': 378 | case '9': 379 | case '-': 380 | return TOKEN.NUMBER; 381 | } 382 | 383 | switch (NextWord) { 384 | case "false": 385 | return TOKEN.FALSE; 386 | case "true": 387 | return TOKEN.TRUE; 388 | case "null": 389 | return TOKEN.NULL; 390 | } 391 | 392 | return TOKEN.NONE; 393 | } 394 | } 395 | } 396 | 397 | /// 398 | /// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string 399 | /// 400 | /// A Dictionary<string, object> / List<object> 401 | /// A JSON encoded string, or null if object 'json' is not serializable 402 | public static string Serialize(object obj) { 403 | return Serializer.Serialize(obj); 404 | } 405 | 406 | sealed class Serializer { 407 | StringBuilder builder; 408 | 409 | Serializer() { 410 | builder = new StringBuilder(); 411 | } 412 | 413 | public static string Serialize(object obj) { 414 | var instance = new Serializer(); 415 | 416 | instance.SerializeValue(obj); 417 | 418 | return instance.builder.ToString(); 419 | } 420 | 421 | void SerializeValue(object value) { 422 | IList asList; 423 | IDictionary asDict; 424 | string asStr; 425 | 426 | if (value == null) { 427 | builder.Append("null"); 428 | } else if ((asStr = value as string) != null) { 429 | SerializeString(asStr); 430 | } else if (value is bool) { 431 | builder.Append((bool) value ? "true" : "false"); 432 | } else if ((asList = value as IList) != null) { 433 | SerializeArray(asList); 434 | } else if ((asDict = value as IDictionary) != null) { 435 | SerializeObject(asDict); 436 | } else if (value is char) { 437 | SerializeString(new string((char) value, 1)); 438 | } else { 439 | SerializeOther(value); 440 | } 441 | } 442 | 443 | void SerializeObject(IDictionary obj) { 444 | bool first = true; 445 | 446 | builder.Append('{'); 447 | 448 | foreach (object e in obj.Keys) { 449 | if (!first) { 450 | builder.Append(','); 451 | } 452 | 453 | SerializeString(e.ToString()); 454 | builder.Append(':'); 455 | 456 | SerializeValue(obj[e]); 457 | 458 | first = false; 459 | } 460 | 461 | builder.Append('}'); 462 | } 463 | 464 | void SerializeArray(IList anArray) { 465 | builder.Append('['); 466 | 467 | bool first = true; 468 | 469 | foreach (object obj in anArray) { 470 | if (!first) { 471 | builder.Append(','); 472 | } 473 | 474 | SerializeValue(obj); 475 | 476 | first = false; 477 | } 478 | 479 | builder.Append(']'); 480 | } 481 | 482 | void SerializeString(string str) { 483 | builder.Append('\"'); 484 | 485 | char[] charArray = str.ToCharArray(); 486 | foreach (var c in charArray) { 487 | switch (c) { 488 | case '"': 489 | builder.Append("\\\""); 490 | break; 491 | case '\\': 492 | builder.Append("\\\\"); 493 | break; 494 | case '\b': 495 | builder.Append("\\b"); 496 | break; 497 | case '\f': 498 | builder.Append("\\f"); 499 | break; 500 | case '\n': 501 | builder.Append("\\n"); 502 | break; 503 | case '\r': 504 | builder.Append("\\r"); 505 | break; 506 | case '\t': 507 | builder.Append("\\t"); 508 | break; 509 | default: 510 | int codepoint = Convert.ToInt32(c); 511 | if ((codepoint >= 32) && (codepoint <= 126)) { 512 | builder.Append(c); 513 | } else { 514 | builder.Append("\\u"); 515 | builder.Append(codepoint.ToString("x4")); 516 | } 517 | break; 518 | } 519 | } 520 | 521 | builder.Append('\"'); 522 | } 523 | 524 | void SerializeOther(object value) { 525 | // NOTE: decimals lose precision during serialization. 526 | // They always have, I'm just letting you know. 527 | // Previously floats and doubles lost precision too. 528 | if (value is float) { 529 | builder.Append(((float) value).ToString("R")); 530 | } else if (value is int 531 | || value is uint 532 | || value is long 533 | || value is sbyte 534 | || value is byte 535 | || value is short 536 | || value is ushort 537 | || value is ulong) { 538 | builder.Append(value); 539 | } else if (value is double 540 | || value is decimal) { 541 | builder.Append(Convert.ToDouble(value).ToString("R")); 542 | } else { 543 | SerializeString(value.ToString()); 544 | } 545 | } 546 | } 547 | } 548 | } 549 | -------------------------------------------------------------------------------- /Assets/AssetStorePackage/Editor/Heatmaps/Views/HeatmapRendererInspector.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Heat map renderer inspector. 3 | /// 4 | /// This code manages the portion of the inspector that 5 | /// controls the Heat Map renderer. 6 | 7 | using System; 8 | using System.Collections; 9 | using UnityEditor; 10 | using UnityEngine; 11 | using UnityEngine.Video; 12 | using System.Reflection; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | 16 | namespace UnityAnalytics360VideoHeatmap 17 | { 18 | public class HeatmapRendererInspector 19 | { 20 | const string k_Renderer = "UnityAnalyticsHeatmapRenderer"; 21 | 22 | const string k_StartTimeKey = "UnityAnalyticsHeatmapStartTime"; 23 | const string k_EndTimeKey = "UnityAnalyticsHeatmapEndTime"; 24 | const string k_PlaySpeedKey = "UnityAnalyticsHeatmapPlaySpeed"; 25 | 26 | const string k_LowXKey = "UnityAnalyticsHeatmapLowX"; 27 | const string k_HighXKey = "UnityAnalyticsHeatmapHighX"; 28 | const string k_LowYKey = "UnityAnalyticsHeatmapLowY"; 29 | const string k_HighYKey = "UnityAnalyticsHeatmapHighY"; 30 | const string k_LowZKey = "UnityAnalyticsHeatmapLowZ"; 31 | const string k_HighZKey = "UnityAnalyticsHeatmapHighZ"; 32 | 33 | const string k_ShowTipsKey = "UnityAnalyticsHeatmapShowRendererTooltips"; 34 | 35 | const string k_ClipName = "UnityAnalyticsHeatmapClipName"; 36 | 37 | Heatmapper m_Heatmapper; 38 | 39 | int m_MaxTime = -1; 40 | 41 | int m_ClipNameIndex = 0; 42 | Rect m_ClipDropdownRect; 43 | 44 | int m_QualityIndex = 0; 45 | 46 | float m_minRadius = 1.0f; 47 | float m_maxRaidus = 50.0f; 48 | 49 | float m_minDecay = 0.0f; 50 | float m_maxDecay = 1.0f; 51 | 52 | const int k_NoFollow = 0; 53 | const int k_SceneFollow = 1; 54 | const int k_MainCameraFollow = 2; 55 | 56 | GameObject m_GameObject; 57 | VideoRenderer videoRenderer; 58 | 59 | Texture2D darkSkinPlayIcon = Resources.Load("unity_analytics_heatmaps_play_dark") as Texture2D; 60 | Texture2D darkSkinPauseIcon = Resources.Load("unity_analytics_heatmaps_pause_dark") as Texture2D; 61 | Texture2D darkSkinRewindIcon = Resources.Load("unity_analytics_heatmaps_rwd_dark") as Texture2D; 62 | 63 | Texture2D lightSkinPlayIcon = Resources.Load("unity_analytics_heatmaps_play_light") as Texture2D; 64 | Texture2D lightSkinPauseIcon = Resources.Load("unity_analytics_heatmaps_pause_light") as Texture2D; 65 | Texture2D lightSkinRewindIcon = Resources.Load("unity_analytics_heatmaps_rwd_light") as Texture2D; 66 | 67 | GUIContent m_RestartContent; 68 | GUIContent m_PlayContent; 69 | GUIContent m_PauseContent; 70 | 71 | GUIContent m_ClipDropdown = new GUIContent("Video Clip", "Select the video clip Name"); 72 | 73 | GUIContent m_MinRadiusContent = new GUIContent(" Radius"); 74 | GUIContent m_DecayRateContent = new GUIContent(" Decay Rate"); 75 | GUIContent m_FrameContent = new GUIContent(" Frame"); 76 | 77 | GUIContent m_FunnelContent = new GUIContent("Funnel", "Display the player progression"); 78 | public delegate void FunnelDataChangeHandler(Dictionary points); 79 | 80 | public HeatmapRendererInspector() 81 | { 82 | var playIcon = lightSkinPlayIcon; 83 | var pauseIcon = lightSkinPauseIcon; 84 | var rwdIcon = lightSkinRewindIcon; 85 | if (EditorGUIUtility.isProSkin) 86 | { 87 | playIcon = darkSkinPlayIcon; 88 | pauseIcon = darkSkinPauseIcon; 89 | rwdIcon = darkSkinRewindIcon; 90 | } 91 | 92 | m_RestartContent = new GUIContent(rwdIcon, "Back to Start"); 93 | m_PlayContent = new GUIContent(playIcon, "Play"); 94 | m_PauseContent = new GUIContent(pauseIcon, "Pause"); 95 | 96 | HeatmapViewModel.HeatpointsUpdated += SetLimits; 97 | HeatmapViewModel.FinalFrameUpdated += HeatmapViewModel_FinalFrameUpdated; 98 | } 99 | 100 | void HeatmapViewModel_FinalFrameUpdated(int endFrame) 101 | { 102 | m_MaxTime = endFrame; 103 | } 104 | 105 | public static HeatmapRendererInspector Init(Heatmapper heatmapper, HeatmapDataProcessor processor) 106 | { 107 | var inspector = new HeatmapRendererInspector(); 108 | inspector.m_Heatmapper = heatmapper; 109 | return inspector; 110 | } 111 | 112 | int ConvertNormalizedTimeToFrame (float t) 113 | { 114 | if (HeatmapViewModel.videoPlayer != null && HeatmapViewModel.videoPlayer.isPrepared) 115 | return Convert.ToInt32(t * (float)m_MaxTime); 116 | else 117 | return 0; 118 | } 119 | 120 | public void OnGUI() 121 | { 122 | if(m_MaxTime == -1) 123 | { 124 | m_MaxTime = HeatmapViewModel.endFrame; 125 | } 126 | 127 | using (new GUILayout.VerticalScope()) 128 | { 129 | videoRenderer.videoMaterial = EditorGUILayout.ObjectField("Video Material", videoRenderer.videoMaterial, typeof(Material), true) as Material; 130 | 131 | var separators = HeatmapViewModel.GetSeparators(); 132 | 133 | using (new EditorGUILayout.HorizontalScope()) 134 | { 135 | EditorGUILayout.LabelField(m_ClipDropdown, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 136 | m_ClipDropdownRect = EditorGUILayout.BeginVertical(); 137 | EditorGUILayout.LabelField("", EditorStyles.boldLabel); 138 | EditorGUILayout.EndVertical(); 139 | var clipNameSep = separators["clipName"]; 140 | EditorGUI.BeginChangeCheck(); 141 | m_ClipNameIndex = EditorGUI.Popup(m_ClipDropdownRect, m_ClipNameIndex, clipNameSep.separatorValues.ToArray()); 142 | 143 | if (EditorGUI.EndChangeCheck()) 144 | { 145 | clipNameSep.selectedValue = clipNameSep.separatorValues[m_ClipNameIndex]; 146 | HeatmapViewModel.UpdateSeparator("clipName", clipNameSep); 147 | } 148 | } 149 | 150 | EditorGUILayout.LabelField("Render Options", GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 151 | var _player = HeatmapViewModel.videoPlayer; 152 | //Disable render options if the videoplayer hasn't been assigned 153 | EditorGUI.BeginDisabledGroup(_player == null); 154 | using (new EditorGUILayout.VerticalScope()) 155 | { 156 | if (videoRenderer != null) 157 | { 158 | videoRenderer.minRadius = EditorGUILayout.Slider(m_MinRadiusContent, videoRenderer.minRadius, m_minRadius, m_maxRaidus); 159 | videoRenderer.maxRadius = videoRenderer.minRadius; 160 | videoRenderer.decay = EditorGUILayout.Slider(m_DecayRateContent, videoRenderer.decay, m_minDecay, m_maxDecay); 161 | 162 | m_QualityIndex = EditorGUILayout.Popup(" Quality", m_QualityIndex, new string[]{"1X", "2X", "5X"}); 163 | 164 | if (_player != null) 165 | { 166 | int m_HeatMapWidthBase = (int)_player.clip.width / 5; 167 | int m_HeatMapHeightBase = (int)_player.clip.height / 5; 168 | 169 | switch (m_QualityIndex) 170 | { 171 | case 0: 172 | videoRenderer.heatMapWidth = m_HeatMapWidthBase; 173 | videoRenderer.heatMapHeight = m_HeatMapHeightBase; 174 | break; ; 175 | case 1: 176 | videoRenderer.heatMapWidth = m_HeatMapWidthBase * 2; 177 | videoRenderer.heatMapHeight = m_HeatMapHeightBase * 2; 178 | break; 179 | case 2: 180 | videoRenderer.heatMapWidth = m_HeatMapWidthBase * 5; 181 | videoRenderer.heatMapHeight = m_HeatMapHeightBase * 5; 182 | break; 183 | } 184 | } 185 | 186 | videoRenderer.numPoints = EditorGUILayout.IntSlider(" Points", videoRenderer.numPoints, 1, 2000); 187 | videoRenderer.gradientSize = EditorGUILayout.IntSlider(" Gradient Fidelity", videoRenderer.gradientSize, 1, 256); 188 | 189 | 190 | EditorGUI.BeginDisabledGroup(_player != null && _player.isPrepared == false); 191 | if (_player != null) 192 | { 193 | var oldStartTime = ConvertNormalizedTimeToFrame(HeatmapViewModel.heatpointShowStartTime); 194 | var temp = ConvertNormalizedTimeToFrame(HeatmapViewModel.heatpointShowStartTime); 195 | 196 | if(_player.isPlaying) 197 | { 198 | EditorGUI.BeginDisabledGroup(true); 199 | temp = EditorGUILayout.IntSlider(m_FrameContent, Convert.ToInt32(_player.frame), 1, m_MaxTime); 200 | EditorGUI.EndDisabledGroup(); 201 | } 202 | else 203 | { 204 | temp = EditorGUILayout.IntSlider(m_FrameContent, (int)temp, 1, m_MaxTime); 205 | if (temp != oldStartTime) 206 | { 207 | _player.frame = temp; 208 | } 209 | } 210 | if (temp != oldStartTime) 211 | { 212 | HeatmapViewModel.UpdateHeatpointShowTimes(GetNormalizedTime(temp), GetNormalizedTime(temp + 1)); 213 | m_Heatmapper.Repaint(); 214 | } 215 | } 216 | 217 | EditorGUILayout.Space(); 218 | using (new EditorGUILayout.HorizontalScope()) 219 | { 220 | EditorGUILayout.LabelField("", GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 221 | 222 | using (new EditorGUILayout.HorizontalScope()) 223 | { 224 | if (GUILayout.Button(m_RestartContent)) 225 | { 226 | _player.Pause(); 227 | _player.frame = 1; 228 | Restart(); 229 | } 230 | GUIContent playButtonContent = _player != null && _player.isPlaying ? m_PauseContent : m_PlayContent; 231 | if (GUILayout.Button(playButtonContent)) 232 | { 233 | if (_player.isPlaying) 234 | { 235 | _player.Pause(); 236 | } 237 | else 238 | { 239 | _player.Play(); 240 | } 241 | } 242 | } 243 | } 244 | EditorGUI.EndDisabledGroup(); 245 | EditorGUILayout.Space(); 246 | } 247 | } 248 | EditorGUI.EndDisabledGroup(); 249 | DisplayFunnelGui(); 250 | 251 | } 252 | } 253 | 254 | public void SetLimits(Dictionary points) 255 | { 256 | float maxDensity = 0; 257 | 258 | foreach (KeyValuePair entry in points) 259 | { 260 | for (int a = 0; a < entry.Value.Length; a++) 261 | { 262 | maxDensity = Mathf.Max(maxDensity, entry.Value[a].density); 263 | } 264 | } 265 | } 266 | 267 | float GetNormalizedTime(float frameNum) 268 | { 269 | return frameNum / (float)m_MaxTime; 270 | } 271 | 272 | void Restart() 273 | { 274 | HeatmapViewModel.UpdateHeatpointShowTimes(GetNormalizedTime(1), GetNormalizedTime(2)); 275 | } 276 | 277 | public void SetGameObject(GameObject go) 278 | { 279 | m_GameObject = go; 280 | if (m_GameObject != null) 281 | { 282 | videoRenderer = m_GameObject.GetComponent(); 283 | } 284 | } 285 | 286 | public void UpdateClipNameDropDown(string[] clipNames) 287 | { 288 | EditorGUI.BeginChangeCheck(); 289 | m_ClipNameIndex = EditorGUI.Popup(m_ClipDropdownRect, m_ClipNameIndex, clipNames); 290 | 291 | if (EditorGUI.EndChangeCheck()) 292 | { 293 | string m_clipName = clipNames[m_ClipNameIndex]; 294 | 295 | // do something if clip changed 296 | PlayerPrefs.SetString(k_ClipName, m_clipName); 297 | } 298 | } 299 | 300 | void DisplayFunnelGui() 301 | { 302 | using (new EditorGUILayout.HorizontalScope()) 303 | { 304 | EditorGUILayout.LabelField(m_FunnelContent, EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.labelWidth - 4)); 305 | 306 | using (new EditorGUILayout.VerticalScope()) 307 | { 308 | AnimationCurve m_Curve = CreateFunnel(); 309 | EditorGUI.CurveField(EditorGUILayout.GetControlRect(), m_Curve); 310 | var _player = HeatmapViewModel.videoPlayer; 311 | if (_player != null && _player.isPrepared) 312 | { 313 | EditorGUI.BeginDisabledGroup(true); 314 | float _StandardTime = _player.frame / (float)_player.frameCount; 315 | EditorGUILayout.LabelField(string.Format("Total number of players present: {0}", GetPresentPlayer(m_Curve, _StandardTime)), EditorStyles.label); 316 | EditorGUI.EndDisabledGroup(); 317 | } 318 | } 319 | } 320 | if (HeatmapViewModel.GetHeatpointToSessionMapping() == null || HeatmapViewModel.GetHeatpointToSessionMapping().Count() == 0) 321 | { 322 | EditorGUILayout.Space(); 323 | EditorGUILayout.Space(); 324 | EditorGUILayout.HelpBox("There is no data currently to display.", MessageType.Warning); 325 | } 326 | } 327 | 328 | AnimationCurve CreateFunnel() 329 | { 330 | AnimationCurve curve = new AnimationCurve(); 331 | 332 | Dictionary _CountTable = new Dictionary(); 333 | 334 | foreach (KeyValuePair kv in HeatmapViewModel.GetHeatpointToSessionMapping()) 335 | { 336 | for (int i = 0; i < kv.Value.Length; i++) 337 | { 338 | if (_CountTable.ContainsKey(kv.Value[i].time)) 339 | { 340 | _CountTable[kv.Value[i].time] = _CountTable[kv.Value[i].time] + 1; 341 | } 342 | else 343 | { 344 | _CountTable.Add(kv.Value[i].time, 1); 345 | } 346 | } 347 | } 348 | 349 | foreach (float m_time in _CountTable.Keys) 350 | { 351 | curve.AddKey(m_time, _CountTable[m_time]); 352 | } 353 | 354 | return curve; 355 | } 356 | 357 | int GetPresentPlayer(AnimationCurve curve, float time) 358 | { 359 | if (curve.keys.Length == 0) 360 | { 361 | return 0; 362 | } 363 | 364 | if (time > 1f || time < 0f) 365 | { 366 | return 0; 367 | } 368 | 369 | return (int)curve.Evaluate(time); 370 | } 371 | } 372 | } 373 | --------------------------------------------------------------------------------