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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void SendLocationEvent()
}


void OnValidate()
protected virtual void OnValidate()
{
if (_sendEvent)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class DeviceLocationProvider : AbstractLocationProvider
#endif


void Awake()
protected virtual void Awake()
{
_currentLocation.Provider = "unity";
_wait1sec = new WaitForSeconds(1f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,12 @@ private void shutdown()
}


private void OnDestroy() { shutdown(); }
protected virtual void OnDestroy() { shutdown(); }


private void OnDisable() { shutdown(); }
protected virtual void OnDisable() { shutdown(); }






void Awake()
protected virtual void Awake()
{

_wait1sec = new WaitForSeconds(1);
Expand Down Expand Up @@ -387,7 +382,7 @@ private void populateWithBetterLocation(AndroidJavaObject locGps, AndroidJavaObj



private void Update()
protected virtual void Update()
{

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EditorLocationProvider : AbstractEditorLocationProvider
bool _mapInitialized;

#if UNITY_EDITOR
protected void Start()
protected virtual void Start()
{
LocationProviderFactory.Instance.mapManager.OnInitialized += Map_OnInitialized;
//_map.OnInitialized += Map_OnInitialized;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public ILocationProvider DeviceLocationProvider
/// <summary>
/// Create singleton instance and inject the DefaultLocationProvider upon initialization of this component.
/// </summary>
private void Awake()
protected virtual void Awake()
{
if (Instance != null)
{
Expand Down
4 changes: 2 additions & 2 deletions sdkproject/Assets/Mapbox/Unity/Map/AbstractMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ public void SetWorldRelativeScale(float scale)
/// </summary>
public event Action OnUpdated = delegate { };

void Awake()
protected virtual void Awake()
{
// Setup a visualizer to get a "Starter" map.
_mapVisualizer = ScriptableObject.CreateInstance<MapVisualizer>();
}

// Use this for initialization
void Start()
protected virtual void Start()
{
StartCoroutine("SetupAccess");
if (_initializeOnStart)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public override void OnInitialized()
toRemove = new List<UnwrappedTileId>();
}

void Update()
protected virtual void Update()
{
if (!_shouldUpdate)
{
Expand Down
7 changes: 0 additions & 7 deletions sdkproject/Assets/Mapbox/Unity/Map/GlobeTileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ public override void OnInitialized()
{
throw new System.Exception("Too many tiles! Use a lower zoom level!");
}
}
private void Update()
{
if (_map.AbsoluteZoom > 5)
{
throw new System.Exception("Too many tiles! Use a lower zoom level!");
}

var tileCover = TileCover.Get(Vector2dBounds.World(), _map.AbsoluteZoom);
foreach (var tile in tileCover)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ public class InitializeMapWithLocationProvider : MonoBehaviour
AbstractMap _map;

ILocationProvider _locationProvider;

private void Awake()
{
// Prevent double initialization of the map.
_map.InitializeOnStart = false;
}

IEnumerator Start()
protected virtual IEnumerator Start()
{
yield return null;
_locationProvider = LocationProviderFactory.Instance.DefaultLocationProvider;
Expand Down
2 changes: 1 addition & 1 deletion sdkproject/Assets/Mapbox/Unity/Map/QuadTreeTileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void OnInitialized()
_shouldUpdate = true;
}

void Update()
protected virtual void Update()
{
//Camera Debugging
//Vector3[] frustumCorners = new Vector3[4];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public override void OnInitialized()
_cachedTile = new UnwrappedTileId();
}

private void Update()
protected virtual void Update()
{
if (!_initialized) return;

Expand Down
2 changes: 1 addition & 1 deletion sdkproject/Assets/Mapbox/Unity/Map/RangeTileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override void OnInitialized()
_initialized = true;
}

private void Update()
protected virtual void Update()
{
if (!_initialized)
{
Expand Down
4 changes: 2 additions & 2 deletions sdkproject/Assets/Mapbox/Unity/Map/TileErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TileErrorHandler : MonoBehaviour
public TileErrorEvent OnTileError;


void OnEnable()
protected virtual void OnEnable()
{
if (_mapInstance == null)
{
Expand Down Expand Up @@ -83,7 +83,7 @@ private string printMessage(List<Exception> exceptions, TileErrorEventArgs e)
}


void OnDisable()
protected virtual void OnDisable()
{
_mapInstance.MapVisualizer.OnTileError -= _OnTileErrorHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class VertexDebugger : MonoBehaviour
[Multiline(10)]
public string Triangles;

void Start()
protected virtual void Start()
{
var mf = GetComponent<MeshFilter>();
if (mf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class VertexDebuggerGizmo : MonoBehaviour

Mesh _mesh;

void Start()
protected virtual void Start()
{
var mf = GetComponent<MeshFilter>();
if (mf)
Expand All @@ -31,7 +31,7 @@ void Start()
}
}

void OnDrawGizmosSelected()
protected virtual void OnDrawGizmosSelected()
{
if (_mesh)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void AddOnValidateEvent(UnityAction action)
m_OnValidate.AddListener(action);
}

private void OnValidate()
protected virtual void OnValidate()
{
if(m_OnValidate != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void Cancel()
}
}

void OnDestroy()
protected virtual void OnDestroy()
{
Cancel();
if (_heightTexture != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class DirectionsFactory : MonoBehaviour

GameObject _directionsGO;

void Awake()
protected virtual void Awake()
{
if (_map == null)
{
Expand All @@ -43,7 +43,7 @@ void Awake()
_map.OnUpdated += Query;
}

void OnDestroy()
protected virtual void OnDestroy()
{
_map.OnInitialized -= Query;
_map.OnUpdated -= Query;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public string MapId
}

#region UnityMethods
private void OnDestroy()
protected virtual void OnDestroy()
{
if (DataFetcher != null)
{
Expand All @@ -60,7 +60,7 @@ private void OnImageRecieved(UnityTile tile, RasterTile rasterTile)
}

//merge this with OnErrorOccurred?
private void OnDataError(UnityTile tile, TileErrorEventArgs e)
protected virtual void OnDataError(UnityTile tile, TileErrorEventArgs e)
{
if (tile != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MergedModifierStack : ModifierStackBase

private int _counter, _counter2;

private void OnEnable()
protected virtual void OnEnable()
{
//we'll use this to concat building data until it reaches 65000 verts
_pool = new ObjectPool<VectorEntity>(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class LineMeshModifier : MeshModifier
private float _scaledWidth;
public override ModifierType Type { get { return ModifierType.Preprocess; } }

private void OnEnable()
protected virtual void OnEnable()
{
_scaledWidth = Width;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ModifierStack : ModifierStackBase

[NonSerialized] private int _counter;
[NonSerialized] private int _secondCounter;
private void OnEnable()
protected virtual void OnEnable()
{
_pool = new ObjectPool<VectorEntity>(() =>
{
Expand Down
2 changes: 1 addition & 1 deletion sdkproject/Assets/Mapbox/Unity/Utilities/Console.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Console : MonoBehaviour
string _log;


void Awake()
protected virtual void Awake()
{
if (_instance != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DontDestroyOnLoad : MonoBehaviour
[SerializeField]
bool _useSingleInstance;

void Awake()
protected virtual void Awake()
{
if (_instance != null && _useSingleInstance)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class MapVisualizerPerformance : MonoBehaviour
public float TotalTime = 0;
private float _firstRun;

private void Awake()
protected virtual void Awake()
{
TotalTime = 0;
_currentTest = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class OpenUrlOnButtonClick : MonoBehaviour
[SerializeField]
string _url;

void Awake()
protected virtual void Awake()
{
GetComponent<Button>().onClick.AddListener(VisitUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class TelemetryConfigurationButton : MonoBehaviour
[SerializeField]
bool _booleanValue;

void Awake()
protected virtual void Awake()
{
GetComponent<Button>().onClick.AddListener(SetPlayerPref);
}
Expand Down