Skip to content

Commit 2d9d667

Browse files
authored
Fix satellite imagery on roof not working. (#638)
* Fix satellite imagery on roof not working. * Remove commented code. * Update changelog
1 parent 41cbdc7 commit 2d9d667

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

documentation/docs/05-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Don't allow empty names for layer visualizers.
2020
- Fix foldouts not retaining states between play mode & editor.
2121
- Add missing tooltips.
22+
- Fix issue with Satellite TextureType.
2223

2324
### v.1.4.0
2425
*03/20/2018*

sdkproject/Assets/Mapbox/Unity/DataContainers/GeometryMaterialOptions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ public override Type ModifierType
1515
return typeof(MaterialModifier);
1616
}
1717
}
18-
[Tooltip("Use image texture from the Imagery source as texture for roofs. ")]
19-
public bool projectMapImagery;
2018
public UvMapType texturingType = UvMapType.Tiled;
2119
public MaterialList[] materials = new MaterialList[2];
2220
public AtlasInfo atlasInfo;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override void Run(VectorEntity ve, UnityTile tile)
2626
var min = Math.Min(_options.materials.Length, ve.MeshFilter.mesh.subMeshCount);
2727
var mats = new Material[min];
2828

29-
if (!_options.projectMapImagery)
29+
if (_options.texturingType != UvMapType.Satellite)
3030
{
3131
for (int i = 0; i < min; i++)
3232
{
@@ -37,7 +37,7 @@ public override void Run(VectorEntity ve, UnityTile tile)
3737
{
3838
for (int i = 0; i < min; i++)
3939
{
40-
mats[i] = Instantiate(_options.materials[i].Materials[UnityEngine.Random.Range(0, _options.materials[i].Materials.Length)]);
40+
mats[i] = _options.materials[i].Materials[UnityEngine.Random.Range(0, _options.materials[i].Materials.Length)];
4141
}
4242

4343
mats[0].mainTexture = tile.GetRasterData();

0 commit comments

Comments
 (0)