Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions documentation/docs/05-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#### Bug Fixes
- Added checks to prevent NRE in `GeocodeAttributeSearchWindow` when searching with an invalid token or no connection.
- Fix issue where side wall mesh generation did not work with elevated terrain.
- Fix issue with scaling prefabs for POI's. Enables correct scaling of objects with map.

#### Known Issues
- `Filters` with empty key or value parameters will exclude all features in a layer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class CoreVectorLayerProperties
{
[SerializeField]
private string sourceId = "";
private string sourceId;
[Tooltip("Is visualizer active.")]
public bool isActive = true;
[Tooltip("Name of the visualizer. ")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ namespace Mapbox.Unity.MeshGeneration.Modifiers
[CreateAssetMenu(menuName = "Mapbox/Modifiers/Prefab Modifier")]
public class PrefabModifier : GameObjectModifier
{
//[SerializeField]
//private GameObject _prefab;

//[SerializeField]
//private bool _scaleDownWithWorld = false;

private Dictionary<GameObject, GameObject> _objects;
[SerializeField]
private SpawnPrefabOptions _options;
Expand Down Expand Up @@ -63,11 +57,11 @@ public override void Run(VectorEntity ve, UnityTile tile)
{
goRectTransform.anchoredPosition3D = met;
}
//go.transform.localScale = Constants.Math.Vector3One;


if (!_options.scaleDownWithWorld)
if (_options.scaleDownWithWorld)
{
go.transform.localScale = (go.transform.localScale * (1.0f / tile.TileScale));
go.transform.localScale = (go.transform.localScale * (tile.TileScale));
}
return;
}
Expand All @@ -89,19 +83,18 @@ public override void Run(VectorEntity ve, UnityTile tile)
{
goRectTransform.anchoredPosition3D = met;
}

go.transform.SetParent(ve.GameObject.transform, false);
go.transform.localScale = Constants.Math.Vector3One;
//go.transform.localScale = Constants.Math.Vector3One;

settable = go.GetComponent<IFeaturePropertySettable>();
if (settable != null)
{
settable.Set(ve.Feature.Properties);
}

if (!_options.scaleDownWithWorld)
if (_options.scaleDownWithWorld)
{
go.transform.localScale = (go.transform.localScale * (1.0f / tile.TileScale));
go.transform.localScale = (go.transform.localScale * (tile.TileScale));
}

if (_options.AllPrefabsInstatiated != null)
Expand Down