remove obsoletes

main
runette 7 months ago
parent ada9e96f13
commit 4b2c383ca5
  1. 4
      Unity/Editor/EditorHelper.cs
  2. 9
      Unity/MeshGeneration/Factories/DirectionsFactory.cs
  3. 2
      Unity/MeshGeneration/Modifiers/MeshModifiers/ReplaceFeatureModifier.cs

@ -22,7 +22,7 @@
{ {
if (Application.isEditor) if (Application.isEditor)
{ {
AbstractMap abstractMap = UnityEngine.Object.FindObjectOfType<AbstractMap>(); AbstractMap abstractMap = UnityEngine.Object.FindFirstObjectByType<AbstractMap>();
if (abstractMap == null) if (abstractMap == null)
{ {
@ -286,4 +286,4 @@
return cnt; return cnt;
} }
} }
} }

@ -41,17 +41,15 @@ namespace Mapbox.Unity.MeshGeneration.Factories
private List<Vector3> _cachedWaypoints; private List<Vector3> _cachedWaypoints;
private Directions _directions; private Directions _directions;
private int _counter; private int _counter;
private bool _isDragging = false;
private Vector3[] _pointArray; private Vector3[] _pointArray;
private Vector3 _pointUpDelta = new Vector3(0, 3, 0); private Vector3 _pointUpDelta = new Vector3(0, 3, 0);
GameObject _directionsGO; GameObject _directionsGO;
private bool _recalculateNext;
protected virtual void Awake() protected virtual void Awake()
{ {
if (_map == null) if (_map == null)
{ {
_map = FindObjectOfType<AbstractMap>(); _map = FindFirstObjectByType<AbstractMap>();
} }
_directions = MapboxAccess.Instance.Directions; _directions = MapboxAccess.Instance.Directions;
@ -73,7 +71,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories
ArrangingWaypointsStarted(); ArrangingWaypointsStarted();
_lineRenderer.gameObject.SetActive(true); _lineRenderer.gameObject.SetActive(true);
_directionsGO.SetActive(false); _directionsGO.SetActive(false);
_isDragging = true;
}; };
wp.MouseDraging += () => wp.MouseDraging += () =>
@ -91,7 +88,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories
{ {
ArrangingWaypointsFinished(); ArrangingWaypointsFinished();
_lineRenderer.gameObject.SetActive(false); _lineRenderer.gameObject.SetActive(false);
_isDragging = false;
Query(); Query();
}; };
} }
@ -105,7 +101,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories
_cachedWaypoints.Add(item.position); _cachedWaypoints.Add(item.position);
} }
_recalculateNext = false;
_loftModifier.Initialize(); _loftModifier.Initialize();
} }
@ -236,4 +231,4 @@ namespace Mapbox.Unity.MeshGeneration.Factories
} }
} }
} }
} }

@ -92,7 +92,7 @@
} }
if(_abstractMap == null) if(_abstractMap == null)
{ {
_abstractMap = FindObjectOfType<AbstractMap>(); _abstractMap = FindFirstObjectByType<AbstractMap>();
} }
if(_abstractMap != null) if(_abstractMap != null)
{ {

Loading…
Cancel
Save