Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile prefetching #1737

Open
wants to merge 839 commits into
base: CI-Test
Choose a base branch
from

Conversation

portintegration
Copy link

@portintegration portintegration commented Dec 8, 2020

Related issue

Example: Closes #832. Relates to #832.

Description of changes

Your text here!

QA checklists

  • Add relevant code comments. Every API class and method should have <summary> description as well as description of parameters.
  • Add tests for new/changed/updated classes and methods!!!
  • Check out conventions in CONTRIBUTING.md.
  • Check out conventions in CODING-STYLE.md
  • Update the changelog
  • Update documentation.

Reviewers

Tag your reviewer(s). Choose wisely.

greglemonmapbox and others added 30 commits September 20, 2018 16:42
…ns gets a unique CheckForModifiedProperties call.
* add a proof of concept for partial layer updates

* Replaced bare EditorHelper.CheckForModifiedProperty calls with EditorGUILayout.Popup-centric Begin/EndChangeCheck-encapsulated EditorHelper.CheckForModifiedProperty calls.

* - Added property.serializedObject.Update() calls to beginning of OnGUI calls in vector-centric property drawers.
- Wrapped CheckForModifiedProperty calls in EndChangeCheck conditional checks. Added color-coded debug message for Vector layer in AbstractMap.
- Added System.EventHandler LayerVisualizerHasChanged and OnUpdateLayerVisualizer method to LayerVisualizerBase.
- Added System.EventHandler TileFactoryHasChanged and UpdateTileFactory method to AbstractTileFactory.
- Chain of EventHandlers = VectorLayerVisualizer -> VectorTileFactory -> VectorLayer -> AbstractMap

* Temporarily disabled Vector Update business in abstract map.

* Adding/removing mesh and/or gameplay modifiers now triggers change events.

* Removed unused EndChangeCheck call in BehaviorModifiersSectionDrawer; moved tile factory update/change event vars/methods into events section.

* Added support for change events in vector filter section.

* Fix ui errors vector section (mapbox#1011)

* Fix PropertyDrawer errors when adding new layer.

* Fix errors on adding filters.

* Removed commented/dead property.serializedObject.Update() calls.

* Added UI update checks for Behavior Modifier section.

* Removed unused delegate and method.

* Removed property.serializedObject.Update call at beginning of OnGUI.

* Adding/removing map features now triggers update event.

* Enabling/disabling map feature checkboxes now fires UI update events.

* Changing DataSource in map features section now triggers update. For some reason, this is not working with EditorHelper.CheckForModifiedProperty; setting HasChanged manually does work.

* VectorUpdate is now working; map redraws vector section on vector-centric UI changes.
- Sequential Vector UI changes will cause over/re-registration for event handlers. We need to fix this.
- Added debug message and comment re: register/unregistering for EventHandlers...

* hook terrain layer property to property changed event.

* Use the variable to set collider.

* Add helper methods

* Add update methods to MapboxDataProperty

* Use new methods in MapboxDataProperty.

* Remove SerializedObject.update

* Add ChangeCheck for Vector DataSource.

* Add NeedsForceUpdate override

* Switch to UpdateProperty

* Change Active from field to Property.

* Update signature for NotifyUpdateLayer

* Add ChangeImagery method to test.

* Add VectorLayerUpdateArgs + overload for NotifyUpdateLayer

* Hook to UpdateTileFactory event

* Add hooks to UpdateModifier Event

* Add abstract SublayerProperty

* Add UnregisterTilesFromLayer method

* Add method to change texturing type.

* Remove static MapboxDefaultStyle class.

* Add event hookup to modifiers

* Add layer args for vector layers

* Add events for Add/Remove layer

* Add events for modifiers.

* Change HasChanged to virtual, add overrides

* Add event hookup to modifiers

* Code cleanup

* Trigger Collider option change from UI

* Add a method to re-intialize stack.

* Clean out stacks before recreating the layer.

* Add events to trigger SubLayerAdded from UI

* Remove Layer API and hooks

* Add missing property

* Add function to unbind properties from modifier.

* UpdateVector method now unbinds all modifiers.

* remove SnapTerrain and CombineMeshes from points.

* Add UpdateMap call to trigger when UI is changed.

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* fix a bug where prefab modifier rupdate event registration wasn't firing after an update

* fix filtering poi category by none with a hacky solution

* Remove hack with a fix for POILayer being set to None.

* Add map update logic to General section UI events.

* Add property to trigger separate events for extentType & Extent property change.

* Property drawer changes for extentOptions

* Add API methods for General Section functionality.

* Add APi method for snapMapToZero.

* add api methods to terrain and imagery layers

* Fix typo.

* Fix typo

* add update system functionality to add/remove poi layers on data property change (mapbox#1022)

* fix an issue where poi layer didn't create prefab modifier for name and latlng settings (mapbox#1028)

* Add multiple property methods (mapbox#1026)

* add two SetProperties methods to terrain and image layer to set multiple properties at once

* add comments to SetProperties methods

* Move poi methods (mapbox#1023)

* move poi api methods to vector layer
add basic comments for terrain/image factory api methods

* fix a broken method reference

* change poi api methods to fire update events and work with runtime calls

* POI section : Add Layer, Remove Selected, Enabled toggle all trigger change events.

* Added change checks to PointsOfInterestSubLayerPropertiesDrawer.

* Further work on getting POI UI changes to trigger updates. Removed Application.isPlaying check for density slider in PrefabItemOptionsDrawer. Events are firing corectly, but map is not redrawing with POI changes correctly, may need to apply modified properties early.

* Change check for SpawnPrefabOptionsDrawer.

* Removed unused change check.

* Refactored EditorHelper.CheckForModifiedProperties to allow HasChanged to be brute force set to true.

* Refactored GeocodeAttributeSearchWindow to accept an object to update in Open(), thus allowing classes that derive from MapboxDataProperty to be passed, thus allowing for direct calls to EditorHelper.CheckForModifiedProperty<T>(SerializedProperty property, T targetObject, bool forceHasChanged = false), thus eliminating the need for bool updateAbstractMap = false. Refactored relevant drawer code to reflect this change; refactored relevant drawer code with correct change check structure.

* TEMP: Added comments to show what class is being modified on HasChanged = true sets.

* Removed unused variable and conditional check.

* Changed change check code to call OnSunlayerPropertiesAdded and OnSubLayerPropertyRemoved instead of generic HasChanged = true set.

* Change default style for roads + layerName for custom.

* Removed true argument from CheckForModifiedProperty.

* add default poi prefab and use it on new poi layers

* Fix bug which caused events to unbind when layer was added.

* Remove unused variable

* Removing prefab- comes in broken for older versions

* Remove meta file
* add a proof of concept for partial layer updates

* Replaced bare EditorHelper.CheckForModifiedProperty calls with EditorGUILayout.Popup-centric Begin/EndChangeCheck-encapsulated EditorHelper.CheckForModifiedProperty calls.

* - Added property.serializedObject.Update() calls to beginning of OnGUI calls in vector-centric property drawers.
- Wrapped CheckForModifiedProperty calls in EndChangeCheck conditional checks. Added color-coded debug message for Vector layer in AbstractMap.
- Added System.EventHandler LayerVisualizerHasChanged and OnUpdateLayerVisualizer method to LayerVisualizerBase.
- Added System.EventHandler TileFactoryHasChanged and UpdateTileFactory method to AbstractTileFactory.
- Chain of EventHandlers = VectorLayerVisualizer -> VectorTileFactory -> VectorLayer -> AbstractMap

* Temporarily disabled Vector Update business in abstract map.

* Adding/removing mesh and/or gameplay modifiers now triggers change events.

* Removed unused EndChangeCheck call in BehaviorModifiersSectionDrawer; moved tile factory update/change event vars/methods into events section.

* Added support for change events in vector filter section.

* Fix ui errors vector section (mapbox#1011)

* Fix PropertyDrawer errors when adding new layer.

* Fix errors on adding filters.

* Removed commented/dead property.serializedObject.Update() calls.

* Added UI update checks for Behavior Modifier section.

* Removed unused delegate and method.

* Removed property.serializedObject.Update call at beginning of OnGUI.

* Adding/removing map features now triggers update event.

* Enabling/disabling map feature checkboxes now fires UI update events.

* Changing DataSource in map features section now triggers update. For some reason, this is not working with EditorHelper.CheckForModifiedProperty; setting HasChanged manually does work.

* VectorUpdate is now working; map redraws vector section on vector-centric UI changes.
- Sequential Vector UI changes will cause over/re-registration for event handlers. We need to fix this.
- Added debug message and comment re: register/unregistering for EventHandlers...

* hook terrain layer property to property changed event.

* Use the variable to set collider.

* Add helper methods

* Add update methods to MapboxDataProperty

* Use new methods in MapboxDataProperty.

* Remove SerializedObject.update

* Add ChangeCheck for Vector DataSource.

* Add NeedsForceUpdate override

* Switch to UpdateProperty

* Change Active from field to Property.

* Update signature for NotifyUpdateLayer

* Add ChangeImagery method to test.

* Add VectorLayerUpdateArgs + overload for NotifyUpdateLayer

* Hook to UpdateTileFactory event

* Add hooks to UpdateModifier Event

* Add abstract SublayerProperty

* Add UnregisterTilesFromLayer method

* Add method to change texturing type.

* Remove static MapboxDefaultStyle class.

* Add event hookup to modifiers

* Add layer args for vector layers

* Add events for Add/Remove layer

* Add events for modifiers.

* Change HasChanged to virtual, add overrides

* Add event hookup to modifiers

* Code cleanup

* Trigger Collider option change from UI

* Add a method to re-intialize stack.

* Clean out stacks before recreating the layer.

* Add events to trigger SubLayerAdded from UI

* Remove Layer API and hooks

* Add missing property

* Add function to unbind properties from modifier.

* UpdateVector method now unbinds all modifiers.

* remove SnapTerrain and CombineMeshes from points.

* Add UpdateMap call to trigger when UI is changed.

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* fix a bug where prefab modifier rupdate event registration wasn't firing after an update

* fix filtering poi category by none with a hacky solution

* Remove hack with a fix for POILayer being set to None.

* Add map update logic to General section UI events.

* Add property to trigger separate events for extentType & Extent property change.

* Property drawer changes for extentOptions

* Add API methods for General Section functionality.

* Add APi method for snapMapToZero.

* add api methods to terrain and imagery layers

* Fix typo.

* Fix typo

* add update system functionality to add/remove poi layers on data property change (mapbox#1022)

* fix an issue where poi layer didn't create prefab modifier for name and latlng settings (mapbox#1028)

* Vector Filter options API calls.

* Added additional API methods.

* Add multiple property methods (mapbox#1026)

* add two SetProperties methods to terrain and image layer to set multiple properties at once

* add comments to SetProperties methods

* Move poi methods (mapbox#1023)

* move poi api methods to vector layer
add basic comments for terrain/image factory api methods

* fix a broken method reference

* change poi api methods to fire update events and work with runtime calls

* Added API methods for interacting with texture style options.

* Added API Get/Set methods and CustomStyleBundle class.

* Removed duplicate methods in EditorHelper. Added comments and regions to API calls in VectorSubLayerProperties.

* Marked all API methods as virtual.

* Added VectorTextureApiTest.

* Replaced new Material(material) calls with = material; renamed GetCustom___ methods to Get___ methods.

* Wrapper for public interfaces

* interface templates
* add a proof of concept for partial layer updates

* Replaced bare EditorHelper.CheckForModifiedProperty calls with EditorGUILayout.Popup-centric Begin/EndChangeCheck-encapsulated EditorHelper.CheckForModifiedProperty calls.

* - Added property.serializedObject.Update() calls to beginning of OnGUI calls in vector-centric property drawers.
- Wrapped CheckForModifiedProperty calls in EndChangeCheck conditional checks. Added color-coded debug message for Vector layer in AbstractMap.
- Added System.EventHandler LayerVisualizerHasChanged and OnUpdateLayerVisualizer method to LayerVisualizerBase.
- Added System.EventHandler TileFactoryHasChanged and UpdateTileFactory method to AbstractTileFactory.
- Chain of EventHandlers = VectorLayerVisualizer -> VectorTileFactory -> VectorLayer -> AbstractMap

* Temporarily disabled Vector Update business in abstract map.

* Adding/removing mesh and/or gameplay modifiers now triggers change events.

* Removed unused EndChangeCheck call in BehaviorModifiersSectionDrawer; moved tile factory update/change event vars/methods into events section.

* Added support for change events in vector filter section.

* Fix ui errors vector section (mapbox#1011)

* Fix PropertyDrawer errors when adding new layer.

* Fix errors on adding filters.

* Removed commented/dead property.serializedObject.Update() calls.

* Added UI update checks for Behavior Modifier section.

* Removed unused delegate and method.

* Removed property.serializedObject.Update call at beginning of OnGUI.

* Adding/removing map features now triggers update event.

* Enabling/disabling map feature checkboxes now fires UI update events.

* Changing DataSource in map features section now triggers update. For some reason, this is not working with EditorHelper.CheckForModifiedProperty; setting HasChanged manually does work.

* VectorUpdate is now working; map redraws vector section on vector-centric UI changes.
- Sequential Vector UI changes will cause over/re-registration for event handlers. We need to fix this.
- Added debug message and comment re: register/unregistering for EventHandlers...

* hook terrain layer property to property changed event.

* Use the variable to set collider.

* Add helper methods

* Add update methods to MapboxDataProperty

* Use new methods in MapboxDataProperty.

* Remove SerializedObject.update

* Add ChangeCheck for Vector DataSource.

* Add NeedsForceUpdate override

* Switch to UpdateProperty

* Change Active from field to Property.

* Update signature for NotifyUpdateLayer

* Add ChangeImagery method to test.

* Add VectorLayerUpdateArgs + overload for NotifyUpdateLayer

* Hook to UpdateTileFactory event

* Add hooks to UpdateModifier Event

* Add abstract SublayerProperty

* Add UnregisterTilesFromLayer method

* Add method to change texturing type.

* Remove static MapboxDefaultStyle class.

* Add event hookup to modifiers

* Add layer args for vector layers

* Add events for Add/Remove layer

* Add events for modifiers.

* Change HasChanged to virtual, add overrides

* Add event hookup to modifiers

* Code cleanup

* Trigger Collider option change from UI

* Add a method to re-intialize stack.

* Clean out stacks before recreating the layer.

* Add events to trigger SubLayerAdded from UI

* Remove Layer API and hooks

* Add missing property

* Add function to unbind properties from modifier.

* UpdateVector method now unbinds all modifiers.

* remove SnapTerrain and CombineMeshes from points.

* Add UpdateMap call to trigger when UI is changed.

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* fix a bug where prefab modifier rupdate event registration wasn't firing after an update

* fix filtering poi category by none with a hacky solution

* Remove hack with a fix for POILayer being set to None.

* Add map update logic to General section UI events.

* Add property to trigger separate events for extentType & Extent property change.

* Property drawer changes for extentOptions

* Add API methods for General Section functionality.

* Add APi method for snapMapToZero.

* add api methods to terrain and imagery layers

* Fix typo.

* Fix typo

* add update system functionality to add/remove poi layers on data property change (mapbox#1022)

* fix an issue where poi layer didn't create prefab modifier for name and latlng settings (mapbox#1028)

* move vector sublayer methods to layer class from sublayerproperty class

* add more "get layer" helper methods in VectorLayer

* add remove sublayer by reference method to VectorLayer

* revert wrong ProjectSettings.asset file

* add api tests for vector/poi api methods in VectorLayer class

* add api test methods for style optimization and coroutines

* add api methods for feature mesh generations
add ModelTest.cs file to test mesh generation api methods

* Fix errors on merging.
* revert broken CitySimulator.unity scene to previous version

* add new pin prefab craeted in 2017.3 for maximum compatibility
* add a proof of concept for partial layer updates

* Replaced bare EditorHelper.CheckForModifiedProperty calls with EditorGUILayout.Popup-centric Begin/EndChangeCheck-encapsulated EditorHelper.CheckForModifiedProperty calls.

* - Added property.serializedObject.Update() calls to beginning of OnGUI calls in vector-centric property drawers.
- Wrapped CheckForModifiedProperty calls in EndChangeCheck conditional checks. Added color-coded debug message for Vector layer in AbstractMap.
- Added System.EventHandler LayerVisualizerHasChanged and OnUpdateLayerVisualizer method to LayerVisualizerBase.
- Added System.EventHandler TileFactoryHasChanged and UpdateTileFactory method to AbstractTileFactory.
- Chain of EventHandlers = VectorLayerVisualizer -> VectorTileFactory -> VectorLayer -> AbstractMap

* Temporarily disabled Vector Update business in abstract map.

* Adding/removing mesh and/or gameplay modifiers now triggers change events.

* Removed unused EndChangeCheck call in BehaviorModifiersSectionDrawer; moved tile factory update/change event vars/methods into events section.

* Added support for change events in vector filter section.

* Fix ui errors vector section (mapbox#1011)

* Fix PropertyDrawer errors when adding new layer.

* Fix errors on adding filters.

* Removed commented/dead property.serializedObject.Update() calls.

* Added UI update checks for Behavior Modifier section.

* Removed unused delegate and method.

* Removed property.serializedObject.Update call at beginning of OnGUI.

* Adding/removing map features now triggers update event.

* Enabling/disabling map feature checkboxes now fires UI update events.

* Changing DataSource in map features section now triggers update. For some reason, this is not working with EditorHelper.CheckForModifiedProperty; setting HasChanged manually does work.

* VectorUpdate is now working; map redraws vector section on vector-centric UI changes.
- Sequential Vector UI changes will cause over/re-registration for event handlers. We need to fix this.
- Added debug message and comment re: register/unregistering for EventHandlers...

* hook terrain layer property to property changed event.

* Use the variable to set collider.

* Add helper methods

* Add update methods to MapboxDataProperty

* Use new methods in MapboxDataProperty.

* Remove SerializedObject.update

* Add ChangeCheck for Vector DataSource.

* Add NeedsForceUpdate override

* Switch to UpdateProperty

* Change Active from field to Property.

* Update signature for NotifyUpdateLayer

* Add ChangeImagery method to test.

* Add VectorLayerUpdateArgs + overload for NotifyUpdateLayer

* Hook to UpdateTileFactory event

* Add hooks to UpdateModifier Event

* Add abstract SublayerProperty

* Add UnregisterTilesFromLayer method

* Add method to change texturing type.

* Remove static MapboxDefaultStyle class.

* Add event hookup to modifiers

* Add layer args for vector layers

* Add events for Add/Remove layer

* Add events for modifiers.

* Change HasChanged to virtual, add overrides

* Add event hookup to modifiers

* Code cleanup

* Trigger Collider option change from UI

* Add a method to re-intialize stack.

* Clean out stacks before recreating the layer.

* Add events to trigger SubLayerAdded from UI

* Remove Layer API and hooks

* Add missing property

* Add function to unbind properties from modifier.

* UpdateVector method now unbinds all modifiers.

* remove SnapTerrain and CombineMeshes from points.

* Add UpdateMap call to trigger when UI is changed.

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* extract lineGeometryOptions to its own class (with drawer)
change line mesh modifier to use new lineGeometryOptions data container object
add line feature event bindings to VectorLayerVisualizer

* add update event support to poi layer

* fix a bug where prefab modifier rupdate event registration wasn't firing after an update

* fix filtering poi category by none with a hacky solution

* Remove hack with a fix for POILayer being set to None.

* Add map update logic to General section UI events.

* Add property to trigger separate events for extentType & Extent property change.

* Property drawer changes for extentOptions

* Add API methods for General Section functionality.

* Add APi method for snapMapToZero.

* add api methods to terrain and imagery layers

* Fix typo.

* Fix typo

* add update system functionality to add/remove poi layers on data property change (mapbox#1022)

* fix an issue where poi layer didn't create prefab modifier for name and latlng settings (mapbox#1028)

* move vector sublayer methods to layer class from sublayerproperty class

* add more "get layer" helper methods in VectorLayer

* add remove sublayer by reference method to VectorLayer

* revert wrong ProjectSettings.asset file

* add api tests for vector/poi api methods in VectorLayer class

* add api test methods for style optimization and coroutines

* add api methods for feature mesh generations
add ModelTest.cs file to test mesh generation api methods

* Fix errors on merging.

* move vector mesh generation api methods to new interfaces and corresponding option classes

* Removing broken version.

* Revert "Removing broken version."

This reverts commit 5e74a1a.

* Fix scene for 2017.4
* Add remove modifier methods.

* add api methods for custom styles and modifiers

* Remove methods from bad merge.
* API methods for vector filtering.

* Updated Interfaces and methods to reflect new methods for setting and creating new layers. LayerFilter now extends MapboxDataProperty; CoreVectorLayerProperties registers and unregisters LayerFilters.PropertyHasChanged, called from VectorLayerVisualizer.SetProperties and VectorLayerVisualizer.UpdateVector. Property drawer for filter business now sets LayerFilters.PropertyHasChanged directly.

* Added a RemoveAllFilters method
Renamed DeleteFilter to RemoveFilter to be consistent in API nomenclature
GetFilterMethods now return ILayerFilter instead of LayerFilter.
Added Get methods for Key, Value, Operator to ILayerFilter.
Interacting with filter dropdowns without changing values no longer triggers changes.

* fix for image/terrain layer changes adding extra events to vector section

* Move Filter Options to separate file

* Add missing header

* Fix issue where event bindings got lost on enable disable.

* Remove unused functions.

* Fix test to use correct method.

* Add missing method.
* Fix for enable/disable vector layers from UI.

* Added API test method for enable layer.
* Cleanup API methods for VectorLayerProperties.

* Fix method signature.

* Fix for building drawing with simple style

* Moved changecheck for layer name to after the layer name is applied.
abhishektrip and others added 30 commits January 10, 2019 14:19
…x-unity-sdk into port-www-to-unitywebrequest

* 'port-www-to-unitywebrequest' of github.com:mapbox/mapbox-unity-sdk:
  Port obsolete www class to UnityWebRequest class.
Port obsolete www class to UnityWebRequest class.
…reset back to them at preview disable

change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled
…d map disappears when script is reserialized.
…nity-sdk into MapPreviewTransformCache

* 'MapPreviewTransformCache' of github.com:mapbox/mapbox-unity-sdk:
  change position change from global to local space
  change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.
  Add checks for editor preview to prevent map creation when not expected.
  change abstract map to cache transform values on preview enabled and reset back to them at preview disable change abstract map position modification to local position instead of global position add and if-preview check inside map update to prevent stuff updating while preview disabled
  change abstract map to cache transform values on preview enabled and reset back to them at preview disable change abstract map position modification to local position instead of global position add and if-preview check inside map update to prevent stuff updating while preview disabled
…x#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)
* Removed unused vars.

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars.
* Set tile provider gameObject to be named "TileProvider"

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars. (mapbox#1255)

* Removed unused vars.

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars.

* Set tile provider gameObject to be named "TileProvider"
* fix a bug where clear methods of modifiers wasn't called before modifier destruction

* Changed gameObject destroy calls to Editor-friendly destroy method extensions.

* - AbstractMap : Changed Destroy(tr.gameObject) to tr.gameObject.Destroy()
- ReplaceFeatureModifier : Initialize method finds AbstractMap and parents _poolGameObject to it.

* Changed foreach loop to use for loop that iterates downwards from last child index to first to ensure leftover gameObjects are cleaned out correctly.

* - EditorHelper: Removed child object destruction code that used GetComponentsInChildren<UnityTile>(); calls AbstractMap.DestroyChildObjects() instead
- Removed call to replaceFeatureModifier.Clear() in ReplaceFeatureCollectionModifier.Initialize;

* AbstractMap ref now stored as a private static var; initialize will use FindObjectOfType to get AbstractMap ref if AM var is null, resulting in smaller initialization cost.

* Made _poolGameObject private static; added null check for _poolGameObject in Initialize; _poolGameObject will be created if null.

* Removed Debug.Log statement.

* Replaced code that cleared modifiers during Initialize.

* change object inspector modifier to create canvas under map (mapbox#1256)

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars. (mapbox#1255)

* Removed unused vars.

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars.

* Set tile provider gameObject to be named "TileProvider" (mapbox#1254)

* Set tile provider gameObject to be named "TileProvider"

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars. (mapbox#1255)

* Removed unused vars.

* Color light dark material fix separate material for each layer (mapbox#1235)

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Removed extra line.

* Removed outdated comment.

* Port obsolete www class to UnityWebRequest class.

* change abstract map to cache transform values on preview enabled and reset back to them at preview disable
change abstract map position modification to local position instead of global position
add and if-preview check inside map update to prevent stuff updating while preview disabled

* Add checks for editor preview to prevent map creation when not expected.

* change default scale to vector3.one. otherwise it defaults to zero and map disappears when script is reserialized.

* change position change from global to local space

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Fix for issue where different vector layers with:
- the same texture style (color, light, dark)
- different style settings (color, opacity)
...were rendering with the same style settings.

* Maps with multiple vector layers with the same texture style (Color, Light, Dark) now instantiate layer-specific versions of the materials for the style. This ensures that said layers that use the same texture style with different parameters (such as color and opacity) render correctly. Need to figure out how to best destroy lingering materials; material count increases by two (assuming two vector layers in scene) each time an edit is done to a layer's Color/Light/Dark Texturing Style settings, although this eventually seems to reset to a lower number after a number of sequential edits.

* Removed InstantiateLayerMaterials method; AssignAssets now checks for existing material assignments in materials array; destroys them if so.

* Removed extra line.

* Removed outdated comment.

* Added Debug messages to assist with solving null ref ex thrown when switching Data Source in Unity.

* Adding Debug messages.

* Added EDITOR_FEATURE_DEFAULT_COLOR to Mapbox.Unity.Constants (matches icon for Texture Style(Color) in Editor); set new layers to use this color as a default value.

* Add `isLayerAdded` flag to layer drawers, add postProcess method to process layer addition after map is serialized.

* Remove debug statements

* Add checks for clean destruction of materials

* Change default for roads to be dark instead of custom.

* Resaved scenes with Vector Features in Unity 2017.4.2f2
- Destroyed exiting Vector Features
- Recreated previously Features
- Checked scenes in Preview and Play to ensure `Destroying assets is not permitted to avoid data loss.` was not being thrown.
- Saved scenes

* Changed existing Destroy calls in ReplaceFeatureModifier to work with Editor Preview.

* fix (recreate) the building layer in astronaut scene (mapbox#1257)

* Removed unused vars.

* Set tile provider gameObject to be named "TileProvider"

* fix a bug where clear methods of modifiers wasn't called before modifier destruction

* - AbstractMap : Changed Destroy(tr.gameObject) to tr.gameObject.Destroy()
- ReplaceFeatureModifier : Initialize method finds AbstractMap and parents _poolGameObject to it.

* Changed foreach loop to use for loop that iterates downwards from last child index to first to ensure leftover gameObjects are cleaned out correctly.

* - EditorHelper: Removed child object destruction code that used GetComponentsInChildren<UnityTile>(); calls AbstractMap.DestroyChildObjects() instead
- Removed call to replaceFeatureModifier.Clear() in ReplaceFeatureCollectionModifier.Initialize;

* AbstractMap ref now stored as a private static var; initialize will use FindObjectOfType to get AbstractMap ref if AM var is null, resulting in smaller initialization cost.

* Made _poolGameObject private static; added null check for _poolGameObject in Initialize; _poolGameObject will be created if null.

* Removed Debug.Log statement.

* Replaced code that cleared modifiers during Initialize.

* change object inspector modifier to create canvas under map (mapbox#1256)
* change side wall modifer to clear top polygon triangles if sidewall only option is choosen

* fix the `side only` mesh generation option for height modifier
* change spawninside modifier to use mesh bound instead of collider bounds to prevent issues on tile recycling

* change collider modifier to use destroyimmediate instead of destroy to prevent delayed destruction messing up some raycasts

* change spawninside modifier to use mesh bound instead of collider bounds to prevent issues on tile recycling

* change collider modifier to use destroyimmediate instead of destroy to prevent delayed destruction messing up some raycasts
mapbox#1265)

* fix an issue where image compression was disabled for one of the images making it take 4x space

* Set mipBias to -1
* Replaced arScenesPath variable.

* Reversed bool var check

* Add check to determine if directory exists before adding AR scenes
* add Streets V8 option to Vector data sources

* fix a bug where add filter button didnt work for v8 dataset

* change enum indexes to move streets V8 top

* Add `StreetsV8WithBuildingIds` option
* remove old frame delay  from vector layer visualizer

* rename sprite assets
* remove map editor (node editor)

* revert project settings file
…box#1310)

* update API docs urls to new format

* Remove Android native LocationProvider toast message for GPS fix

* update API docs urls to new format

* Remove Android native LocationProvider toast message for GPS fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants