You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
875 B
34 lines
875 B
namespace Mapbox.Unity.Map
|
|
{
|
|
using System;
|
|
using UnityEngine;
|
|
[Serializable]
|
|
public class CameraBoundsTileProviderOptions : ExtentOptions
|
|
{
|
|
public Camera camera;
|
|
public int visibleBuffer;
|
|
public int disposeBuffer;
|
|
|
|
public override void SetOptions(ExtentOptions extentOptions)
|
|
{
|
|
CameraBoundsTileProviderOptions options = extentOptions as CameraBoundsTileProviderOptions;
|
|
if (options != null)
|
|
{
|
|
camera = options.camera;
|
|
visibleBuffer = options.visibleBuffer;
|
|
disposeBuffer = options.disposeBuffer;
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError("ExtentOptions type mismatch : Using " + extentOptions.GetType() + " to set extent of type " + this.GetType());
|
|
}
|
|
}
|
|
|
|
public void SetOptions(Camera mapCamera, int visibleRange, int disposeRange)
|
|
{
|
|
camera = mapCamera;
|
|
visibleBuffer = visibleRange;
|
|
disposeBuffer = disposeRange;
|
|
}
|
|
}
|
|
}
|
|
|