-
Notifications
You must be signed in to change notification settings - Fork 225
Map update develop merge fresh #994
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
Conversation
…Data method, which overrides DataFetcher.FetchData and accepts DataFetcherParameters as the sole param, which is them cast to required subclasses as needed.
…using _activeTiles dictionary in AbstractMapVisualizer instead. MapVisualizer.RedrawImageLayer listens for event OnMapIdUpdated and handles business of redrawing/refetching image layer, triggering event MapVisualizer.OnImageLayerRedrawn upon completion. Public event AbstractMap.OnImageLayerRedrawn listens for event MapVisualizer.OnImageLayerRedrawn; developers can register custom gameplay functions to listen for this event in their code.
…d return type of TerrainLayer.Factory to TerrainFactoryBase; was being downcast to AbstractMapTileFactory.
… map visualizer add current terrain strategy field in unity tile
…ges, and do so by calling UpdateProperty in the property script. Removed INotify interface; replaced with simple delegate events instead.
change VectorLayer to inherit from AbstractLayer
…ct map remove layer redrawn even in map visualizer as command is coming from abstract map now anyway create OnMapRedrawn event in abstract map to replace individual layer events
…e class they are drawing; initial work on getting general section to trigger changes in UI.
…m/mapbox/mapbox-unity-sdk into INotifyPropetyChanged-exploration
… out SetChildProperties call in AbstractMap line 498.
…sed null values merged OnErrorOccurred and OnError methods in factories change vector layer visualizer to create new modules iff they do not already exist (work in progress)
…Drawer.UpdateProperty to ensure update map functionality uses up-to-date data.
…-merge-fresh # Conflicts: # sdkproject/Assets/Mapbox/Unity/Editor/MapManagerEditor.cs # sdkproject/Assets/Mapbox/Unity/Editor/PropertyDrawers/ElevationLayerPropertiesDrawer.cs # sdkproject/Assets/Mapbox/Unity/Map/AbstractMapVisualizer.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Data/UnityTile.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/AbstractTileFactory.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/ImageDataFetcher.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/MapImageFactory.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/TerrainDataFetcher.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/TerrainFactoryBase.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/TerrainStrategies/ElevatedTerrainStrategy.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/TerrainStrategies/FlatSphereTerrainStrategy.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/TerrainStrategies/LowPolyTerrainStrategy.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/VectorDataFetcher.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Factories/VectorTileFactory.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/LayerVisualizers/VectorLayerVisualizer.cs
fix an issue where terrain layer update didn't handle vector layer corrections (snap terrain) correct
…tement from Earcut.cs
…ayer feature sub property drawers.
…ctLayer.cs function calls with VectorUpdateType enum. UpdateProperty passes new VectorUpdate class instead of serializedProperty. Added additional delegates to VectorLayerProperties for different update types, but maybe we can call OnPropertyUpdated and pass/return VectorUpdateType? Maybe do public Func<VectorUpdateType, VectorUpdateType> OnPropertyUpdated = delegate { return VectorUpdateType}?
…roperties inherits from this. VectorLayerVisualizer assigns methods to delegate; temp solution displays debug messages for "Update Colliders" and "Update Materials". Both property drawers use hard coded 0 index to get a vectorSubLayer, need to find a way to get correct sublayer index to proceed.
…r; vector update is now triggered from material/collider option delegates, figures out which logic it needs to run via dictionary lookup, which retrieves funcion.
…wers now use EditorHelper.GetTargetObjectOfProperty to get class instance, and result check of ApplyModifiedProperties bool value to set HasChanged to true.
…re specific property sets w/ HasChanged = true.
…alls. Removed VectorUpdate class and UpdateProperty method from VectorLayerPropertiesDrawer. LayerProperties now inherits from MapboxDataProperty class. Removed unused OnPropertyUpdatedComplete/Collider/Material delegates from VectorLayerProperties.
…ved Begin/End change check calls, using bool result of ApplyModifiedProperties() to set HasChanged property.
… previous commit. Changed AbstractLayer.NotifyUpdateLayer and AbstractLayer.UpdateLayerHandler to use bool instead of VectorUpdateType as second argument.
…dditional layer delegates.
…lper.GetTargetObjectOfProperty(property) method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greglemonmapbox @brnkhy Could you please go through the comments and review.
} | ||
} | ||
|
||
public int layerId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need an id in GeometryMaterialOptions? LayerId should be part of feature sublayer properties.
using System.Linq; | ||
using System.Reflection; | ||
|
||
namespace com.spacepuppyeditor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this namespace to Mapbox.Editor , Add acknowledgement for spacepuppyeditor dev , remove all commented code.
if (element.Contains("[")) | ||
{ | ||
//var tp = obj.GetType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function can me made to work by swapping the commented lines with the uncommented ones.
using UnityEngine; | ||
using Mapbox.Unity.Map; | ||
using Mapbox.VectorTile.ExtensionMethods; | ||
using com.spacepuppyeditor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace namespace with mapbox.editor.
using System.Linq; | ||
using System; | ||
using Mapbox.VectorTile.ExtensionMethods; | ||
using com.spacepuppyeditor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with Mapbox.editor.
} | ||
|
||
if (tile.MeshFilter.mesh.vertexCount == 0) | ||
//_newVertexList.Count is the vertex count this strategy is expected to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment relevant? the check is changed to a different thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no not anymore, that check will probably change soon as well
} | ||
|
||
if (tile.MeshFilter.mesh.vertexCount == 0) | ||
//_newVertexList.Count is the vertex count this strategy is expected to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment if not relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
} | ||
|
||
//OnColliderChange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
|
||
_defaultStack.MeshModifiers.AddRange(defaultMeshModifierStack); | ||
_defaultStack.GoModifiers.AddRange(defaultGOModifierStack); | ||
//_defaultStack.MeshModifiers.AddRange(defaultMeshModifierStack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented by mistake? Where are we adding default modifiers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atripathi-mb it's adding default modifiers directly to the list. previously they were added to defaultMeshModifierStack
and that list was added to the real mesh mod list using add range.
using System; | ||
using Mapbox.Unity.MeshGeneration.Data; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move MapboxDataProperty to it's own file. Also, namespace for MapboxDataProperty should not be Mapbox.Unity.MeshGeneration.Modifiers
…related to serialized property work and those referencing external classes; removed dead/commented code. Changed using com.spacepuppyeditor to Mapbox.Editor in relevant classes.
…rHelper.CheckForModifiedProperty.
…ugging removed comments from older versions of the ElevatedTerrainStrategy file removed two commented out lines in VectorLayerVisualizer to prevent confusion
* develop: Terrain section event refactor apply property changes at end of gui (#1009) fix an issue where TerrainFactoryBase didn't respect "none" terrain option (#1006) API's for runtime editing. (#1005) Image section event refactor (#1002) Fix buildingid setting (#998) Map update develop merge fresh (#994) Improve query height method (#979) Mid floor calculation bug fix (#968) Updated changelog version to v1.4.6 update changelog change ElevatedTerrainStrategy and ElevatedTerrainWithSidesStrategy classes to create flat terrain mesh on height data errors UWP fixes (and more) (#945)
Related issue
Runtime map updating
Description of changes
Known issues
QA checklists
<summary>
description as well as description of parameters.Reviewers
Tag your reviewer(s). Choose wisely.