Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit b7a688d

Browse files
committed
standardize on unity 2021.3.26f1
1 parent 4bc5300 commit b7a688d

File tree

4 files changed

+13
-54
lines changed

4 files changed

+13
-54
lines changed

Assets/TestScripts/TestMap.cs

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,17 @@ bool Toolbar(MapBehaviour map)
116116
layerMessage = "\nZoom out!";
117117
else if (map.CurrentZoom < layers[currentLayerIndex].MinZoom)
118118
layerMessage = "\nZoom in!";
119+
119120
if (GUILayout.Button(((layers != null && currentLayerIndex < layers.Count) ? layers[currentLayerIndex].name + layerMessage : "Layer"), GUILayout.ExpandHeight(true)))
120121
{
121-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
122-
layers[currentLayerIndex].gameObject.SetActiveRecursively(false);
123-
#else
124122
layers[currentLayerIndex].gameObject.SetActive(false);
125-
#endif
126123
++currentLayerIndex;
127-
if (currentLayerIndex >= layers.Count)
128-
currentLayerIndex = 0;
129-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
130-
layers[currentLayerIndex].gameObject.SetActiveRecursively(true);
131-
#else
124+
if (currentLayerIndex >= layers.Count)
125+
{
126+
currentLayerIndex = 0;
127+
}
128+
132129
layers[currentLayerIndex].gameObject.SetActive(true);
133-
#endif
134130
map.IsDirty = true;
135131
}
136132

@@ -191,24 +187,15 @@ private IEnumerator Start()
191187
WMSTileLayerBehaviour wmsLayer = map.CreateLayer<WMSTileLayerBehaviour>("WMS");
192188
wmsLayer.BaseURL = "http://ows.mundialis.de/services/service?";
193189
wmsLayer.Layers = "TOPO-OSM-WMS";
194-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
195-
wmsLayer.gameObject.SetActiveRecursively(false);
196-
#else
197190
wmsLayer.gameObject.SetActive(false);
198-
#endif
199191

200192
layers.Add(wmsLayer);
201193

202194
// create a VirtualEarth tile layer
203195
VirtualEarthTileLayerBehaviour virtualEarthLayer = map.CreateLayer<VirtualEarthTileLayerBehaviour>("VirtualEarth");
204196
// Note: this is the key UnitySlippyMap, DO NOT use it for any other purpose than testing
205197
virtualEarthLayer.Key = "ArgkafZs0o_PGBuyg468RaapkeIQce996gkyCe8JN30MjY92zC_2hcgBU_rHVUwT";
206-
207-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
208-
virtualEarthLayer.gameObject.SetActiveRecursively(false);
209-
#else
210198
virtualEarthLayer.gameObject.SetActive(false);
211-
#endif
212199

213200
layers.Add(virtualEarthLayer);
214201

@@ -262,11 +249,7 @@ private IEnumerator Start()
262249
Debug.Log("DEBUG: using MBTiles file: " + filepath);
263250
MBTilesLayerBehaviour mbTilesLayer = map.CreateLayer<MBTilesLayerBehaviour>("MBTiles");
264251
mbTilesLayer.Filepath = filepath;
265-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
266-
mbTilesLayer.gameObject.SetActiveRecursively(false);
267-
#else
268252
mbTilesLayer.gameObject.SetActive(false);
269-
#endif
270253

271254
layers.Add(mbTilesLayer);
272255
}

Assets/UnitySlippyMap/Map/MapBehaviour.cs

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,13 +1000,9 @@ private void Update ()
10001000
}
10011001

10021002
if (locationMarker != null) {
1003-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1004-
if (locationMarker.gameObject.active == false)
1005-
locationMarker.gameObject.SetActiveRecursively(true);
1006-
#else
10071003
if (locationMarker.gameObject.activeSelf == false)
10081004
locationMarker.gameObject.SetActive (true);
1009-
#endif
1005+
10101006
if (UnityEngine.Input.location.lastData.longitude <= 180.0f
10111007
&& UnityEngine.Input.location.lastData.longitude >= -180.0f
10121008
&& UnityEngine.Input.location.lastData.latitude <= 90.0f
@@ -1083,31 +1079,20 @@ private void Update ()
10831079
IsDirty = false;
10841080

10851081
if (locationMarker != null
1086-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1087-
&& locationMarker.gameObject.active == true)
1088-
#else
10891082
&& locationMarker.gameObject.activeSelf == true)
1090-
#endif
10911083
locationMarker.UpdateMarker ();
10921084

10931085
foreach (LayerBehaviour layer in layers) {
1094-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1095-
if (layer.gameObject.active == true
1096-
#else
1086+
10971087
if (layer.gameObject.activeSelf == true
1098-
#endif
10991088
&& layer.enabled == true
11001089
&& CurrentZoom >= layer.MinZoom
11011090
&& CurrentZoom <= layer.MaxZoom)
11021091
layer.UpdateContent ();
11031092
}
11041093

11051094
foreach (MarkerBehaviour marker in markers) {
1106-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1107-
if (marker.gameObject.active == true
1108-
#else
11091095
if (marker.gameObject.activeSelf == true
1110-
#endif
11111096
&& marker.enabled == true)
11121097
marker.UpdateMarker ();
11131098
}
@@ -1138,11 +1123,7 @@ private void Update ()
11381123
public void CenterOnLocation ()
11391124
{
11401125
if (locationMarker != null
1141-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1142-
&& locationMarker.gameObject.active == true)
1143-
#else
11441126
&& locationMarker.gameObject.activeSelf == true)
1145-
#endif
11461127
CenterWGS84 = locationMarker.CoordinatesWGS84;
11471128
updatesCenterWithLocation = true;
11481129
}
@@ -1189,11 +1170,7 @@ public T SetLocationMarker<T> (GameObject locationGo, GameObject orientationGo)
11891170
UnityEngine.Input.location.lastData.latitude
11901171
};
11911172
else
1192-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
1193-
markerObject.SetActiveRecursively(false);
1194-
#else
11951173
markerObject.SetActive (false);
1196-
#endif
11971174

11981175
// set the location marker
11991176
locationMarker = marker;

Assets/UnitySlippyMap/Markers/LocationMarkerBehaviour.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ public Transform OrientationMarker {
5454
if (orientationMarker != null) {
5555
orientationMarker.parent = this.transform;
5656
orientationMarker.localPosition = Vector3.zero;
57-
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
58-
orientationMarker.gameObject.SetActiveRecursively(this.gameObject.active);
59-
#else
6057
orientationMarker.gameObject.SetActive (this.gameObject.activeSelf);
61-
#endif
6258
}
6359
}
6460
}

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ UnitySlippyMap is in alpha stage and currently supports:
2121
* [VirtualEarth/Bing maps tiles](http://www.microsoft.com/maps/)
2222
* [MBTiles databases](http://mapbox.com/developers/mbtiles/)
2323

24-
It is tested in Unity3D Editor 3.5.6f4 & 4.0.0, and on iOS (beware the [Unity 4 GPS bug](http://forum.unity3d.com/threads/159257-Unity-4.0-iOS-GPS-Fix)) and Android devices.
25-
2624
See the [TODO list](/jderrough/UnitySlippyMap#todo) if you want to contribute and don't know where to start.
2725

2826
License
2927
-------
3028

3129
UnitySplippyMap is released under the [MIT License](https://opensource.org/licenses/MIT).
3230

31+
Unity Version
32+
-------------
33+
34+
UnitySplippyMap requires at least Unity 2021.3.26f1
35+
3336
TODO
3437
----
3538

0 commit comments

Comments
 (0)