Skip to content

Commit 8ed8533

Browse files
committed
Merge branch 'master' into merge-master-develop
* master: V1.4.2 hotfix (#780) Release/v1.4.2 (#772) Release/v1.4.1 (#682) # Conflicts: # documentation/docs/05-changelog.md # sdkproject/Assets/Mapbox/Unity/LayerProperties/CoreVectorLayerProperties.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Modifiers/GameObjectModifiers/PrefabModifier.cs
2 parents 12f3292 + 8919242 commit 8ed8533

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

documentation/docs/05-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#### Bug Fixes
3030
- Added checks to prevent NRE in `GeocodeAttributeSearchWindow` when searching with an invalid token or no connection.
3131
- Fix issue where side wall mesh generation did not work with elevated terrain.
32+
- Fix issue with scaling prefabs for POI's. Enables correct scaling of objects with map.
3233

3334
#### Known Issues
3435
- `Filters` with empty key or value parameters will exclude all features in a layer.

sdkproject/Assets/Mapbox/Unity/LayerProperties/CoreVectorLayerProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
public class CoreVectorLayerProperties
1010
{
1111
[SerializeField]
12-
private string sourceId = "";
12+
private string sourceId;
1313
[Tooltip("Is visualizer active.")]
1414
public bool isActive = true;
1515
[Tooltip("Name of the visualizer. ")]

sdkproject/Assets/Mapbox/Unity/MeshGeneration/Modifiers/GameObjectModifiers/PrefabModifier.cs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ namespace Mapbox.Unity.MeshGeneration.Modifiers
1111
[CreateAssetMenu(menuName = "Mapbox/Modifiers/Prefab Modifier")]
1212
public class PrefabModifier : GameObjectModifier
1313
{
14-
//[SerializeField]
15-
//private GameObject _prefab;
16-
17-
//[SerializeField]
18-
//private bool _scaleDownWithWorld = false;
19-
2014
private Dictionary<GameObject, GameObject> _objects;
2115
[SerializeField]
2216
private SpawnPrefabOptions _options;
@@ -63,11 +57,11 @@ public override void Run(VectorEntity ve, UnityTile tile)
6357
{
6458
goRectTransform.anchoredPosition3D = met;
6559
}
60+
//go.transform.localScale = Constants.Math.Vector3One;
6661

67-
68-
if (!_options.scaleDownWithWorld)
62+
if (_options.scaleDownWithWorld)
6963
{
70-
go.transform.localScale = (go.transform.localScale * (1.0f / tile.TileScale));
64+
go.transform.localScale = (go.transform.localScale * (tile.TileScale));
7165
}
7266
return;
7367
}
@@ -89,19 +83,18 @@ public override void Run(VectorEntity ve, UnityTile tile)
8983
{
9084
goRectTransform.anchoredPosition3D = met;
9185
}
92-
9386
go.transform.SetParent(ve.GameObject.transform, false);
94-
go.transform.localScale = Constants.Math.Vector3One;
87+
//go.transform.localScale = Constants.Math.Vector3One;
9588

9689
settable = go.GetComponent<IFeaturePropertySettable>();
9790
if (settable != null)
9891
{
9992
settable.Set(ve.Feature.Properties);
10093
}
10194

102-
if (!_options.scaleDownWithWorld)
95+
if (_options.scaleDownWithWorld)
10396
{
104-
go.transform.localScale = (go.transform.localScale * (1.0f / tile.TileScale));
97+
go.transform.localScale = (go.transform.localScale * (tile.TileScale));
10598
}
10699

107100
if (_options.AllPrefabsInstatiated != null)

0 commit comments

Comments
 (0)