Skip to content

Commit ee6aef3

Browse files
brnkhyabhishektrip
authored andcommitted
Mid floor calculation bug fix (#968)
* fixes an issue where mid and leftover row height calculations were wrong and caused overlapping polygons * update changelog * Release/v1.4.5 (#974) * master merge (#907) * add class to open settings for app on Android * update AutoSyncScene * fix AutoSyncScene and WorldAlignmentKit prefab * increase desired accuracy * increase desired accuracy * hopefully getting there * Prefab block for configuration window * update worldalignmentprefab * Merge explorer and interactive styled map examples. * images updated * layout, changelog link * Update WorldAlignmentKit prefab + fix reload script to use "update" function. * ar example scene names * Updated `Explorer` scene. * Updated worlsAlignmentKit * Updated working AR scene. * Fix double map initialize issue. * remove extra example scenes * fix merge conflict: PropertyDrawers.meta * prefab body text * update TabletopAR image * Possible fix for worldScale AR * Add namespace for ObjectPool + change Awake to start in Position with LocationProvider * WIP manual sync AR scene * fix broken WorldAlignmentKit.prefab after merge * make debug paths thicker * Add missing namespaces. * Missing namespace. * Manual World Alignment scene and prefab * fix broken meta file * Update scenes. * Update version to 1.4.0 * Scene cleanup - delete old examples * Fix wrong unwrapped tile id * Possible fix for Configuration window `NullReference` * remove Android pre-build checks for duplicate libraries (#574) * WorldAlignmentKit prefab: remove layer 'Map' from culling mask of Main Camera * move UniAndroidPermission to PlugIns folder * add sub-assets in scenelists via editor (#586) * Moved editor files to Assets/Mapbox/Unity/Editor * Delete moved files - Atlas Generator & scriptable Palette UI * Added Mapbox.Editor namespace, converted spaces to tabs. * Fix compile errors related to meta files. * Cleanup tooltip text. * Fix Warnings. * Update scenes. * Cleanup warnings - pass 2. * Cleanup warnings pass 3. * Update ScenesList.cs * Fix typecast error on filters + filter Pois labels based on localRank. * Add Update method to RangeTileProvider. * Update PathHelpers.cs * Change explorer to Data Explorer, clean unused assets. * fix duplicate buildings in WorldScaleAR-ManualAlignment * silence remaining warnings * Fix screenshot name for explorer, add initialization to elevationLayerProperties as a defensive fix. * Fix typo * Fix build error, turn vector layer off for Globe example, Add build settings. * Config window 1.4 (#587) * add sub-assets in scenelists via editor * assign default value to MapboxConfiguration's token status * Change camera for city simulator scene. * fix RasterTileExample * fix VoxelMap * Fix finished status not getting fired event for globe example. * silence another warning and remove unused using * make TileErrorHandler work with new AbstractMap * Fixes for RC3 * Renamed TabletopARKit prefab to ARTableTop * Turn off initializeOnStart for LocationBasedGame prefab. * Defensive fix for crash on iOS. * Fix for missing features - Add property in vectorsublayerproperties to clip features at tile boundary. * Change scene & prefab with clip at tile boundary setting. * Fix NRE's on inspectors for scriptable objects in sharedmodules. * Remove new from LocationProvider prefab name in LocationBasedGame prefab * Asset file cleanup * Trigger finished status for tiles that error out. * Fix flat terrain factory editor. * remove inital wait for GPS on DeviceLocationProvider start. Implement 'IsLocationServiceEnabled' property on 'Location' and send one Location event when location services are not enabled or failed to start in time. * Fix issue with prefab modifier where removing the `IFeaturePropertySettable` was not setting transforms for prefabs. * Make Modifiers & map selectable from node editor, change mismatching button style. * add 'IsLocationServiceInitializing' to 'Location.cs'. Expose that info in the LocationBasedGame scene * Add all layers from explorer v130 example (most layers turned off) * Make foldouts static. * Update scenelist. * move misplaced `link.xml` into MapboxAR subfolder * Remove interaction from DataExplorer scene, Added a new scene for interaction. * Turn buildings on in Data Explorer :) * Scale the canvas to fit the screen. * Change zoomSpeed = 0, merge building layers. * Update formatting of playground scenes, enable camera for data explorer. * Tweaks to scenes for performance & formatting. * Finally turn on the camera movement script on DataExplorer * Fix scaling in y for map & unity tile. Add script to keep camera above terrain for zoomable map. * Update buildingswithUniqueIds property. * Add prerequisite info for AR scenes. * work around crashes on iOS with escaped characters in the URL * Fix height data query. * Add missing using UnityEngine. * Update example descriptions * Disable SetCameraHeight script + add method to query height in unity units. * Update zoomable map scene to not have setCameraHeight * Remove replacing text with latlong for geocode response. * Fix formatting * Remove DirectionsQuery * Update project version * Add event system to CitySimulator scene + filter mouse events on search UI. * Format main scene UI. * another fix for URL encoding for iOS * Update changelog * Make filter values case - insensitive. (#632) * Make filter values case - insensitive. * Add checks to remove white spaces & empty entries. * Actually fix the issue :( * Fix tile position issue with vector features. Remove option when features are grouped. (#629) * Change file folder names (#635) * Remove folder with bad name. * Change name of folder to MapboxStyles instead of MapBoxStyles * Fix range height extrusion (#613) * Fix range height extrusion mesh generation. * Add extrusion scale factor to multiply height values when extruding geometry. * Update Changelog. * Add missing tooltips. * Don't clip min height for RangeHeight Extrusion option. * Add warning if max height is less than min height. Also, add error message and swap values in code * Collider Dropdown in Abstract Map for adding colliders on top of extruded geometry (#637) * wip * Geometry options drawer modified * collider options added * changed order of the collider options * dots * tooltips added * adding changes to tooltips * Playmode tests (#628) * [wip] PlayMode tests * playmode tests: try with copying files via MapboxDev menu * remove external test project * rename test files to follow naming convention * swtich from FileUtil.Copy/Delete to AssetDatabase.Copy/Delete * fix directions tests * try custom global MAPBOX_PLAYMODE_TESTS define in msc.rsp * remove mcs.rsp * change access modifiers on Directions, Geocoder and TileResource to make them available in EditorMode tests * enable more tests for PlayMode tests * some fixes for OSX and iOS * disbale Request.Cancel test for iOS and Android as results are not cosistent * HACK: workaround to make ForwardGeocode tests pass on iOS * more iOS fixing * add feature collections and kdtree collection (#565) * add feature collections and kdtree collection * Add namespaces to new files. * change InteractiveStyledVectorMap.unity to include a feature collection and query script * change scene objects * add missing highlight buildings script * Remove duplicate file * Updated changelog. * Ui fixes (#643) * Fix foldouts not retaining states between play mode & editor. * Don't allow empty names for layer visualizers. * Add defaults for all sublayer properties to not carry over any options from the previous layer. * Add missing tooltips. * Fix indentation. * Update tooltip for Extent Type. * Add tooltips for prefix labels for dropdowns. * Change `Style Name` to `Data Source` * Fix typo in colorPalette. * Selected newly created layer visualizer. * Update scenes with missing ScriptablePalette. * Update tooltip for min/max height extrusion. * Updated scene. * Update tooltip of sampleCount * Update scene after merge with develop * Fix scene, indentation for collider type. * Update scene with collider options. * [publish docs] (#652) * Add camera table top ar (#614) * Change RangeAroundTransformTile Provider to use the new API. * Add sample camera script for pan & zoom . * Update scene to use the new camera script. * Add reposition tile logic to RangeAroundTransformTileProvider. * Add method to click and get latlong under the mouse. * Added relative panning from camera * removed unnecessary line of code * Quick fix for panning speed * Clean up script and scene. * Update Changelog * Fix satellite imagery on roof not working. (#638) * Fix satellite imagery on roof not working. * Remove commented code. * Update changelog * Disable buildingsWithUniqueIds setting for MapboxStreets data source. (#655) * Added workaround to prevent users from accidentally turning on filtering for MapboxStreets building. * Update changelog * Disable InitializeOnStart when `InitializeWithLocationProvider` is used. (#656) * Disable initialize on start for AR cases. * Add check to make sure map is initialized before updating tiles. * Updated changelog * Updated manual synchornization example scene (#636) * updated manual synchornization example scene * Update TouchCamera.cs Uncommented line at 38. * added hint text to ManualSyncScene * fixed namespaces & moved scripts to new folder * updated scene & made a new manual aligment prefab * added namespace to UpdateMapPosByARPlaneY.cs * Changed map update to correct method. * Update ProjectSettings. * Release/v1.4.1 (#682) (#684) * Fix to properly show Mesh & GO modifiers in the UI * Add UI for removing/combining filters * Break classes into separate files, remove MapAPI wrapper. UnifiedMap takes over the functionality. Fix bug with filters * Add new prefabs for LocationBasedGame and CitySim * Fixes loadingPanel script to work with UnifiedMap * Trigger finished state when no vector layer is turned off. * Fix mapId for Satellite & satellite-streets * update PR template * Update UI to match design - round 1 * Add new data containers * Enable loading external configurations - take 2 (#552) * carry over changes from https://github.com/mapbox/mapbox-unity-sdk/pull/352 to latest develop * Fix the merge typo. * Integrate mapbox-ar-unity (#544) * add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff. * Update prefabs & scene * Add defaults options + linewidth parameter. * Add mockup for Presets UI * Adding tooltips for General, Image & Terrain sections. * Fix extra space in Terrain UI. * [WIP] Remove old map files, rename UnifiedMap to AbstractMap - working towards clean merge. * [WIP] Replace old VectorTileFactory with refactored ( VectorTileFactoryNew gets renamed) * add kalman comment * appveyor: don't use PowerShell to download docfx * Fix typo in terrain source. * New textures/materials for default building style * Merge StyleOptimizedVectorTileFactory functionality into VectorTileFactory * Updated settings to TextureSideWall * VectorLayerVisualizer refactor. * Hookup node editor with Plug & play refactor. * Add tooltips for vector section. * Add missing changes to VectorTIle.cs * add QueryTerrainHeight function to AbstractMap (#571) Looks good. * try with GPS position/heading, ignoring AR and bias * Fix compile error related to return type. (#572) minor change. * Added a API call to query height Added a API call on AbstractMap to query height at a certain latitude longitude. * Add preset defaults switching + snapMaptoZero hookup. * Changes to MapEditor. * Add code comments for LatitudeLongitudeToTileId change. (#573) * Fix compile error related to return type. * update code comments * Layer Visualizer for Building Ids (#502) * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * Uv mapping (#503) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * add a 8 building texture atlas * add new texture from random google images * fix a bug where bottomOfMidUv was calculated wrong * Fix formatting. * Add atlas texturing modifier into Plug & play UI. * Remove presets from map * work on DeviceLocationProvider, AutomaticSyncScene: size of player shows hdop, remove some debug statements * Add parameters to hookup Globe terrain factory. * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Set defaults for all properties * Add API calls for layers * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Add custom option to primitive type - for fully custom modifier stack. * Hook up scriptable palette with P&P * Add code comments to Abstract Map. * Cleanup unused stuff. * Fixed private field naming to meet code style requirements. * Fix indentation * Adds ability to add custom tile providers. * more checks if access token is set (#564) * Style development - colorization and atlas template generator (#579) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * add a 8 building texture atlas * add new texture from random google images * add roof uv & atlas support * test textures for styling development * add missing constant Vector3Right * fix materials in mat modifier * fix atlas info object * Removed unused properties from shader * New textures/materials for default building style * Updated settings to TextureSideWall * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Fixed private field naming to meet code style requirements. * Fix indentation * log GPS timestamp once more * Cleanup + update prefabs & UI. * Fixes atlas textures bug, UI bug and creates city sim prefab with textured buildings. * Add building Id tileset as default, fix minor issues. * Update map prefab with default style * Fix to trigger finished state on VectorTileFactory. * Add loading texture, build locationProvider example , fix bug with imagery init. * Update Camera script to work with new map, LocationBasedGame prefab uses camerabounds by default. * Code cleanup - move drawers into their own files. * Code Cleanup. Arrange files into folders. * Foldouts don't forget what they were told to do ;) * Fixed null ref error on MapboxStylesColorModifier; class now null checks m_scriptablePalette on Initialize and Run, and returns if object is null. Cleanup up names in Scriptable Palette Editor to make inspector look slightly cleaner. * Update ARTabletop scene. * updated Clip/Box shader (#580) * updated shader * fix indentation * fixed indent * Recreate ZoomableMap and Globe with new Plug and Play functionality (#585) * created clip shaders for stylized map * Fix errors from meta files. * Add TabletopARkit prefab. * fix missing tangents bug. * Set Relative height = false as default. * Fix issue with final state not being triggered when image factory was disabled. * add UniAndroidPermission * DeviceLocationProvider: request runtime location permissions on Android * add class to open settings for app on Android * update AutoSyncScene * fix AutoSyncScene and WorldAlignmentKit prefab * increase desired accuracy * increase desired accuracy * hopefully getting there * Prefab block for configuration window * update worldalignmentprefab * Merge explorer and interactive styled map examples. * images updated * layout, changelog link * Update WorldAlignmentKit prefab + fix reload script to use "update" function. * ar example scene names * Updated `Explorer` scene. * Updated worlsAlignmentKit * Updated working AR scene. * Fix double map initialize issue. * remove extra example scenes * fix merge conflict: PropertyDrawers.meta * prefab body text * update TabletopAR image * Possible fix for worldScale AR * Add namespace for ObjectPool + change Awake to start in Position with LocationProvider * WIP manual sync AR scene * fix broken WorldAlignmentKit.prefab after merge * make debug paths thicker * Add missing namespaces. * Missing namespace. * Manual World Alignment scene and prefab * fix broken meta file * Update scenes. * Update version to 1.4.0 * Scene cleanup - delete old examples * Fix wrong unwrapped tile id * Possible fix for Configuration window `NullReference` * remove Android pre-build checks for duplicate libraries (#574) * WorldAlignmentKit prefab: remove layer 'Map' from culling mask of Main Camera * move UniAndroidPermission to PlugIns folder * add sub-assets in scenelists via editor (#586) * Moved editor files to Assets/Mapbox/Unity/Editor * Delete moved files - Atlas Generator & scriptable Palette UI * Added Mapbox.Editor namespace, converted spaces to tabs. * Fix compile errors related to meta files. * Cleanup tooltip text. * Fix Warnings. * Update scenes. * Cleanup warnings - pass 2. * Cleanup warnings pass 3. * Update ScenesList.cs * Fix typecast error on filters + filter Pois labels based on localRank. * Add Update method to RangeTileProvider. * Update PathHelpers.cs * Change explorer to Data Explorer, clean unused assets. * fix duplicate buildings in WorldScaleAR-ManualAlignment * silence remaining warnings * Fix screenshot name for explorer, add initialization to elevationLayerProperties as a defensive fix. * Fix typo * Fix build error, turn vector layer off for Globe example, Add build settings. * Config window 1.4 (#587) * add sub-assets in scenelists via editor * assign default value to MapboxConfiguration's token status * Change camera for city simulator scene. * fix RasterTileExample * fix VoxelMap * Fix finished status not getting fired event for globe example. * silence another warning and remove unused using * make TileErrorHandler work with new AbstractMap * Fixes for RC3 * Renamed TabletopARKit prefab to ARTableTop * Turn off initializeOnStart for LocationBasedGame prefab. * Defensive fix for crash on iOS. * Fix for missing features - Add property in vectorsublayerproperties to clip features at tile boundary. * Change scene & prefab with clip at tile boundary setting. * Fix NRE's on inspectors for scriptable objects in sharedmodules. * Remove new from LocationProvider prefab name in LocationBasedGame prefab * Asset file cleanup * Trigger finished status for tiles that error out. * Fix flat terrain factory editor. * remove inital wait for GPS on DeviceLocationProvider start. Implement 'IsLocationServiceEnabled' property on 'Location' and send one Location event when location services are not enabled or failed to start in time. * Fix issue with prefab modifier where removing the `IFeaturePropertySettable` was not setting transforms for prefabs. * Make Modifiers & map selectable from node editor, change mismatching button style. * add 'IsLocationServiceInitializing' to 'Location.cs'. Expose that info in the LocationBasedGame scene * Add all layers from explorer v130 example (most layers turned off) * Make foldouts static. * Update scenelist. * move misplaced `link.xml` into MapboxAR subfolder * Remove interaction from DataExplorer scene, Added a new scene for interaction. * Turn buildings on in Data Explorer :) * Scale the canvas to fit the screen. * Change zoomSpeed = 0, merge building layers. * Update formatting of playground scenes, enable camera for data explorer. * Tweaks to scenes for performance & formatting. * Finally turn on the camera movement script on DataExplorer * Fix scaling in y for map & unity tile. Add script to keep camera above terrain for zoomable map. * Update buildingswithUniqueIds property. * Add prerequisite info for AR scenes. * work around crashes on iOS with escaped characters in the URL * Fix height data query. * Add missing using UnityEngine. * Update example descriptions * Disable SetCameraHeight script + add method to query height in unity units. * Update zoomable map scene to not have setCameraHeight * Remove replacing text with latlong for geocode response. * Fix formatting * Remove DirectionsQuery * Update project version * Add event system to CitySimulator scene + filter mouse events on search UI. * Format main scene UI. * another fix for URL encoding for iOS * Update changelog * Make filter values case - insensitive. (#632) * Make filter values case - insensitive. * Add checks to remove white spaces & empty entries. * Actually fix the issue :( * Fix tile position issue with vector features. Remove option when features are grouped. (#629) * Change file folder names (#635) * Remove folder with bad name. * Change name of folder to MapboxStyles instead of MapBoxStyles * Fix range height extrusion (#613) * Fix range height extrusion mesh generation. * Add extrusion scale factor to multiply height values when extruding geometry. * Update Changelog. * Add missing tooltips. * Don't clip min height for RangeHeight Extrusion option. * Add warning if max height is less than min height. Also, add error message and swap values in code * Collider Dropdown in Abstract Map for adding colliders on top of extruded geometry (#637) * wip * Geometry options drawer modified * collider options added * changed order of the collider options * dots * tooltips added * adding changes to tooltips * Playmode tests (#628) * [wip] PlayMode tests * playmode tests: try with copying files via MapboxDev menu * remove external test project * rename test files to follow naming convention * swtich from FileUtil.Copy/Delete to AssetDatabase.Copy/Delete * fix directions tests * try custom global MAPBOX_PLAYMODE_TESTS define in msc.rsp * remove mcs.rsp * change access modifiers on Directions, Geocoder and TileResource to make them available in EditorMode tests * enable more tests for PlayMode tests * some fixes for OSX and iOS * disbale Request.Cancel test for iOS and Android as results are not cosistent * HACK: workaround to make ForwardGeocode tests pass on iOS * more iOS fixing * add feature collections and kdtree collection (#565) * add feature collections and kdtree collection * Add namespaces to new files. * change InteractiveStyledVectorMap.unity to include a feature collection and query script * change scene objects * add missing highlight buildings script * Remove duplicate file * Updated changelog. * Ui fixes (#643) * Fix foldouts not retaining states between play mode & editor. * Don't allow empty names for layer visualizers. * Add defaults for all sublayer properties to not carry over any options from the previous layer. * Add missing tooltips. * Fix indentation. * Update tooltip for Extent Type. * Add tooltips for prefix labels for dropdowns. * Change `Style Name` to `Data Source` * Fix typo in colorPalette. * Selected newly created layer visualizer. * Update scenes with missing ScriptablePalette. * Update tooltip for min/max height extrusion. * Updated scene. * Update tooltip of sampleCount * Update scene after merge with develop * Fix scene, indentation for collider type. * Update scene with collider options. * [publish docs] (#652) * Add camera table top ar (#614) * Change RangeAroundTransformTile Provider to use the new API. * Add sample camera script for pan & zoom . * Update scene to use the new camera script. * Add reposition tile logic to RangeAroundTransformTileProvider. * Add method to click and get latlong under the mouse. * Added relative panning from camera * removed unnecessary line of code * Quick fix for panning speed * Clean up script and scene. * Update Changelog * Fix satellite imagery on roof not working. (#638) * Fix satellite imagery on roof not working. * Remove commented code. * Update changelog * Disable buildingsWithUniqueIds setting for MapboxStreets data source. (#655) * Added workaround to prevent users from accidentally turning on filtering for MapboxStreets building. * Update changelog * Disable InitializeOnStart when `InitializeWithLocationProvider` is used. (#656) * Disable initialize on start for AR cases. * Add check to make sure map is initialized before updating tiles. * Updated changelog * Updated manual synchornization example scene (#636) * updated manual synchornization example scene * Update TouchCamera.cs Uncommented line at 38. * added hint text to ManualSyncScene * fixed namespaces & moved scripts to new folder * updated scene & made a new manual aligment prefab * added namespace to UpdateMapPosByARPlaneY.cs * Changed map update to correct method. * Update ProjectSettings. * Updated version number +scenelist * Update scene to show ObjectInspector panel again. * fix a bug in LayerPropertyIsEqualFilterComparer (#662) * fix a bug in LayerPropertyIsEqualFilterComparer where it does <= instead of == (fixes #660) * Simplified expression. * Fix incorrect editor culture handling on some locales (#658) (#659) Geocode coordinates are now converted with InvariantCulture, which makes sure they do not depend on the locale of the computer being used. * Set scaleFactor = 1 in property drawer. (#665) * Fix custom mapid (#666) * Fix custom mapId being overridden by empty string. * Add missing reference * removed error messages from manual touch script (#667) * Fix scaling for world scale when zoom level was changed. (#668) * Update worldscale AR scene - fix ARDelta not registering. * fix a bug where SpawnInsideModifier getting stuck in infinite loop (#676) * fix a bug where SpawnInsideModifier getting stuck in infinite loop * Update changelog * Remove duplicate scene. * Make internal method private. * Update Image settings to use retina & mip map * Add BuildingsWithUniqueIds checkbox back. * Update changelog & license. * Update scene. * Release/v1.4.1 (#682) (#683) * Fix to properly show Mesh & GO modifiers in the UI * Add UI for removing/combining filters * Break classes into separate files, remove MapAPI wrapper. UnifiedMap takes over the functionality. Fix bug with filters * Add new prefabs for LocationBasedGame and CitySim * Fixes loadingPanel script to work with UnifiedMap * Trigger finished state when no vector layer is turned off. * Fix mapId for Satellite & satellite-streets * update PR template * Update UI to match design - round 1 * Add new data containers * Enable loading external configurations - take 2 (#552) * carry over changes from https://github.com/mapbox/mapbox-unity-sdk/pull/352 to latest develop * Fix the merge typo. * Integrate mapbox-ar-unity (#544) * add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff. * Update prefabs & scene * Add defaults options + linewidth parameter. * Add mockup for Presets UI * Adding tooltips for General, Image & Terrain sections. * Fix extra space in Terrain UI. * [WIP] Remove old map files, rename UnifiedMap to AbstractMap - working towards clean merge. * [WIP] Replace old VectorTileFactory with refactored ( VectorTileFactoryNew gets renamed) * add kalman comment * appveyor: don't use PowerShell to download docfx * Fix typo in terrain source. * New textures/materials for default building style * Merge StyleOptimizedVectorTileFactory functionality into VectorTileFactory * Updated settings to TextureSideWall * VectorLayerVisualizer refactor. * Hookup node editor with Plug & play refactor. * Add tooltips for vector section. * Add missing changes to VectorTIle.cs * add QueryTerrainHeight function to AbstractMap (#571) Looks good. * try with GPS position/heading, ignoring AR and bias * Fix compile error related to return type. (#572) minor change. * Added a API call to query height Added a API call on AbstractMap to query height at a certain latitude longitude. * Add preset defaults switching + snapMaptoZero hookup. * Changes to MapEditor. * Add code comments for LatitudeLongitudeToTileId change. (#573) * Fix compile error related to return type. * update code comments * Layer Visualizer for Building Ids (#502) * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * Uv mapping (#503) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * add a 8 building texture atlas * add new texture from random google images * fix a bug where bottomOfMidUv was calculated wrong * Fix formatting. * Add atlas texturing modifier into Plug & play UI. * Remove presets from map * work on DeviceLocationProvider, AutomaticSyncScene: size of player shows hdop, remove some debug statements * Add parameters to hookup Globe terrain factory. * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Set defaults for all properties * Add API calls for layers * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Add custom option to primitive type - for fully custom modifier stack. * Hook up scriptable palette with P&P * Add code comments to Abstract Map. * Cleanup unused stuff. * Fixed private field naming to meet code style requirements. * Fix indentation * Adds ability to add custom tile providers. * more checks if access token is set (#564) * Style development - colorization and atlas template generator (#579) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * add a 8 building texture atlas * add new texture from random google images * add roof uv & atlas support * test textures for styling development * add missing constant Vector3Right * fix materials in mat modifier * fix atlas info object * Removed unused properties from shader * New textures/materials for default building style * Updated settings to TextureSideWall * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Fixed private field naming to meet code style requirements. * Fix indentation * log GPS timestamp once more * Cleanup + update prefabs & UI. * Fixes atlas textures bug, UI bug and creates city sim prefab with textured buildings. * Add building Id tileset as default, fix minor issues. * Update map prefab with default style * Fix to trigger finished state on VectorTileFactory. * Add loading texture, build locationProvider example , fix bug with imagery init. * Update Camera script to work with new map, LocationBasedGame prefab uses camerabounds by default. * Code cleanup - move drawers into their own files. * Code Cleanup. Arrange files into folders. * Foldouts don't forget what they were told to do ;) * Fixed null ref error on MapboxStylesColorModifier; class now null checks m_scriptablePalette on Initialize and Run, and returns if object is null. Cleanup up names in Scriptable Palette Editor to make inspector look slightly cleaner. * Update ARTabletop scene. * updated Clip/Box shader (#580) * updated shader * fix indentation * fixed indent * Recreate ZoomableMap and Globe with new Plug and Play functionality (#585) * created clip shaders for stylized map * Fix errors from meta files. * Add TabletopARkit prefab. * fix missing tangents bug. * Set Relative height = false as default. * Fix issue with final state not being triggered when image factory was disabled. * add UniAndroidPermission * DeviceLocationProvider: request runtime location permissions on Android * add class to open settings for app on Android * update AutoSyncScene * fix AutoSyncScene and WorldAlignmentKit prefab * increase desired accuracy * increase desired accuracy * hopefully getting there * Prefab block for configuration window * update worldalignmentprefab * Merge explorer and interactive styled map examples. * images updated * layout, changelog link * Update WorldAlignmentKit prefab + fix reload script to use "update" function. * ar example scene names * Updated `Explorer` scene. * Updated worlsAlignmentKit * Updated working AR scene. * Fix double map initialize issue. * remove extra example scenes * fix merge conflict: PropertyDrawers.meta * prefab body text * update TabletopAR image * Possible fix for worldScale AR * Add namespace for ObjectPool + change Awake to start in Position with LocationProvider * WIP manual sync AR scene * fix broken WorldAlignmentKit.prefab after merge * make debug paths thicker * Add missing namespaces. * Missing namespace. * Manual World Alignment scene and prefab * fix broken meta file * Update scenes. * Update version to 1.4.0 * Scene cleanup - delete old examples * Fix wrong unwrapped tile id * Possible fix for Configuration window `NullReference` * remove Android pre-build checks for duplicate libraries (#574) * WorldAlignmentKit prefab: remove layer 'Map' from culling mask of Main Camera * move UniAndroidPermission to PlugIns folder * add sub-assets in scenelists via editor (#586) * Moved editor files to Assets/Mapbox/Unity/Editor * Delete moved files - Atlas Generator & scriptable Palette UI * Added Mapbox.Editor namespace, converted spaces to tabs. * Fix compile errors related to meta files. * Cleanup tooltip text. * Fix Warnings. * Update scenes. * Cleanup warnings - pass 2. * Cleanup warnings pass 3. * Update ScenesList.cs * Fix typecast error on filters + filter Pois labels based on localRank. * Add Update method to RangeTileProvider. * Update PathHelpers.cs * Change explorer to Data Explorer, clean unused assets. * fix duplicate buildings in WorldScaleAR-ManualAlignment * silence remaining warnings * Fix screenshot name for explorer, add initialization to elevationLayerProperties as a defensive fix. * Fix typo * Fix build error, turn vector layer off for Globe example, Add build settings. * Config window 1.4 (#587) * add sub-assets in scenelists via editor * assign default value to MapboxConfiguration's token status * Change camera for city simulator scene. * fix RasterTileExample * fix VoxelMap * Fix finished status not getting fired event for globe example. * silence another warning and remove unused using * make TileErrorHandler work with new AbstractMap * Fixes for RC3 * Renamed TabletopARKit prefab to ARTableTop * Turn off initializeOnStart for LocationBasedGame prefab. * Defensive fix for crash on iOS. * Fix for missing features - Add property in vectorsublayerproperties to clip features at tile boundary. * Change scene & prefab with clip at tile boundary setting. * Fix NRE's on inspectors for scriptable objects in sharedmodules. * Remove new from LocationProvider prefab name in LocationBasedGame prefab * Asset file cleanup * Trigger finished status for tiles that error out. * Fix flat terrain factory editor. * remove inital wait for GPS on DeviceLocationProvider start. Implement 'IsLocationServiceEnabled' property on 'Location' and send one Location event when location services are not enabled or failed to start in time. * Fix issue with prefab modifier where removing the `IFeaturePropertySettable` was not setting transforms for prefabs. * Make Modifiers & map selectable from node editor, change mismatching button style. * add 'IsLocationServiceInitializing' to 'Location.cs'. Expose that info in the LocationBasedGame scene * Add all layers from explorer v130 example (most layers turned off) * Make foldouts static. * Update scenelist. * move misplaced `link.xml` into MapboxAR subfolder * Remove interaction from DataExplorer scene, Added a new scene for interaction. * Turn buildings on in Data Explorer :) * Scale the canvas to fit the screen. * Change zoomSpeed = 0, merge building layers. * Update formatting of playground scenes, enable camera for data explorer. * Tweaks to scenes for performance & formatting. * Finally turn on the camera movement script on DataExplorer * Fix scaling in y for map & unity tile. Add script to keep camera above terrain for zoomable map. * Update buildingswithUniqueIds property. * Add prerequisite info for AR scenes. * work around crashes on iOS with escaped characters in the URL * Fix height data query. * Add missing using UnityEngine. * Update example descriptions * Disable SetCameraHeight script + add method to query height in unity units. * Update zoomable map scene to not have setCameraHeight * Remove replacing text with latlong for geocode response. * Fix formatting * Remove DirectionsQuery * Update project version * Add event system to CitySimulator scene + filter mouse events on search UI. * Format main scene UI. * another fix for URL encoding for iOS * Update changelog * Make filter values case - insensitive. (#632) * Make filter values case - insensitive. * Add checks to remove white spaces & empty entries. * Actually fix the issue :( * Fix tile position issue with vector features. Remove option when features are grouped. (#629) * Change file folder names (#635) * Remove folder with bad name. * Change name of folder to MapboxStyles instead of MapBoxStyles * Fix range height extrusion (#613) * Fix range height extrusion mesh generation. * Add extrusion scale factor to multiply height values when extruding geometry. * Update Changelog. * Add missing tooltips. * Don't clip min height for RangeHeight Extrusion option. * Add warning if max height is less than min height. Also, add error message and swap values in code * Collider Dropdown in Abstract Map for adding colliders on top of extruded geometry (#637) * wip * Geometry options drawer modified * collider options added * changed order of the collider options * dots * tooltips added * adding changes to tooltips * Playmode tests (#628) * [wip] PlayMode tests * playmode tests: try with copying files via MapboxDev menu * remove external test project * rename test files to follow naming convention * swtich from FileUtil.Copy/Delete to AssetDatabase.Copy/Delete * fix directions tests * try custom global MAPBOX_PLAYMODE_TESTS define in msc.rsp * remove mcs.rsp * change access modifiers on Directions, Geocoder and TileResource to make them available in EditorMode tests * enable more tests for PlayMode tests * some fixes for OSX and iOS * disbale Request.Cancel test for iOS and Android as results are not cosistent * HACK: workaround to make ForwardGeocode tests pass on iOS * more iOS fixing * add feature collections and kdtree collection (#565) * add feature collections and kdtree collection * Add namespaces to new files. * change InteractiveStyledVectorMap.unity to include a feature collection and query script * change scene objects * add missing highlight buildings script * Remove duplicate file * Updated changelog. * Ui fixes (#643) * Fix foldouts not retaining states between play mode & editor. * Don't allow empty names for layer visualizers. * Add defaults for all sublayer properties to not carry over any options from the previous layer. * Add missing tooltips. * Fix indentation. * Update tooltip for Extent Type. * Add tooltips for prefix labels for dropdowns. * Change `Style Name` to `Data Source` * Fix typo in colorPalette. * Selected newly created layer visualizer. * Update scenes with missing ScriptablePalette. * Update tooltip for min/max height extrusion. * Updated scene. * Update tooltip of sampleCount * Update scene after merge with develop * Fix scene, indentation for collider type. * Update scene with collider options. * [publish docs] (#652) * Add camera table top ar (#614) * Change RangeAroundTransformTile Provider to use the new API. * Add sample camera script for pan & zoom . * Update scene to use the new camera script. * Add reposition tile logic to RangeAroundTransformTileProvider. * Add method to click and get latlong under the mouse. * Added relative panning from camera * removed unnecessary line of code * Quick fix for panning speed * Clean up script and scene. * Update Changelog * Fix satellite imagery on roof not working. (#638) * Fix satellite imagery on roof not working. * Remove commented code. * Update changelog * Disable buildingsWithUniqueIds setting for MapboxStreets data source. (#655) * Added workaround to prevent users from accidentally turning on filtering for MapboxStreets building. * Update changelog * Disable InitializeOnStart when `InitializeWithLocationProvider` is used. (#656) * Disable initialize on start for AR cases. * Add check to make sure map is initialized before updating tiles. * Updated changelog * Updated manual synchornization example scene (#636) * updated manual synchornization example scene * Update TouchCamera.cs Uncommented line at 38. * added hint text to ManualSyncScene * fixed namespaces & moved scripts to new folder * updated scene & made a new manual aligment prefab * added namespace to UpdateMapPosByARPlaneY.cs * Changed map update to correct method. * Update ProjectSettings. * Updated version number +scenelist * Update scene to show ObjectInspector panel again. * fix a bug in LayerPropertyIsEqualFilterComparer (#662) * fix a bug in LayerPropertyIsEqualFilterComparer where it does <= instead of == (fixes #660) * Simplified expression. * Fix incorrect editor culture handling on some locales (#658) (#659) Geocode coordinates are now converted with InvariantCulture, which makes sure they do not depend on the locale of the computer being used. * Set scaleFactor = 1 in property drawer. (#665) * Fix custom mapid (#666) * Fix custom mapId being overridden by empty string. * Add missing reference * removed error messages from manual touch script (#667) * Fix scaling for world scale when zoom level was changed. (#668) * Update worldscale AR scene - fix ARDelta not registering. * fix a bug where SpawnInsideModifier getting stuck in infinite loop (#676) * fix a bug where SpawnInsideModifier getting stuck in infinite loop * Update changelog * Remove duplicate scene. * Make internal method private. * Update Image settings to use retina & mip map * Add BuildingsWithUniqueIds checkbox back. * Update changelog & license. * Update scene. * Update ISSUE_TEMPLATE.md (#694) add * Scripting Runtime Version: * Scripting Backend: * Api Compatibility Level: * Add onUpdated event to the map. (#704) * Add onUpdated event to the map. Fix Directions Factory to use the onUpdated event. * Add code comments * Update changelog * Update to latest ARInterface (#699) * update to latest https://github.com/Unity-Technologies/experimental-ARInterface * Poi locations (#716) * Updated version number +scenelist * Update scene to show ObjectInspector panel again. * fix a bug in LayerPropertyIsEqualFilterComparer (#662) * fix a bug in LayerPropertyIsEqualFilterComparer where it does <= instead of == (fixes #660) * Simplified expression. * Fix incorrect editor culture handling on some locales (#658) (#659) Geocode coordinates are now converted with InvariantCulture, which makes sure they do not depend on the locale of the computer being used. * Set scaleFactor = 1 in property drawer. (#665) * Fix custom mapid (#666) * Fix custom mapId being overridden by empty string. * Add missing reference * removed error messages from manual touch script (#667) * config done * sorted the working of the class based on the concatenation check * Fix scaling for world scale when zoom level was changed. * Fix scaling for world scale when zoom level was changed. (#668) * tree view added * adding first vertex default * Persist layer selection across play & edit mode. * null exception fixed * Update VectorLayerPropertiesDrawer.cs fixed arry index error for the issue * some more work done with props * functioning multiselect and complete ui * cases handled * setting defaults * functioning categories * Create new POI placement scene with prefabs (#685) * Alphabetize categories (#688) * adding new architecture * .. * popularity and name filters in * density done * bugs fixed * in-progress visualizer for specific locations * build vectorfeatures in visualizer * Address search UI * null check on user provided coordinates * search UI improvements * separate truncated coordinates for UI * Create new location prefabs (#696) * adding convenience methods to AbstractMap * functional specific locations visualizer * adding fix to type filter * Add description of scene and update modifiers (#697) * completed PlacePrefabAtGeoLocation methods and callbacks, added null checks * adding check to make sure inactive doesnt spawn anything * added callbacks to remaining methods * need help to fix the issue. but, crash stopped now * fix null reference errors in the treeview when selected items are removed via undo or at runtime. * Reorganize files for consistency (#703) * apply snapterrain modifier in LocationPrefabLayerVisualizer * vectortilefactory builds layers with an empty string * fix for source * handling no prefab found * .. * adding source warning to the location prefabs section * adding fixes to not spawn prefabs based on source * Update tooltips and naming * update AbstractMap methods * name objects in hierarchy based on sublayer name * fix layer properties spacing * fix for the streets v7 to remain fixed * Fix NREs when undoing layer creation, Location prefabs layers persist * Rename POI Placement example * Move API test script * Rename API Test script * update changelog * Location prefabs layers respect performance options * update performance options accessor * Correct name and namespace of test script * wip * refactor API methods * code cleanup * remove popularity enum * Fix active check in locationprefablayervisualizer * Remove incorrect break * remove commented lines * Fix layer check in abstract map spawnprefab methods * simplify example script * update example * update changelog * remove empty class * Fix formatting * Fix type * Data fetcher (#712) * add terrain creation strategies change abstract map to use terrain factory base and strategies * remove terrain factories change terrain layer to use terrain and strategies * add data fetcher class and extract data fetching from factories * add ImageDataFetcher and change image factory to use it * add vector data fetcher change internal methods to protected * Update changelog * fix a bug where side wall mesh generation doesn't work with elevated terrain (#723) * Android native location plugin (#724) * [wip] backport native Android Location Plugin * [wip] backporting native Android GPS * update Android GPS plugin * [wip] LocationProvider example scene * [wip] native android location provider * loop through LocationArrayEditorLocationProvider instead of repeating last position * increase desired accuracy * New scene settings. * [wip] EditorGpsLogLocationProvider * try to rotated map * update scene * fix RotateWithLocationProvider to not overwrite existing rotation values * fix logic for 'IsLocationUpdated' * increase follow factor * [wip]: split Heading into Heading and Orientation * Update scene to move map instead of player. * [wip] try to rotated map * backport Location.DeviceOrientation and Location.UserHeading to default DeviceLocationProvider * [wip] calculate UserHeading with weigthed formula * CircularBuffer tests * fix typos in CircularBuffer test * update changelog * fix DeviceOrientation in LocationProviderTest scene. Some other small fixes. * save scene * Remove unused file (#729) * Remove unused file * Fix OnDestroy errors in Image & terrain factory. * Nesting sections gui (#735) * basic cosmetic changes in * ui issue fixed * duplicate layers taken care of * fixed indentation issues and checkboxes * added the new UI to the common area * cosmetic changes done * small language change * Ui formatting cleanup (#738) * basic cosmetic changes in * ui issue fixed * duplicate layers taken care of * fixed indentation issues and checkboxes * added the new UI to the common area * cosmetic changes done * Switch to EditorGuiLayout and some UI formatting changes. * Preload names from tile json {WIP DO NOT MERGE} (#727) * adding the data structure for processing tilejson response * removed datatype... cleaned the class for ease of use in the future * new architecture works * wip * all visible features in for now.. * hacky fix * fixed indices * adding unity objectId to editorprefs * mysterious unexplained behaviour.. handled it with a hack * solid fix this time.. mystery resolved -Sherlock Holmes * added warning for invalid tilejson response * basic cosmetic changes in * ui issue fixed * duplicate layers taken care of * fixed indentation issues and checkboxes * add check for loaded tileJSON * added the new UI to the common area * cosmetic changes done * adding formatting changes * Update 05-changelog.md Adding preloaded layers feature to the changelog * Switch to EditorGuiLayout and some UI formatting changes. * Fix layer renaming in treeview (#748) * Fix layer renaming in treeview, make layer selection persist during serialization. * Fix geocode attribute drawer not working by itself. * removing unnecessary lines * Fix errors in individual modifier UI's. Remove unused files. * Monobehavior inheritance (#730) * Allow MonoBehaviour message inheritance (#654) * Allow MonoBehaviour message inheritance Removes private modifier restrictions from Mapbox Unity classes that inherit from MonoBehaviour. Applies protected virtual modifier to any use of MonoBehaviour Messages detailed here: https://docs.unity3d.com/ScriptReference/MonoBehaviour.html * Remove Update from GlobeTileProvider Adding TileCover is only needed once, but was attempted every frame. * Change remaining private accessors to protected virtual. * Ui notoken fix (#749) * Add catch to exception on initial no token. * Fix loading of UI when token is added. * Add POIItems to node editor. * no access token handled * fixed helpbox text * Fix indentation, add styles for "no internet" errors, fix error with filter property dropdown. * small fix to catch no access token exception properly * made the filter section uniform with other elements * Change location provider folder/scene name (#750) * Ui dropdown fix (#756) * fix for the drop downs * Fix for UIlayout mismatch warning. * custom data source fix * property names index fixed now * fix argument out of range issue. * catch errors when string properties are passed to extrusion modifiers * custom empty string fixed * removing an unnecessary debug.log * 1.4.2 example scene updates (#760) * fix for the drop downs * Fix for UIlayout mismatch warning. * custom data source fix * property names index fixed now * fix argument out of range issue. * catch errors when string properties are passed to extrusion modifiers * updated prefabs and prefab example scenes * Fix example scenes (#757) * Ui dropdown fix (#758) * fix for the drop downs * Fix for UIlayout mismatch warning. * custom data source fix * property names index fixed now * fix argument out of range issue. * catch errors when string properties are passed to extrusion modifiers * custom empty string fixed * removing an unnecessary debug.log * string lookup for properties * Add property to display description of the property. Fixes error on dictionary lookup for description. * Fix array out of bounds for filters * Check for key before adding it. * fixed the DataExplorer scene * handle invalid property selections in extrusion options and filters * cleanup variables * custom tileset fix * update changelog * fix to add layers with no properties * change filter property warning * cleanup commented section * Update scenes & prefabs * Change LocationPrefabs to POIPlacement * Move locationProvider to playground. * Remove unused folder. (#761) * Merge master develop (#773) * Release/v1.4.1 (#682) * Fix to properly show Mesh & GO modifiers in the UI * Add UI for removing/combining filters * Break classes into separate files, remove MapAPI wrapper. UnifiedMap takes over the functionality. Fix bug with filters * Add new prefabs for LocationBasedGame and CitySim * Fixes loadingPanel script to work with UnifiedMap * Trigger finished state when no vector layer is turned off. * Fix mapId for Satellite & satellite-streets * update PR template * Update UI to match design - round 1 * Add new data containers * Enable loading external configurations - take 2 (#552) * carry over changes from https://github.com/mapbox/mapbox-unity-sdk/pull/352 to latest develop * Fix the merge typo. * Integrate mapbox-ar-unity (#544) * add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff. * Update prefabs & scene * Add defaults options + linewidth parameter. * Add mockup for Presets UI * Adding tooltips for General, Image & Terrain sections. * Fix extra space in Terrain UI. * [WIP] Remove old map files, rename UnifiedMap to AbstractMap - working towards clean merge. * [WIP] Replace old VectorTileFactory with refactored ( VectorTileFactoryNew gets renamed) * add kalman comment * appveyor: don't use PowerShell to download docfx * Fix typo in terrain source. * New textures/materials for default building style * Merge StyleOptimizedVectorTileFactory functionality into VectorTileFactory * Updated settings to TextureSideWall * VectorLayerVisualizer refactor. * Hookup node editor with Plug & play refactor. * Add tooltips for vector section. * Add missing changes to VectorTIle.cs * add QueryTerrainHeight function to AbstractMap (#571) Looks good. * try with GPS position/heading, ignoring AR and bias * Fix compile error related to return type. (#572) minor change. * Added a API call to query height Added a API call on AbstractMap to query height at a certain latitude longitude. * Add preset defaults switching + snapMaptoZero hookup. * Changes to MapEditor. * Add code comments for LatitudeLongitudeToTileId change. (#573) * Fix compile error related to return type. * update code comments * Layer Visualizer for Building Ids (#502) * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * Uv mapping (#503) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * add a 8 building texture atlas * add new texture from random google images * fix a bug where bottomOfMidUv was calculated wrong * Fix formatting. * Add atlas texturing modifier into Plug & play UI. * Remove presets from map * work on DeviceLocationProvider, AutomaticSyncScene: size of player shows hdop, remove some debug statements * Add parameters to hookup Globe terrain factory. * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Set defaults for all properties * Add API calls for layers * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set color…
1 parent 32c8912 commit ee6aef3

File tree

2 files changed

+104
-51
lines changed

2 files changed

+104
-51
lines changed

documentation/docs/05-changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
### v.1.4.6
33
##### Improvements
44
- Terrain mesh is generated as flat on height data errors
5+
##### Bug Fixes
6+
- Fix issue with building side wall modifier where it miscalculated the floor heights causing overlaping polygons/floors
57

68
### v.1.4.5
79
08/20/2018

sdkproject/Assets/Mapbox/Unity/MeshGeneration/Modifiers/TextureSideWallModifier.cs

Lines changed: 102 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ namespace Mapbox.Unity.MeshGeneration.Modifiers
1010
public class TextureSideWallModifier : MeshModifier
1111
{
1212
#region ModifierOptions
13+
1314
private float _scaledFirstFloorHeight = 0;
15+
1416
private float _scaledTopFloorHeight = 0;
17+
1518
//private int _maxEdgeSectionCount = 40;
1619
private float _scaledPreferredWallLength;
17-
[SerializeField]
18-
private bool _centerSegments = true;
19-
[SerializeField]
20-
private bool _separateSubmesh = true;
20+
[SerializeField] private bool _centerSegments = true;
21+
[SerializeField] private bool _separateSubmesh = true;
2122

2223
#endregion
24+
2325
float currentWallLength = 0;
2426
Vector3 start = Constants.Math.Vector3Zero;
2527
Vector3 wallDirection = Constants.Math.Vector3Zero;
@@ -36,6 +38,7 @@ public class TextureSideWallModifier : MeshModifier
3638
private float finalFirstHeight;
3739
private float finalTopHeight;
3840
private float finalMidHeight;
41+
private float finalLeftOverRowHeight;
3942
private float _scaledFloorHeight;
4043
private int triIndex;
4144
private Vector3 wallNormal;
@@ -62,7 +65,7 @@ public class TextureSideWallModifier : MeshModifier
6265

6366
public override void SetProperties(ModifierProperties properties)
6467
{
65-
_options = (GeometryExtrusionWithAtlasOptions)properties;
68+
_options = (GeometryExtrusionWithAtlasOptions) properties;
6669
}
6770

6871
public override void Initialize()
@@ -83,7 +86,8 @@ public override void Run(VectorFeatureUnity feature, MeshData md, UnityTile tile
8386
_scale = tile.TileScale;
8487

8588
//facade texture to decorate this building
86-
_currentFacade = _options.atlasInfo.Textures[UnityEngine.Random.Range(0, _options.atlasInfo.Textures.Count)];
89+
_currentFacade =
90+
_options.atlasInfo.Textures[UnityEngine.Random.Range(0, _options.atlasInfo.Textures.Count)];
8791
//rect is a struct so we're caching this
8892
_currentTextureRect = _currentFacade.TextureRect;
8993

@@ -119,6 +123,19 @@ public override void Run(VectorFeatureUnity feature, MeshData md, UnityTile tile
119123
currentWallLength = 0;
120124
start = Constants.Math.Vector3Zero;
121125
wallSegmentDirection = Constants.Math.Vector3Zero;
126+
127+
finalLeftOverRowHeight = 0f;
128+
if (finalMidHeight > 0)
129+
{
130+
finalLeftOverRowHeight = finalMidHeight;
131+
finalLeftOverRowHeight = finalLeftOverRowHeight % _singleFloorHeight;
132+
finalMidHeight -= finalLeftOverRowHeight;
133+
}
134+
else
135+
{
136+
finalLeftOverRowHeight = finalTopHeight;
137+
}
138+
122139
for (int i = 0; i < md.Edges.Count; i += 2)
123140
{
124141
var v1 = md.Vertices[md.Edges[i]];
@@ -148,7 +165,9 @@ public override void Run(VectorFeatureUnity feature, MeshData md, UnityTile tile
148165
{
149166
wallSegmentFirstVertex = start;
150167
//columns fitting wall / max column we have in texture
151-
var stepRatio = (float)Math.Min(_currentFacade.ColumnCount, Math.Floor(currentWallLength / _singleColumnLength)) / _currentFacade.ColumnCount;
168+
var stepRatio =
169+
(float) Math.Min(_currentFacade.ColumnCount,
170+
Math.Floor(currentWallLength / _singleColumnLength)) / _currentFacade.ColumnCount;
152171
wallSegmentLength = stepRatio * _scaledPreferredWallLength;
153172
start += wallSegmentDirection * wallSegmentLength;
154173
wallSegmentSecondVertex = start;
@@ -190,23 +209,24 @@ private void CreateWall(MeshData md)
190209
//0-33% gets 1 window, 33-66 gets 2, 66-100 gets all three
191210
//we're not wrapping/repeating texture as it won't work with atlases
192211
columnScaleRatio = Math.Min(1, wallSegmentLength / _scaledPreferredWallLength);
193-
rightOfEdgeUv = _currentTextureRect.xMin + _currentTextureRect.size.x * columnScaleRatio; // Math.Min(1, ((float)(Math.Floor(columnScaleRatio * _currentFacade.ColumnCount) + 1) / _currentFacade.ColumnCount));
212+
rightOfEdgeUv =
213+
_currentTextureRect.xMin +
214+
_currentTextureRect.size.x *
215+
columnScaleRatio; // Math.Min(1, ((float)(Math.Floor(columnScaleRatio * _currentFacade.ColumnCount) + 1) / _currentFacade.ColumnCount));
194216

195-
//leftover row means the area left after first/top/mid floors placed without any stretching
196-
var leftOver = finalMidHeight > 0 ? finalMidHeight : finalTopHeight;
197-
leftOver = leftOver % _singleFloorHeight;
198217
_minWallLength = (_scaledPreferredWallLength / _currentFacade.ColumnCount) * _wallSizeEpsilon;
199218
//common for all top/mid/bottom segments
200-
wallNormal = new Vector3(-(wallSegmentFirstVertex.z - wallSegmentSecondVertex.z), 0, (wallSegmentFirstVertex.x - wallSegmentSecondVertex.x)).normalized;
219+
wallNormal = new Vector3(-(wallSegmentFirstVertex.z - wallSegmentSecondVertex.z), 0,
220+
(wallSegmentFirstVertex.x - wallSegmentSecondVertex.x)).normalized;
201221
//height of the left/right edges
202222
currentY1 = wallSegmentFirstVertex.y;
203223
currentY2 = wallSegmentSecondVertex.y;
204224

205225
//moving leftover row to top
206-
LeftOverRow(md, leftOver);
226+
LeftOverRow(md, finalLeftOverRowHeight);
207227

208228
FirstFloor(md, height);
209-
TopFloor(md, leftOver);
229+
TopFloor(md, finalLeftOverRowHeight);
210230
MidFloors(md);
211231
}
212232

@@ -228,15 +248,19 @@ private void LeftOverRow(MeshData md, float leftOver)
228248
{
229249
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMax));
230250
md.UV[0].Add(new Vector2(rightOfEdgeUv, _currentTextureRect.yMax));
231-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMax - _shortRowHeightDelta));
251+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin,
252+
_currentTextureRect.yMax - _shortRowHeightDelta));
232253
md.UV[0].Add(new Vector2(rightOfEdgeUv, _currentTextureRect.yMax - _shortRowHeightDelta));
233254
}
234255
else
235256
{
236257
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMax));
237-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentTextureRect.yMax));
238-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMax - _shortRowHeightDelta));
239-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentTextureRect.yMax - _shortRowHeightDelta));
258+
md.UV[0].Add(
259+
new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentTextureRect.yMax));
260+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin,
261+
_currentTextureRect.yMax - _shortRowHeightDelta));
262+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta,
263+
_currentTextureRect.yMax - _shortRowHeightDelta));
240264
}
241265

242266
md.Normals.Add(wallNormal);
@@ -268,7 +292,9 @@ private void MidFloors(MeshData md)
268292
{
269293
//first part is the number of floors fitting current wall segment. You can fit max of "row count in mid". Or if wall
270294
//is smaller and it can only fit i.e. 3 floors instead of 5; we use 3/5 of the mid section texture as well.
271-
_midUvInCurrentStep = ((float)Math.Min(_currentFacade.MidFloorCount, Math.Round(_currentMidHeight / _singleFloorHeight))) / _currentFacade.MidFloorCount;
295+
_midUvInCurrentStep =
296+
((float) Math.Min(_currentFacade.MidFloorCount,
297+
Math.Round(_currentMidHeight / _singleFloorHeight))) / _currentFacade.MidFloorCount;
272298

273299
//top two vertices
274300
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, currentY1, wallSegmentFirstVertex.z));
@@ -285,15 +311,20 @@ private void MidFloors(MeshData md)
285311
{
286312
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.topOfMidUv));
287313
md.UV[0].Add(new Vector2(rightOfEdgeUv, _currentFacade.topOfMidUv));
288-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
289-
md.UV[0].Add(new Vector2(rightOfEdgeUv, _currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
314+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin,
315+
_currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
316+
md.UV[0].Add(new Vector2(rightOfEdgeUv,
317+
_currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
290318
}
291319
else
292320
{
293321
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.topOfMidUv));
294-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.topOfMidUv));
295-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
296-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
322+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta,
323+
_currentFacade.topOfMidUv));
324+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin,
325+
_currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
326+
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta,
327+
_currentFacade.topOfMidUv - _currentFacade.midUvHeight * _midUvInCurrentStep));
297328
}
298329

299330
md.Normals.Add(wallNormal);
@@ -324,10 +355,14 @@ private void TopFloor(MeshData md, float leftOver)
324355
//top floor start
325356
currentY1 -= finalTopHeight;
326357
currentY2 -= finalTopHeight;
327-
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - leftOver, wallSegmentFirstVertex.z));
328-
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - leftOver, wallSegmentSecondVertex.z));
329-
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - leftOver - finalTopHeight, wallSegmentFirstVertex.z));
330-
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - leftOver - finalTopHeight, wallSegmentSecondVertex.z));
358+
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - leftOver,
359+
wallSegmentFirstVertex.z));
360+
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - leftOver,
361+
wallSegmentSecondVertex.z));
362+
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - leftOver - finalTopHeight,
363+
wallSegmentFirstVertex.z));
364+
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x,
365+
wallSegmentSecondVertex.y - leftOver - finalTopHeight, wallSegmentSecondVertex.z));
331366

332367
if (wallSegmentLength >= _minWallLength)
333368
{
@@ -341,7 +376,8 @@ private void TopFloor(MeshData md, float leftOver)
341376
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMax));
342377
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentTextureRect.yMax));
343378
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.bottomOfTopUv));
344-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.bottomOfTopUv));
379+
md.UV[0].Add(
380+
new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.bottomOfTopUv));
345381
}
346382

347383
md.Normals.Add(wallNormal);
@@ -368,10 +404,14 @@ private void TopFloor(MeshData md, float leftOver)
368404

369405
private void FirstFloor(MeshData md, float hf)
370406
{
371-
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - hf + finalFirstHeight, wallSegmentFirstVertex.z));
372-
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - hf + finalFirstHeight, wallSegmentSecondVertex.z));
373-
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - hf, wallSegmentFirstVertex.z));
374-
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - hf, wallSegmentSecondVertex.z));
407+
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - hf + finalFirstHeight,
408+
wallSegmentFirstVertex.z));
409+
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - hf + finalFirstHeight,
410+
wallSegmentSecondVertex.z));
411+
md.Vertices.Add(new Vector3(wallSegmentFirstVertex.x, wallSegmentFirstVertex.y - hf,
412+
wallSegmentFirstVertex.z));
413+
md.Vertices.Add(new Vector3(wallSegmentSecondVertex.x, wallSegmentSecondVertex.y - hf,
414+
wallSegmentSecondVertex.z));
375415

376416
md.Normals.Add(wallNormal);
377417
md.Normals.Add(wallNormal);
@@ -392,7 +432,8 @@ private void FirstFloor(MeshData md, float hf)
392432
else
393433
{
394434
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentFacade.topOfBottomUv));
395-
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.topOfBottomUv));
435+
md.UV[0].Add(
436+
new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentFacade.topOfBottomUv));
396437
md.UV[0].Add(new Vector2(_currentTextureRect.xMin, _currentTextureRect.yMin));
397438
md.UV[0].Add(new Vector2(_currentTextureRect.xMin + _narrowWallWidthDelta, _currentTextureRect.yMin));
398439
}
@@ -410,7 +451,6 @@ private void FirstFloor(MeshData md, float hf)
410451

411452
private void CalculateEdgeList(MeshData md, UnityTile tile, float preferredEdgeSectionLength)
412453
{
413-
414454
}
415455

416456
private void GenerateRoofMesh(MeshData md, float minHeight, float maxHeight)
@@ -425,48 +465,56 @@ private void GenerateRoofMesh(MeshData md, float minHeight, float maxHeight)
425465
case ExtrusionType.PropertyHeight:
426466
for (int i = 0; i < _counter; i++)
427467
{
428-
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight, md.Vertices[i].z);
468+
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight,
469+
md.Vertices[i].z);
429470
}
471+
430472
break;
431473
case ExtrusionType.MinHeight:
474+
{
475+
var minmax = MinMaxPair.GetMinMaxHeight(md.Vertices);
476+
for (int i = 0; i < _counter; i++)
432477
{
433-
var minmax = MinMaxPair.GetMinMaxHeight(md.Vertices);
434-
for (int i = 0; i < _counter; i++)
435-
{
436-
md.Vertices[i] = new Vector3(md.Vertices[i].x, minmax.min + maxHeight, md.Vertices[i].z);
437-
}
478+
md.Vertices[i] = new Vector3(md.Vertices[i].x, minmax.min + maxHeight, md.Vertices[i].z);
438479
}
480+
}
439481
//hf += max - min;
440482
break;
441483
case ExtrusionType.MaxHeight:
484+
{
485+
var minmax = MinMaxPair.GetMinMaxHeight(md.Vertices);
486+
for (int i = 0; i < _counter; i++)
442487
{
443-
var minmax = MinMaxPair.GetMinMaxHeight(md.Vertices);
444-
for (int i = 0; i < _counter; i++)
445-
{
446-
md.Vertices[i] = new Vector3(md.Vertices[i].x, minmax.max + maxHeight, md.Vertices[i].z);
447-
}
448-
height += minmax.max - minmax.min;
488+
md.Vertices[i] = new Vector3(md.Vertices[i].x, minmax.max + maxHeight, md.Vertices[i].z);
449489
}
490+
491+
height += minmax.max - minmax.min;
492+
}
450493
break;
451494
case ExtrusionType.RangeHeight:
452495
for (int i = 0; i < _counter; i++)
453496
{
454-
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight, md.Vertices[i].z);
497+
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight,
498+
md.Vertices[i].z);
455499
}
500+
456501
break;
457502
case ExtrusionType.AbsoluteHeight:
458503
for (int i = 0; i < _counter; i++)
459504
{
460-
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight, md.Vertices[i].z);
505+
md.Vertices[i] = new Vector3(md.Vertices[i].x, md.Vertices[i].y + maxHeight,
506+
md.Vertices[i].z);
461507
}
508+
462509
break;
463510
default:
464511
break;
465512
}
466513
}
467514
}
468515

469-
private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile, out float maxHeight, out float minHeight)
516+
private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile, out float maxHeight,
517+
out float minHeight)
470518
{
471519
minHeight = 0.0f;
472520
maxHeight = 0.0f;
@@ -487,6 +535,7 @@ private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile
487535
//hf -= minHeight;
488536
}
489537
}
538+
490539
break;
491540
case ExtrusionType.RangeHeight:
492541
if (feature.Properties.ContainsKey(_options.propertyName))
@@ -498,6 +547,7 @@ private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile
498547
_options.minimumHeight = _options.maximumHeight;
499548
_options.maximumHeight = temp;
500549
}
550+
501551
var featureHeight = Convert.ToSingle(feature.Properties[_options.propertyName]);
502552
maxHeight = Math.Min(Math.Max(_options.minimumHeight, featureHeight), _options.maximumHeight);
503553
if (feature.Properties.ContainsKey("min_height"))
@@ -507,6 +557,7 @@ private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile
507557
//maxHeight -= minHeight;
508558
}
509559
}
560+
510561
break;
511562
case ExtrusionType.AbsoluteHeight:
512563
maxHeight = _options.maximumHeight;
@@ -516,4 +567,4 @@ private void QueryHeight(VectorFeatureUnity feature, MeshData md, UnityTile tile
516567
}
517568
}
518569
}
519-
}
570+
}

0 commit comments

Comments
 (0)