├── Assets ├── BaiduMap.meta ├── BaiduMap │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Map.prefab │ │ └── Map.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── CSharp.meta │ │ └── CSharp │ │ │ ├── Class.meta │ │ │ ├── Class │ │ │ ├── TileData.cs │ │ │ ├── TileData.cs.meta │ │ │ ├── Vector2D.cs │ │ │ └── Vector2D.cs.meta │ │ │ ├── Common.meta │ │ │ ├── Common │ │ │ ├── MathCommon.cs │ │ │ └── MathCommon.cs.meta │ │ │ ├── MCTransform.cs │ │ │ ├── MCTransform.cs.meta │ │ │ ├── MapFunction.cs │ │ │ ├── MapFunction.cs.meta │ │ │ ├── MapServices.cs │ │ │ ├── MapServices.cs.meta │ │ │ ├── MapTile.cs │ │ │ ├── MapTile.cs.meta │ │ │ ├── MapType.cs │ │ │ ├── MapType.cs.meta │ │ │ ├── MapUtils.cs │ │ │ ├── MapUtils.cs.meta │ │ │ ├── Network.meta │ │ │ └── Network │ │ │ ├── MapHttpTools.cs │ │ │ ├── MapHttpTools.cs.meta │ │ │ ├── MapTexturePool.cs │ │ │ └── MapTexturePool.cs.meta │ ├── Textures.meta │ └── Textures │ │ ├── Default.png │ │ └── Default.png.meta ├── Demo.meta └── Demo │ ├── Scenes.meta │ ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta │ ├── Scripts.meta │ └── Scripts │ ├── CSharp.meta │ └── CSharp │ ├── Event.meta │ ├── Event │ ├── EventManager.cs │ ├── EventManager.cs.meta │ ├── IBaseEvent.cs │ ├── IBaseEvent.cs.meta │ ├── TouchMoveEvent.cs │ ├── TouchMoveEvent.cs.meta │ ├── TouchMovedEvent.cs │ ├── TouchMovedEvent.cs.meta │ ├── TouchRotateEvent.cs │ ├── TouchRotateEvent.cs.meta │ ├── TouchRotatedEvent.cs │ ├── TouchRotatedEvent.cs.meta │ ├── TouchZoomEvent.cs │ └── TouchZoomEvent.cs.meta │ ├── Test.cs │ ├── Test.cs.meta │ ├── TouchManager.cs │ └── TouchManager.cs.meta ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /Assets/BaiduMap.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 864c3b002335af24db65199f2d1d6bb0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4b3e07dd8c7b1f4d8fd79b352a9bd77 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Prefabs/Map.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0ac49e43ecf73e4187a1ca7e91fc531 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa8b1651f8027bf4b8a77399a65d62e5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f3251737fd6dce4fae797d88d5392c0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Class.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31dd9e2951573a643b514a5f715b3d19 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Class/TileData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace Achonor.LBSMap { 7 | [Serializable] 8 | public class TileData { 9 | /// 10 | /// 缩放级别 11 | /// 12 | public int zoom; 13 | /// 14 | /// 墨卡托Tile坐标 15 | /// 16 | public Vector2Int tile = new Vector2Int(); 17 | /// 18 | /// 坐标对应在Tile上的像素点 19 | /// 20 | public Vector2 pixel = new Vector2(); 21 | 22 | public string Key { 23 | get { 24 | return string.Format("{0}x{1}x{2}", zoom, tile.x, tile.y); 25 | } 26 | } 27 | 28 | public TileData(int _zoom, int tileX = 0, int tileY = 0, int pixelX = 0, int pixelY = 0) { 29 | zoom = _zoom; 30 | tile.x = tileX; 31 | tile.y = tileY; 32 | pixel.x = pixelX; 33 | pixel.y = pixelY; 34 | } 35 | 36 | /// 37 | /// 获取Tile在场景中图片的缩放比例 38 | /// 39 | /// 40 | public float GetTileScale() { 41 | return MapFunction.GetTileScale(zoom); 42 | } 43 | 44 | public override string ToString() { 45 | return string.Format("({0}, {1}, {2})", zoom, tile.ToString(), pixel.ToString()); 46 | } 47 | 48 | public double Distance(TileData tileData) { 49 | Vector2D vector1 = MapFunction.Tile2Pixel(this); 50 | Vector2D vector2 = MapFunction.Tile2Pixel(tileData); 51 | return vector1.Distance(vector2); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Class/TileData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e083f9173f073654996c5861306f6914 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Class/Vector2D.cs: -------------------------------------------------------------------------------- 1 | using Achonor.LBSMap; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public struct Vector2D { 7 | public static Vector2D Infinity = new Vector2D(double.PositiveInfinity, double.PositiveInfinity); 8 | public double x; 9 | public double y; 10 | public double longitude { 11 | get { 12 | return x; 13 | } 14 | set { 15 | x = value; 16 | } 17 | } 18 | public double latitude { 19 | get { 20 | return y; 21 | } 22 | set { 23 | y = value; 24 | } 25 | } 26 | 27 | public Vector2D(double _x, double _y) { 28 | x = _x; 29 | y = _y; 30 | } 31 | 32 | public Vector2D(UnityEngine.LocationInfo locationInfo) { 33 | x = locationInfo.longitude; 34 | y = locationInfo.latitude; 35 | } 36 | 37 | public override string ToString() { 38 | return string.Format("{0},{1}", x, y); 39 | } 40 | public static bool operator ==(Vector2D self, Vector2D value) { 41 | return self.x.DEquals(value.x) && self.y.DEquals(value.y); 42 | } 43 | public static bool operator !=(Vector2D self, Vector2D value) { 44 | return (!self.x.DEquals(value.x)) || (!self.y.DEquals(value.y)); 45 | } 46 | 47 | public static Vector2D operator *(Vector2D self, double value) { 48 | return new Vector2D(self.x * value, self.y * value); 49 | } 50 | 51 | public static Vector2D operator /(Vector2D self, double value) { 52 | return new Vector2D(self.x / value, self.y / value); 53 | } 54 | 55 | public static Vector2D operator +(Vector2D self, UnityEngine.Vector2 value) { 56 | return new Vector2D(self.x + value.x, self.y + value.y); 57 | } 58 | 59 | public double Distance(Vector2D vector2D) { 60 | return System.Math.Sqrt((x - vector2D.x) * (x - vector2D.x) + (y - vector2D.y) * (y - vector2D.y)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Class/Vector2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2136d54af0399d3428b76b0c540df6f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Common.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 207c6f61552867247afb81ce48d923cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Common/MathCommon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace Achonor.LBSMap { 7 | public static class MathCommon 8 | { 9 | public static bool FloatIsEqual(this float value1, float value2) { 10 | if (Math.Abs(value1 - value2) <= 1e-8) { 11 | return true; 12 | } 13 | return false; 14 | } 15 | 16 | public static bool DoubleIsEqual(this double value1, double value2) { 17 | if (Math.Abs(value1 - value2) <= 1e-8) { 18 | return true; 19 | } 20 | return false; 21 | } 22 | 23 | public static double GetRange(this double value, double min, double max) { 24 | if (0 != min) { 25 | value = value > min ? value : min; 26 | } 27 | if (0 != max) { 28 | value = value > max ? max : value; 29 | } 30 | return value; 31 | } 32 | 33 | public static double GetLoop(this double value, double min, double max) { 34 | while (value > max) { 35 | value -= max - min; 36 | } 37 | while (value < min) { 38 | value += max - min; 39 | } 40 | return value; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Common/MathCommon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b9697d1e64b5014d8dc7868dc3ac9be 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MCTransform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | 7 | namespace Achonor.LBSMap { 8 | /// 9 | /// 经纬度墨卡托转换 10 | /// 11 | public static class MCTransform { 12 | static double DEF_PI = 3.14159265359; // PI 13 | static double DEF_2PI = 6.28318530712; // 2 * PI 14 | static double DEF_PI180 = 0.01745329252; // PI / 180.0 15 | static double DEF_R = 6370693.5; // radius of earth 16 | 17 | private static List> LL2MC = new List>(){ 18 | new List() {-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5}, 19 | new List() {0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5}, 20 | new List() {0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5}, 21 | new List() {0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5}, 22 | new List() {-0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5}, 23 | new List() {-0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45} 24 | }; 25 | private static List> MC2LL = new List>() { 26 | new List() { 1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2 }, 27 | new List() { -7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86 }, 28 | new List() { -3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37 }, 29 | new List() { -1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06 }, 30 | new List() { 3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4 }, 31 | new List() { 2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5 } 32 | }; 33 | 34 | private static List> MCRANGE = new List>() { 35 | new List(){ 0, 0, 0, 0}, 36 | new List(){ 0, 0, 0, 0}, 37 | new List(){ 0, 0, 0, 0}, 38 | new List(){ -656596217767.76416, -383649109051.37415, 656596217665.03418, 408751445578.28906 }, 39 | new List(){ -328298108883.88208, -191824554525.68707, 328298108832.51709, 204375722789.14453 }, 40 | new List(){ -164149054441.94104, -95912277262.843536, 164149054416.25854, 102187861394.57227 }, 41 | new List(){ -82074527220.97052, -47956138631.421768, 82074527208.129272, 51093930697.286133 }, 42 | new List(){ -41037263610.48526, -23978069315.710884, 41037263604.064636, 25546965348.643066 }, 43 | new List(){ -20518631805.24263, -11989034657.855442, 20518631802.032318, 12773482674.321533 }, 44 | new List(){ -10259315902.621315, -5994517328.927721, 10259315901.016159, 6386741337.1607666 }, 45 | new List(){ -5129657951.3106575, -2997258664.4638605, 5129657950.50808, 3193370668.5803833 }, 46 | new List(){ -2564828975.6553288, -1498629332.2319303, 2564828975.25404, 1596685334.2901917 }, 47 | new List(){ -1282414487.8276644, -749314666.11596513, 1282414487.62702, 798342667.14509583 }, 48 | new List(){ -641207243.91383219, -374657333.05798256, 641207243.81351, 399171333.57254791 }, 49 | new List(){ -320603621.95691609, -187328666.52899128, 320603621.906755, 199585666.78627396 }, 50 | new List(){ -160301810.97845805, -93664333.264495641, 160301810.95337749, 99792833.393136978 }, 51 | new List(){ -80150905.489229023, -46832166.63224782, 80150905.476688743, 49896416.696568489 }, 52 | new List(){ -40075452.744614512, -23416083.31612391, 40075452.738344371, 24948208.348284245 }, 53 | new List(){ -20037726.372307256, -11708041.658061955, 20037726.369172186, 12474104.174142122 }, 54 | new List(){ -10018863.186153628, -5854020.8290309776, 10018863.184586093, 6237052.0870710611 } 55 | }; 56 | 57 | private static double[] MCBAND = { 12890594.86, 8362377.87, 5591021d, 3481989.83, 1678043.12, 0d }; 58 | private static int[] LLBAND = { 75, 60, 45, 30, 15, 0 }; 59 | 60 | private static Vector2D Convertor(double longitude, double latitude, double[] cg) { 61 | if (cg == null) { 62 | return Vector2D.Infinity; 63 | } 64 | double t = cg[0] + cg[1] * Math.Abs(longitude); 65 | double ce = Math.Abs(latitude) / cg[9]; 66 | double ch = cg[2] + cg[3] * ce + cg[4] * Math.Pow(ce, 2) + cg[5] * Math.Pow(ce, 3) + cg[6] * Math.Pow(ce, 4) + cg[7] * Math.Pow(ce, 5) + cg[8] * Math.Pow(ce, 6); 67 | t = t * (longitude < 0 ? -1 : 1); 68 | ch = ch * (latitude < 0 ? -1 : 1); 69 | return new Vector2D(t, ch); 70 | } 71 | 72 | /// 73 | /// 经纬度转墨卡托坐标 74 | /// 75 | /// 经纬度 76 | /// 77 | public static Vector2D ConvertLL2MC(Vector2D lngLat) { 78 | return ConvertLL2MC(lngLat.longitude, lngLat.latitude); 79 | } 80 | 81 | /// 82 | /// 经纬度转墨卡托坐标 83 | /// 84 | /// 经度 85 | /// 纬度 86 | /// 87 | public static Vector2D ConvertLL2MC(double longitude, double latitude) { 88 | longitude = MathCommon.GetLoop(longitude, -180, 180); 89 | latitude = MathCommon.GetRange(latitude, -74, 74); 90 | double[] cg = null; 91 | for (int cf = 0; cf < LLBAND.Length; cf++) { 92 | if (latitude >= LLBAND[cf]) { 93 | cg = LL2MC[cf].ToArray(); 94 | break; 95 | } 96 | } 97 | if (cg == null) { 98 | for (int cf = LLBAND.Length - 1; cf >= 0; cf--) { 99 | if (latitude <= -LLBAND[cf]) { 100 | cg = LL2MC[cf].ToArray(); 101 | break; 102 | } 103 | } 104 | } 105 | return Convertor(longitude, latitude, cg); 106 | } 107 | 108 | /// 109 | /// 墨卡托坐标转经纬度坐标 110 | /// 111 | /// MC坐标 112 | /// 113 | public static Vector2D ConvertMC2LL(Vector2D vector2D) { 114 | vector2D.x = MathCommon.GetRange(vector2D.x, -20037726.3691722, 20037726.3691722); 115 | vector2D.y = MathCommon.GetRange(vector2D.y, -12474104.1741421, 12474104.1741421); 116 | return ConvertMC2LL(vector2D.x, vector2D.y); 117 | } 118 | 119 | /// 120 | /// 墨卡托坐标转经纬度坐标 121 | /// 122 | /// 123 | /// 124 | /// 125 | public static Vector2D ConvertMC2LL(double x, double y) { 126 | double[] cF = null; 127 | double newX = Math.Abs(x); 128 | double newY = Math.Abs(y); 129 | 130 | for (int cE = 0; cE < MCBAND.Length; cE++) { 131 | if (newY >= MCBAND[cE]) { 132 | cF = MC2LL[cE].ToArray(); 133 | break; 134 | } 135 | } 136 | newX *= (x < 0 ? -1 : 1); 137 | newY *= (y < 0 ? -1 : 1); 138 | 139 | Vector2D result = Convertor(newX, newY, cF); 140 | return result; 141 | } 142 | } 143 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MCTransform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d663c0028b1968f4cadb49b8a9ddf5bd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapFunction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | 7 | namespace Achonor.LBSMap { 8 | 9 | public static class MapFunction { 10 | public static double DZero = 1e-8; 11 | private static float[] WORLD_POS_OFFSET = new float[] { 49123.18f, 12696.32f }; 12 | //街道图 13 | //public const string MapUrlSrc_0 = "https://maponline0.bdimg.com/starpic/?qt=satepc&u=x={0};y={1};z={2};v=009;type=sate&fm=46&app=webearth2&v=009&udt=20210112"; 14 | public const string MapUrlSrc_0 = "http://online5.map.bdimg.com/tile/?qt=vtile&x={0}&y={1}&z={2}&styles=pl&udt=20210114"; 15 | //卫星图 16 | public const string MapUrlSrc_1 = "http://shangetu3.map.bdimg.com/it/u=x={0};y={1};z={2};v=009;type=sate&fm=46&udt=20210114"; 17 | 18 | private static void CalcWorldPosOffset(ref Vector3 worldPos, bool isAdd = false) { 19 | if (isAdd) { 20 | worldPos.x += WORLD_POS_OFFSET[0]; 21 | worldPos.y += WORLD_POS_OFFSET[1]; 22 | } else { 23 | worldPos.x -= WORLD_POS_OFFSET[0]; 24 | worldPos.y -= WORLD_POS_OFFSET[1]; 25 | } 26 | } 27 | 28 | /// 29 | /// 定义10级Tile比例为1 30 | /// 18级地图 瓦片图上1个像素等于1个MC单位(详见LngLat2Tile) 1个瓦片图是256x256 31 | /// 256个MC单位等于1个Unit单位(详见LngLat2Position),18级地图1张瓦片图是1个Unit单位 32 | /// 即18级地图的瓦片图上1像素是1/256个Unit单位 10级地图上1像素是1个Unit单位 33 | /// 34 | /// 35 | /// 36 | public static float GetTileScale(int zoom) { 37 | return Mathf.Pow(2, 10 - zoom); 38 | } 39 | 40 | /// 41 | /// 获取相机高度,定义10级地图相机高度为10 42 | /// 43 | /// 44 | /// 45 | public static double GetCameraHeight(float zoom) { 46 | return 300 * Math.Pow(2, 10 - zoom); 47 | } 48 | 49 | /// 50 | /// 获取地图比例 51 | /// 52 | /// 53 | /// 54 | public static float GetMapScale(float zoom) { 55 | return Mathf.Pow(2, 10 - zoom); 56 | } 57 | 58 | public static bool DEquals(this double a, double b) { 59 | return a == b || Math.Abs(a - b) <= DZero; 60 | } 61 | 62 | /// 63 | /// 将LngLat地理坐标系转换为tile瓦片坐标系 64 | /// 65 | /// 经纬度信息 66 | /// 缩放比例 67 | /// 像素偏移 68 | /// 69 | public static TileData LngLat2Tile(Vector2D lngLat, int zoom, Vector2 pixelOffset) { 70 | TileData tileData = new TileData(zoom); 71 | //转换MC坐标 72 | Vector2D vector2D = MCTransform.ConvertLL2MC(lngLat); 73 | //转换到缩放级别 74 | vector2D *= Math.Pow(2, zoom - 18); 75 | //偏移像素 76 | vector2D += pixelOffset; 77 | tileData.tile.x = (int)(vector2D.x / 256.0); 78 | tileData.tile.y = (int)(vector2D.y / 256.0); 79 | tileData.pixel.x = ((int)vector2D.x % 256); 80 | tileData.pixel.y = ((int)vector2D.y % 256); 81 | return tileData; 82 | } 83 | 84 | /// 85 | /// 将LngLat地理坐标系转换为tile瓦片坐标系 86 | /// 87 | /// 经纬度信息 88 | /// 缩放比例 89 | public static TileData LngLat2Tile(Vector2D lngLat, int zoom) { 90 | return LngLat2Tile(lngLat, zoom, Vector2.zero); 91 | } 92 | 93 | 94 | /// 95 | /// 将tile(瓦片)坐标系转换为LngLat(地理)坐标系 96 | /// 18级地图 瓦片图上1个像素等于1个MC单位 97 | /// 98 | /// 瓦片坐标 99 | /// 瓦片上的像素坐标 100 | /// 缩放比例 101 | /// 102 | public static Vector2D Tile2LngLat(TileData tileData) { 103 | Vector2D vector2D = new Vector2D(); 104 | vector2D.x = tileData.tile.x * 256.0 + tileData.pixel.x; 105 | vector2D.y = tileData.tile.y * 256.0 + tileData.pixel.y; 106 | vector2D /= Math.Pow(2, tileData.zoom - 18); 107 | return MCTransform.ConvertMC2LL(vector2D); 108 | } 109 | 110 | /// 111 | /// Tile转像素 112 | /// 113 | /// 114 | /// 115 | public static Vector2D Tile2Pixel(this TileData tileData) { 116 | Vector2D vector2D = new Vector2D(); 117 | vector2D.x = tileData.tile.x * 256.0 + tileData.pixel.x; 118 | vector2D.y = tileData.tile.y * 256.0 + tileData.pixel.y; 119 | return vector2D; 120 | } 121 | 122 | /// 123 | /// 经纬度转坐标(x,y) 124 | /// 256个MC单位对应1个Unit单位 125 | /// 126 | /// 127 | /// 128 | public static Vector3 LngLat2Position(Vector2D lngLat) { 129 | //转换MC坐标 130 | Vector2D vector2D = MCTransform.ConvertLL2MC(lngLat); 131 | //缩小到Unit单位范围内(-100000, 100000) 132 | Vector3 worldPos = new Vector3((float)(vector2D.x / 256), (float)(vector2D.y / 256)); 133 | CalcWorldPosOffset(ref worldPos); 134 | return worldPos; 135 | } 136 | 137 | /// 138 | /// 坐标转经纬度 139 | /// 140 | /// 141 | /// 142 | public static Vector2D Position2LngLat(Vector3 worldPos) { 143 | CalcWorldPosOffset(ref worldPos, true); 144 | Vector2D vector2D = new Vector2D(worldPos.x * 256.0, worldPos.y * 256.0); 145 | return MCTransform.ConvertMC2LL(vector2D); 146 | } 147 | 148 | /// 149 | /// 返回瓦片的下载URL 150 | /// 151 | /// 经纬度 152 | /// 缩放比例 153 | /// 154 | public static string GetTileURL(this Vector2D lngLat, int zoom, MapType mapType) { 155 | TileData tileData = LngLat2Tile(lngLat, zoom); 156 | return GetTileURL(tileData, mapType); 157 | } 158 | 159 | /// 160 | /// 返回瓦片的下载URL 161 | /// 162 | /// 瓦片坐标 163 | /// 缩放比例 164 | /// 地图类型 0.街道图 1.卫星图 165 | /// 166 | public static string GetTileURL(this TileData tileData, MapType mapType) { 167 | if (MapType.Street == mapType) { 168 | return string.Format(MapUrlSrc_0, tileData.tile.x, tileData.tile.y, tileData.zoom); 169 | } else { 170 | return string.Format(MapUrlSrc_1, tileData.tile.x, tileData.tile.y, tileData.zoom); 171 | } 172 | } 173 | 174 | /// 175 | /// 腾讯地图坐标转百度地图 176 | /// 177 | /// 178 | /// 179 | public static Vector2D LngLatTx2Bd(Vector2D lngLat) { 180 | Vector2D result = new Vector2D(); 181 | double z = Math.Sqrt(lngLat.x * lngLat.x + lngLat.y * lngLat.y) + 0.00002 * Math.Sin(lngLat.y * Math.PI); 182 | double theta = Math.Atan2(lngLat.y, lngLat.x) + 0.000003 * Math.Cos(lngLat.x * Math.PI); 183 | result.longitude = z * Math.Cos(theta) + 0.0065; 184 | result.latitude = z * Math.Sin(theta) + 0.006; 185 | return result; 186 | } 187 | 188 | /// 189 | /// 百度地图坐标转腾讯地图 190 | /// 191 | /// 192 | /// 193 | public static Vector2D LngLatBd2Tx(Vector2D lngLat) { 194 | Vector2D result = new Vector2D(); 195 | double x = lngLat.x - 0.0065, y = lngLat.y - 0.006; 196 | double z = Math.Sqrt(x * x + y * y) - 0.00002 * Math.Sin(y * Math.PI); 197 | double theta = Math.Atan2(y, x) - 0.000003 * Math.Cos(x * Math.PI); 198 | result.longitude = z * Math.Cos(theta); 199 | result.latitude = z * Math.Sin(theta); 200 | return result; 201 | } 202 | 203 | /// 204 | /// 计算直线和平面的交点 205 | /// 206 | /// 直线上一点,不能在平面上 207 | /// 直线的方向向量,不能和平面平行 208 | /// 平面上一点 209 | /// 平面的法向量 210 | /// 211 | public static Vector3 CalcLineAndPlanePoint(Vector3 linePoint, Vector3 lineDir, Vector3 planePoint, Vector3 planeNormal) { 212 | float length = Vector3.Dot(planePoint - linePoint, planeNormal) / Vector3.Dot(lineDir, planeNormal); 213 | return linePoint + length * lineDir; 214 | } 215 | } 216 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d03a831abee897c41a0543b9c91ea9f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapServices.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using UnityEngine; 5 | 6 | namespace Achonor.LBSMap { 7 | public class MapServices : MonoBehaviour { 8 | [SerializeField] 9 | private Camera mMapCamera; 10 | 11 | [SerializeField] 12 | private Transform mTileParent; 13 | 14 | [SerializeField] 15 | private Transform mTilePool; 16 | 17 | private MapType mMapType; 18 | /// 19 | /// 相机的旋转值 20 | /// 21 | private Vector2 mCameraRotate = new Vector2(0, 0); 22 | 23 | /// 24 | /// 显示范围 25 | /// 26 | private Rect mLngLatRange = new Rect(70f, 0f, 150f, 55f); 27 | private Rect mWorldPosRange = new Rect(); 28 | 29 | /// 30 | /// 相机旋转X轴的范围Min 31 | /// 32 | private float mCameraRotateMinX = -60; 33 | /// 34 | /// 相机旋转X轴的范围Max 35 | /// 36 | private float mCameraRotateMaxX = 60; 37 | 38 | 39 | private Dictionary mMapTileDict = new Dictionary(); 40 | 41 | /// 42 | /// 最小缩放等级 43 | /// 44 | private static int MIN_ZOOM_LEVEL = 6; 45 | 46 | /// 47 | /// 最大的缩放等级,超过后仍然可以缩放,是指不替换图片了 48 | /// 49 | private static int MAX_TILE_ZOOM_LEVEL = 19; 50 | /// 51 | /// 最大缩放等级 52 | /// 53 | private static int MAX_ZOOM_LEVEL = 22; 54 | 55 | 56 | /// 57 | /// 当前地图缩放级别 58 | /// 59 | private float mMapZoomLevel = 16; 60 | /// 61 | /// 地图中心经纬度 62 | /// 63 | private Vector2D mCenterLngLat; 64 | 65 | /// 66 | /// 最大缓存容量 67 | /// 68 | private long mMaxChacheSize = 500 * 1024 * 1024; 69 | /// 70 | /// 同屏最多显示的数量 71 | /// 72 | private int mMaxTileCount = 30; 73 | 74 | public Camera MapCamera { 75 | get { 76 | return mMapCamera; 77 | } 78 | } 79 | 80 | public float MapZoomLevel { 81 | get { 82 | return mMapZoomLevel; 83 | } 84 | } 85 | 86 | public int MapTileZoomLevel { 87 | get { 88 | return (int)Mathf.Clamp(mMapZoomLevel, MIN_ZOOM_LEVEL, MAX_TILE_ZOOM_LEVEL); 89 | } 90 | } 91 | 92 | private void Start() { 93 | SetLngLatRange(mLngLatRange); 94 | //检测缓存容量是否超出 95 | CheckCahcheSize(); 96 | //启动缓存池 97 | StartCoroutine(MapTexturePool.StartPool()); 98 | } 99 | 100 | /// 101 | /// 设置缓存容量 102 | /// 103 | /// 单位(MB) 104 | public void SetCacheSize(long mbSize) { 105 | mMaxChacheSize = mbSize * 1024 * 1024; 106 | } 107 | 108 | public void SetLngLatRange(Rect rect) { 109 | mLngLatRange = rect; 110 | //初始化世界坐标范围 111 | Vector3 minVector = LngLat2WorldPos(new Vector2D(rect.x, rect.y)); 112 | Vector3 maxVector = LngLat2WorldPos(new Vector2D(rect.width, rect.height)); 113 | mWorldPosRange = new Rect(minVector.x, minVector.z, maxVector.x, maxVector.z); 114 | } 115 | 116 | /// 117 | /// 设置地图类型 118 | /// 119 | /// 120 | public void SetMapType(MapType mapType) { 121 | if (mMapType == mapType) { 122 | return; 123 | } 124 | mMapType = mapType; 125 | ClearAllMapTile(); 126 | } 127 | 128 | /// 129 | /// 设置地图缩放级别 130 | /// 131 | /// 132 | public void SetZoomLevel(int zoom) { 133 | mMapZoomLevel = Mathf.Clamp(zoom, MIN_ZOOM_LEVEL, MAX_ZOOM_LEVEL); 134 | } 135 | 136 | /// 137 | /// 设置地图中心经纬度 138 | /// 139 | /// BD09ll坐标系 140 | public void SetMapCenter(Vector2D lngLat) { 141 | mCenterLngLat = lngLat; 142 | //相机坐标 143 | Vector3 centerPos = LngLat2WorldPos(mCenterLngLat); 144 | //相机高度 145 | Vector3 heightVec = new Vector3(0, (float)MapFunction.GetCameraHeight(mMapZoomLevel), 0); 146 | Vector3 cameraPos = centerPos + heightVec; 147 | mMapCamera.transform.position = cameraPos; 148 | UpdateCameraTransform(Vector3.zero); 149 | DoRender(); 150 | } 151 | 152 | /// 153 | /// 地图缩放 154 | /// 155 | /// 变化量(0, 1) 156 | public void ZoomMap(float zoom) { 157 | mMapZoomLevel += zoom; 158 | mMapZoomLevel = Mathf.Clamp(mMapZoomLevel, MIN_ZOOM_LEVEL, MAX_ZOOM_LEVEL); 159 | UpdateCameraTransform(Vector3.zero); 160 | } 161 | 162 | /// 163 | /// 移动地图 164 | /// 165 | /// 166 | /// 167 | public void MoveMap(float x, float y) { 168 | MoveMap(new Vector2(x, y)); 169 | } 170 | 171 | /// 172 | /// 移动地图 173 | /// 174 | /// 屏幕像素单位 175 | public void MoveMap(Vector2 offset) { 176 | UpdateCameraTransform(offset); 177 | } 178 | 179 | public void RotateMap(Vector2 offset) { 180 | mCameraRotate += offset; 181 | mCameraRotate.x = Mathf.Clamp(mCameraRotate.x, mCameraRotateMinX, mCameraRotateMaxX); 182 | UpdateCameraTransform(Vector3.zero); 183 | } 184 | 185 | public void UpdateCameraTransform(Vector3 posOffset) { 186 | //-----------------------计算位置-----------------------// 187 | if (0 != posOffset.x || 0 != posOffset.y) { 188 | //相机位置 189 | Vector3 vector = new Vector3(posOffset.x, posOffset.y, 0); 190 | Vector3 worldOffset = mMapCamera.transform.TransformDirection(vector) * MapFunction.GetMapScale(mMapZoomLevel); 191 | worldOffset.y = 0; 192 | mMapCamera.transform.position -= worldOffset; 193 | //判断移动是否超出范围 194 | Vector3 nextCameraPos = mMapCamera.transform.position; 195 | Vector3 leftDownWorldPos = ScreenToWorldPoint(new Vector3(0, 0)); 196 | Vector3 rightUpWorldPos = ScreenToWorldPoint(new Vector3(Screen.width, Screen.height)); 197 | if (leftDownWorldPos.x < mWorldPosRange.x) { 198 | nextCameraPos.x += mWorldPosRange.x - leftDownWorldPos.x; 199 | } else if (mWorldPosRange.width < rightUpWorldPos.x) { 200 | nextCameraPos.x += mWorldPosRange.width - rightUpWorldPos.x; 201 | } 202 | if (leftDownWorldPos.z < mWorldPosRange.y) { 203 | nextCameraPos.z += mWorldPosRange.y - leftDownWorldPos.z; 204 | } else if (mWorldPosRange.height < rightUpWorldPos.z) { 205 | nextCameraPos.z += mWorldPosRange.height - rightUpWorldPos.z; 206 | } 207 | mMapCamera.transform.position = nextCameraPos; 208 | float camera2CenterDistance = (float)MapFunction.GetCameraHeight(mMapZoomLevel); 209 | Vector3 centerWorldPos = mMapCamera.ScreenToWorldPoint(new Vector3(0.5f * Screen.width, 0.5f * Screen.height, camera2CenterDistance)); 210 | //计算中心经纬度 211 | mCenterLngLat = WorldPos2LngLat(centerWorldPos); 212 | } 213 | //-----------------------计算旋转-----------------------// 214 | //中心坐标 215 | Vector3 centerPos = LngLat2WorldPos(mCenterLngLat); 216 | //相机未旋转时在中心点空间下的坐标 217 | Vector3 heightVec = new Vector3(0, (float)MapFunction.GetCameraHeight(mMapZoomLevel), 0); 218 | //旋转矩阵 219 | Matrix4x4 rotateMatrix = Matrix4x4.Rotate(Quaternion.Euler(mCameraRotate.x, mCameraRotate.y, 0)); 220 | //相机在中心的空间下的坐标 221 | Vector3 cameraPos = rotateMatrix.MultiplyVector(heightVec); 222 | //转到世界坐标 223 | cameraPos += centerPos; 224 | mMapCamera.transform.position = cameraPos; 225 | //朝向中心点,先计算up向量 226 | float angle = Vector3.Angle(-heightVec, centerPos - cameraPos); 227 | if (Mathf.Abs(angle) <= 0.001f) { 228 | Vector3 lastUp = mMapCamera.transform.TransformDirection(Vector3.up); 229 | mMapCamera.transform.LookAt(centerPos, lastUp); 230 | } else if (0 < mCameraRotate.x) { 231 | mMapCamera.transform.LookAt(centerPos, -Vector3.up); 232 | } else { 233 | mMapCamera.transform.LookAt(centerPos, Vector3.up); 234 | } 235 | } 236 | 237 | /// 238 | /// 渲染地图 239 | /// 240 | public void DoRender() { 241 | Vector3 centerPos = LngLat2WorldPos(mCenterLngLat); 242 | float camera2CenterDistance = (float)MapFunction.GetCameraHeight(mMapZoomLevel); 243 | //计算相机范围 244 | Vector3 cameraPos = mMapCamera.transform.position; 245 | //计算相机从屏幕左下角发出的射线和地图层的交点(计算直线和面的交点) 246 | Vector3 leftDownWorldPos = ScreenToWorldPoint(new Vector3(-0.1f * Screen.width, -0.1f * Screen.height, 1)); 247 | Vector3 leftDownDir = (leftDownWorldPos - cameraPos); 248 | leftDownWorldPos = MapFunction.CalcLineAndPlanePoint(cameraPos, leftDownDir, centerPos, Vector3.up); 249 | //有哪些Tile要加入 250 | TileData leftDownTile = WorldPos2TileData(leftDownWorldPos); 251 | TileData centerTile = WorldPos2TileData(centerPos); 252 | List allTileDatas = new List(); 253 | int minX = Mathf.Min(leftDownTile.tile.x, centerTile.tile.x); 254 | int maxX = Mathf.Max(leftDownTile.tile.x, centerTile.tile.x); 255 | int minY = Mathf.Min(leftDownTile.tile.y, centerTile.tile.y); 256 | int maxY = Mathf.Max(leftDownTile.tile.y, centerTile.tile.y); 257 | 258 | for (int i = 0; i <= (maxX - minX) * 2.5f; i++) { 259 | for (int k = 0; k <= (maxY - minY) * 2.5f; k++) { 260 | allTileDatas.Add(new TileData(MapTileZoomLevel, minX + i, minY + k)); 261 | } 262 | } 263 | //按照距离排序,距离近的优先加载 264 | allTileDatas.Sort((tileData1, tileData2)=> { 265 | double distance1 = centerTile.Distance(tileData1); 266 | double distance2 = centerTile.Distance(tileData2); 267 | if (distance1.DoubleIsEqual(distance2)) { 268 | return 0; 269 | } 270 | return distance1 < distance2 ? -1 : 1; 271 | }); 272 | //最大数量 273 | while (mMaxTileCount < allTileDatas.Count) { 274 | allTileDatas.RemoveAt(allTileDatas.Count - 1); 275 | } 276 | for (int i = 0; i < allTileDatas.Count; i++) { 277 | MapTile mapTile = GetMapTile(allTileDatas[i]); 278 | mapTile.gameObject.name = mapTile.Data.Key; 279 | mapTile.transform.position = TileData2WorldPos(allTileDatas[i]); 280 | } 281 | //清理距离远的Tile 282 | if (0 < allTileDatas.Count) { 283 | TileData maxDisTile = allTileDatas[allTileDatas.Count - 1]; 284 | double maxDistance = maxDisTile.Distance(centerTile); 285 | ClearMapTile(centerTile, maxDistance); 286 | } 287 | } 288 | 289 | /// 290 | /// 经纬度转世界坐标 291 | /// 292 | /// 293 | /// 294 | public Vector3 LngLat2WorldPos(Vector2D lngLat) { 295 | Vector3 position = MapFunction.LngLat2Position(lngLat); 296 | return mTileParent.TransformPoint(position); 297 | } 298 | 299 | /// 300 | /// 世界坐标转经纬度 301 | /// 302 | /// 303 | /// 304 | public Vector2D WorldPos2LngLat(Vector3 worldPos) { 305 | Vector3 position = mTileParent.InverseTransformPoint(worldPos); 306 | return MapFunction.Position2LngLat(position); 307 | } 308 | 309 | /// 310 | /// 屏幕坐标转经纬度 311 | /// 312 | /// 313 | /// 314 | public Vector2D ScreenPos2LngLat(Vector2 screenPos) { 315 | Vector3 worldPos = ScreenToWorldPoint(screenPos); 316 | return WorldPos2LngLat(worldPos); 317 | } 318 | 319 | 320 | /// 321 | /// 经纬度转屏幕 322 | /// 323 | /// 324 | /// 325 | public Vector2 LngLat2ScreenPos(Vector2D lngLat) { 326 | Vector3 worldPos = LngLat2WorldPos(lngLat); 327 | return WorldToScreenPoint(worldPos); 328 | } 329 | 330 | public Vector3 ScreenToWorldPoint(Vector2 screenPos) { 331 | double screenX = screenPos.x; 332 | double screenY = screenPos.y; 333 | double screenZ = MapFunction.GetCameraHeight(mMapZoomLevel); 334 | Matrix4x4 pMatrix = mMapCamera.projectionMatrix; 335 | 336 | //反齐次除法,求出裁剪空间坐标 337 | double px = screenX / Screen.width; 338 | px = (px - 0.5f) * 2f; 339 | double py = screenY / Screen.height; 340 | py = (py - 0.5f) * 2f; 341 | double pz = (-screenZ - pMatrix.m23) / pMatrix.m22; 342 | double pw = screenZ; 343 | px *= pw; 344 | py *= pw; 345 | //裁剪空间到相机空间 346 | Matrix4x4 pInverseMatrix = mMapCamera.projectionMatrix.inverse; 347 | double vx = (pInverseMatrix.m00 * px + pInverseMatrix.m01 * py + pInverseMatrix.m02 * pz + pInverseMatrix.m03 * pw); 348 | double vy = (pInverseMatrix.m10 * px + pInverseMatrix.m11 * py + pInverseMatrix.m12 * pz + pInverseMatrix.m13 * pw); 349 | double vz = (pInverseMatrix.m20 * px + pInverseMatrix.m21 * py + pInverseMatrix.m22 * pz + pInverseMatrix.m23 * pw); 350 | //观察空间到世界空间 351 | Matrix4x4 vInverseMatrix = mMapCamera.worldToCameraMatrix.inverse; 352 | double x = (vInverseMatrix.m00 * vx + vInverseMatrix.m01 * vy + vInverseMatrix.m02 * vz + vInverseMatrix.m03 * 1); 353 | double y = (vInverseMatrix.m10 * vx + vInverseMatrix.m11 * vy + vInverseMatrix.m12 * vz + vInverseMatrix.m13 * 1); 354 | double z = (vInverseMatrix.m20 * vx + vInverseMatrix.m21 * vy + vInverseMatrix.m22 * vz + vInverseMatrix.m23 * 1); 355 | return new Vector3((float)(x), (float)(y), (float)(z)); 356 | } 357 | 358 | public Vector3 WorldToScreenPoint(Vector3 worldPos) { 359 | double worldX = worldPos.x; 360 | double worldY = worldPos.y; 361 | double worldZ = worldPos.z; 362 | 363 | //世界空间到观察空间 364 | Matrix4x4 vMatrix = mMapCamera.worldToCameraMatrix; 365 | double vx = (vMatrix.m00 * worldX + vMatrix.m01 * worldY + vMatrix.m02 * worldZ + vMatrix.m03 * 1); 366 | double vy = (vMatrix.m10 * worldX + vMatrix.m11 * worldY + vMatrix.m12 * worldZ + vMatrix.m13 * 1); 367 | double vz = (vMatrix.m20 * worldX + vMatrix.m21 * worldY + vMatrix.m22 * worldZ + vMatrix.m23 * 1); 368 | //相机空间到裁剪空间 369 | Matrix4x4 pMatrix = mMapCamera.projectionMatrix; 370 | double px = (pMatrix.m00 * vx + pMatrix.m01 * vy + pMatrix.m02 * vz + pMatrix.m03 * 1); 371 | double py = (pMatrix.m10 * vx + pMatrix.m11 * vy + pMatrix.m12 * vz + pMatrix.m13 * 1); 372 | double pz = (pMatrix.m20 * vx + pMatrix.m21 * vy + pMatrix.m22 * vz + pMatrix.m23 * 1); 373 | double pw = (pMatrix.m30 * vx + pMatrix.m31 * vy + pMatrix.m32 * vz + pMatrix.m33 * 1); 374 | //齐次除法 375 | double x = px / pw; 376 | double y = py / pw; 377 | 378 | //转到0-1的范围 379 | x = (x * 0.5) + 0.5; 380 | y = (y * 0.5) + 0.5; 381 | return new Vector3((float)(x * Screen.width), (float)(y * Screen.height), (float)(-vz)); 382 | } 383 | 384 | 385 | public Vector3 TileData2WorldPos(TileData tileData) { 386 | Vector2D lngLat = MapFunction.Tile2LngLat(tileData); 387 | return LngLat2WorldPos(lngLat); 388 | } 389 | 390 | public TileData WorldPos2TileData(Vector3 worldPos, int zoom = -1) { 391 | if (-1 == zoom){ 392 | zoom = MapTileZoomLevel; 393 | } 394 | Vector2D lngLat = WorldPos2LngLat(worldPos); 395 | return MapFunction.LngLat2Tile(lngLat, zoom); 396 | } 397 | 398 | /// 399 | /// 当前地图的缩放比例 400 | /// 401 | /// 402 | public float GetMapScale() { 403 | return MapFunction.GetMapScale(mMapZoomLevel); 404 | } 405 | 406 | public float GetTileScale() { 407 | return MapFunction.GetTileScale((int)mMapZoomLevel); 408 | } 409 | 410 | 411 | private MapTile GetMapTile(TileData tileData) { 412 | if (mMapTileDict.ContainsKey(tileData.Key)) { 413 | return mMapTileDict[tileData.Key]; 414 | } 415 | Transform newTile = null; 416 | if (1 < mTilePool.childCount) { 417 | newTile = mTilePool.GetChild(1); 418 | } else { 419 | Transform sources = mTilePool.GetChild(0); 420 | newTile = Instantiate(sources); 421 | } 422 | newTile.SetParent(mTileParent); 423 | MapTile mapTile = newTile.GetComponent(); 424 | mMapTileDict.Add(tileData.Key, mapTile); 425 | mapTile.Init(tileData, mMapType); 426 | return mapTile; 427 | } 428 | 429 | private void RemoveTile(MapTile mapTile) { 430 | mapTile.gameObject.SetActive(false); 431 | mapTile.transform.SetParent(mTilePool); 432 | mMapTileDict.Remove(mapTile.Key); 433 | } 434 | 435 | private void ClearMapTile(TileData centerTileData, double maxDistance) { 436 | List needClears = new List(); 437 | foreach (MapTile mapTile in mMapTileDict.Values) { 438 | if (1 <= Mathf.Abs(MapTileZoomLevel - mapTile.Data.zoom)) { 439 | needClears.Add(mapTile); 440 | } 441 | if (2 * maxDistance < mapTile.Data.Distance(centerTileData)) { 442 | needClears.Add(mapTile); 443 | } 444 | } 445 | for (int i = 0; i < needClears.Count; i++) { 446 | RemoveTile(needClears[i]); 447 | } 448 | } 449 | 450 | /// 451 | /// 清理所有Tile 452 | /// 453 | private void ClearAllMapTile() { 454 | List needClears = new List(); 455 | foreach (MapTile mapTile in mMapTileDict.Values) { 456 | needClears.Add(mapTile); 457 | } 458 | for (int i = 0; i < needClears.Count; i++) { 459 | RemoveTile(needClears[i]); 460 | } 461 | } 462 | 463 | private void CheckCahcheSize() { 464 | long curChacheSize = 0; 465 | print(MapTexturePool.MapTileCachePath); 466 | string cachePath = MapTexturePool.MapTileCachePath; 467 | if (!Directory.Exists(cachePath)) { 468 | return; 469 | } 470 | DirectoryInfo directoryInfo = new DirectoryInfo(cachePath); 471 | FileInfo[] allFiles = directoryInfo.GetFiles(); 472 | print("缓存文件数量 :" + allFiles.Length); 473 | for (int i = 0; i < allFiles.Length; i++) { 474 | curChacheSize += allFiles[i].Length; 475 | } 476 | print("缓存大小 :" + curChacheSize); 477 | print("缓存上限 :" + mMaxChacheSize); 478 | if (curChacheSize < mMaxChacheSize) { 479 | return; 480 | } 481 | //按照访问时间排序 482 | List allFileList = new List(allFiles); 483 | allFileList.Sort((file1, file2) => { 484 | if (file1.LastAccessTime != file2.LastAccessTime) { 485 | return file1.LastAccessTime < file2.LastAccessTime ? 1 : -1; 486 | } 487 | return 0; 488 | }); 489 | for (int i = allFileList.Count - 1; 0 <= i; i--) { 490 | if (curChacheSize < mMaxChacheSize) { 491 | break; 492 | } 493 | print("删除文件 :" + allFileList[i].Name); 494 | curChacheSize -= allFileList[i].Length; 495 | allFileList[i].Delete(); 496 | } 497 | } 498 | } 499 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapServices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c0efe8d3be140c4b9bdc8b725522384 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapTile.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | 6 | namespace Achonor.LBSMap { 7 | /// 8 | /// 地图瓦片 9 | /// 10 | public class MapTile : MonoBehaviour { 11 | 12 | [SerializeField] 13 | private SpriteRenderer mSpriteRender; 14 | 15 | [SerializeField] 16 | private Sprite mDefaultSprite; 17 | 18 | [SerializeField] 19 | private TileData mTileData = null; 20 | 21 | private MapType mMapType = MapType.Street; 22 | 23 | public string Key { 24 | get { 25 | return mTileData.Key; 26 | } 27 | } 28 | 29 | public TileData Data { 30 | get { 31 | return mTileData; 32 | } 33 | } 34 | 35 | private void Awake() { 36 | if (null == mSpriteRender) { 37 | mSpriteRender = GetComponent(); 38 | } 39 | mSpriteRender.sprite = mDefaultSprite; 40 | } 41 | 42 | private void OnDisable() { 43 | StopAllCoroutines(); 44 | } 45 | 46 | public void Init(TileData tileData, MapType mapType) { 47 | gameObject.SetActive(true); 48 | if (mapType == mMapType && null != mTileData && tileData.Key == mTileData.Key) { 49 | if (mDefaultSprite != mSpriteRender.sprite) { 50 | return; 51 | } 52 | } 53 | mSpriteRender.sprite = mDefaultSprite; 54 | mTileData = tileData; 55 | mMapType = mapType; 56 | StopAllCoroutines(); 57 | //缩放比例 58 | transform.localScale = mTileData.GetTileScale() * Vector3.one; 59 | //开始下载 60 | DownloadSprite(); 61 | } 62 | private void DownloadSprite() { 63 | if (null == mTileData) { 64 | print("TileData没有赋值"); 65 | return; 66 | } 67 | //下载瓦片地图 68 | MapType curMapType = mMapType; 69 | string fileName = string.Format("{0}_{1}.png", mTileData.Key, (int)curMapType); 70 | StartCoroutine(MapTexturePool.RequestSprite(mTileData.GetTileURL(curMapType), (sprite) => { 71 | mSpriteRender.sprite = sprite; 72 | }, fileName, 2)); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapTile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 748551474d1178549853ff466a256654 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Achonor.LBSMap { 6 | /// 7 | /// 地图类型 8 | /// 9 | public enum MapType { 10 | /// 11 | /// 街道图 12 | /// 13 | Street = 0, 14 | /// 15 | /// 卫星图 16 | /// 17 | Satellite 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b729c690b517364295a841fd0d3d727 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using UnityEngine; 5 | 6 | public static class MapUtils 7 | { 8 | /// 9 | /// Texture转Sprite 10 | /// 10级地图上1像素是1个Unit单位 11 | /// 12 | /// 13 | /// 14 | public static Sprite Texture2D2Sprite(Texture2D texture2D) { 15 | texture2D.wrapMode = TextureWrapMode.Clamp; 16 | texture2D.filterMode = FilterMode.Bilinear; 17 | return Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.zero, 1f); 18 | } 19 | 20 | /// 21 | /// 保存图片 22 | /// 23 | /// 24 | /// 25 | public static void SaveTexture(string outPath, Texture2D texture2D) { 26 | byte[] bytes = texture2D.EncodeToPNG(); 27 | string outDirectory = Directory.GetParent(outPath).FullName; 28 | if (!File.Exists(outDirectory)) { 29 | Directory.CreateDirectory(outDirectory); 30 | } 31 | File.WriteAllBytes(outPath, bytes); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/MapUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bb06fca1d25c584a92eff3489d83e9b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Network.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4590b33c92c73ae44be693f35ea8056a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Network/MapHttpTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.IO; 4 | using UnityEngine; 5 | using UnityEngine.Networking; 6 | 7 | namespace Achonor.LBSMap 8 | { 9 | public static class MapHttpTools { 10 | public static string MapTileCachePath { 11 | get { 12 | return Path.Combine(Application.persistentDataPath, "MapTileCachePath"); 13 | } 14 | } 15 | 16 | public static IEnumerator Request(string url, Action callback, int retryCount) where T : DownloadHandler , new() { 17 | using (UnityWebRequest www = UnityWebRequest.Get(url)) { 18 | www.downloadHandler = new T(); 19 | WWWForm wWWForm = new WWWForm(); 20 | yield return www.SendWebRequest(); 21 | if (www.isHttpError || www.isNetworkError) { 22 | //没有提示 23 | if (0 < retryCount--) { 24 | yield return Request(url, callback, retryCount); 25 | } else{ 26 | callback?.Invoke(null); 27 | } 28 | }else { 29 | //成功 30 | callback?.Invoke((T)www.downloadHandler); 31 | } 32 | } 33 | } 34 | 35 | public static IEnumerator RequestSprite(string url, Action callback, string fileName, int retryCount) { 36 | string filePath = Path.Combine(MapTileCachePath, fileName); 37 | if (File.Exists(filePath)) { 38 | url = "file://" + filePath; 39 | } 40 | yield return Request(url, (down) => { 41 | if (!File.Exists(filePath)) { 42 | MapUtils.SaveTexture(filePath, down.texture); 43 | } else { 44 | //修改访问时间 45 | FileInfo fileInfo = new FileInfo(filePath); 46 | fileInfo.LastAccessTime = DateTime.Now; 47 | } 48 | callback.Invoke(MapUtils.Texture2D2Sprite(down.texture)); 49 | }, retryCount); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Network/MapHttpTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58e932b5c4fa64746b817231256878ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Network/MapTexturePool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using UnityEngine; 6 | using UnityEngine.Networking; 7 | 8 | namespace Achonor.LBSMap 9 | { 10 | /// 11 | /// Texture缓存池 12 | /// 13 | public static class MapTexturePool { 14 | 15 | public class MapTexture : IComparable { 16 | public string name; 17 | public Sprite sprite; 18 | public Texture2D texture; 19 | /// 20 | /// 最后访问时间 21 | /// 22 | public long LastAccessTime; 23 | 24 | /// 25 | /// 访问时间排序 26 | /// 27 | /// 28 | /// 29 | public int CompareTo(MapTexture other) { 30 | if (LastAccessTime != other.LastAccessTime) { 31 | return LastAccessTime < other.LastAccessTime ? 1 : -1; 32 | } 33 | return 0; 34 | } 35 | } 36 | 37 | public static string MapTileCachePath { 38 | get { 39 | return Path.Combine(Application.persistentDataPath, "MapTileCachePath"); 40 | } 41 | } 42 | /// 43 | /// 最大缓存数量 44 | /// 45 | private const int MaxCachePool = 300; 46 | private static Dictionary mMapTextureDict = new Dictionary(); 47 | public static IEnumerator StartPool() { 48 | yield return null; 49 | while (true) { 50 | //每五秒检测一次 51 | yield return new WaitForSeconds(5f); 52 | try { 53 | //开始检测Texture缓存池 54 | if (MaxCachePool < mMapTextureDict.Count) { 55 | //需要释放 56 | List mapTextures =new List(mMapTextureDict.Values); 57 | mapTextures.Sort(); 58 | for (int i = mapTextures.Count - 1; MaxCachePool < i; i--) { 59 | Texture2D.Destroy(mapTextures[i].texture); 60 | mMapTextureDict.Remove(mapTextures[i].name); 61 | } 62 | } 63 | } catch (Exception ex) { 64 | Debug.LogError("缓存池异常:" + ex.ToString()); 65 | } 66 | } 67 | } 68 | 69 | public static MapTexture GetTexture(string name) { 70 | if (!mMapTextureDict.ContainsKey(name)) { 71 | return null; 72 | } 73 | MapTexture mapTexture = mMapTextureDict[name]; 74 | mapTexture.LastAccessTime = DateTime.UtcNow.Ticks; 75 | return mapTexture; 76 | } 77 | 78 | public static MapTexture AddTexture(string name, byte[] textureBytes) { 79 | MapTexture mapTexture = new MapTexture() { 80 | name = name, 81 | LastAccessTime = DateTime.UtcNow.Ticks 82 | }; 83 | mapTexture.texture = new Texture2D(256, 256); 84 | mapTexture.texture.LoadImage(textureBytes); 85 | mapTexture.sprite = Texture2D2Sprite(mapTexture.texture); 86 | if (!mMapTextureDict.ContainsKey(name)) { 87 | mMapTextureDict.Add(name, mapTexture); 88 | } else { 89 | mMapTextureDict[name] = mapTexture; 90 | Debug.LogError("重复AddTexture:" + name); 91 | } 92 | return mapTexture; 93 | } 94 | 95 | 96 | public static IEnumerator Request(string url, Action callback, int retryCount) where T : DownloadHandler , new() { 97 | using (UnityWebRequest www = UnityWebRequest.Get(url)) { 98 | www.downloadHandler = new T(); 99 | WWWForm wWWForm = new WWWForm(); 100 | yield return www.SendWebRequest(); 101 | if (www.isHttpError || www.isNetworkError) { 102 | if (0 < retryCount--) { 103 | yield return Request(url, callback, retryCount); 104 | } else{ 105 | callback?.Invoke(null); 106 | } 107 | }else { 108 | //成功 109 | callback?.Invoke((T)www.downloadHandler); 110 | } 111 | } 112 | } 113 | 114 | public static IEnumerator RequestSprite(string url, Action callback, string fileName, int retryCount) { 115 | MapTexture mapTexture = GetTexture(fileName); 116 | if (null != mapTexture) { 117 | callback?.Invoke(mapTexture.sprite); 118 | yield return null; 119 | yield break; 120 | } 121 | //从文件或者网络获取 122 | string filePath = Path.Combine(MapTileCachePath, fileName); 123 | if (File.Exists(filePath)) { 124 | url = "file://" + filePath; 125 | } 126 | yield return Request(url, (down) => { 127 | if (null == down) { 128 | //地图下载失败 129 | Debug.LogError("地图下载失败:" + fileName); 130 | return; 131 | } 132 | if (!File.Exists(filePath)) { 133 | SaveTexture(filePath, down.data); 134 | } else { 135 | //修改文件访问时间 136 | FileInfo fileInfo = new FileInfo(filePath); 137 | fileInfo.LastAccessTime = DateTime.UtcNow; 138 | } 139 | mapTexture = AddTexture(fileName, down.data); 140 | callback.Invoke(mapTexture.sprite); 141 | }, retryCount); 142 | } 143 | 144 | /// 145 | /// Texture转Sprite 146 | /// 10级地图上1像素是1个Unit单位 147 | /// 148 | /// 149 | /// 150 | public static Sprite Texture2D2Sprite(Texture2D texture2D) { 151 | texture2D.wrapMode = TextureWrapMode.Clamp; 152 | texture2D.filterMode = FilterMode.Bilinear; 153 | texture2D.Apply(); 154 | return Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.zero, 1f); 155 | } 156 | 157 | /// 158 | /// 保存图片 159 | /// 160 | /// 161 | /// 162 | public static void SaveTexture(string outPath, byte[] textureBytes) { 163 | string outDirectory = Directory.GetParent(outPath).FullName; 164 | if (!File.Exists(outDirectory)) { 165 | Directory.CreateDirectory(outDirectory); 166 | } 167 | File.WriteAllBytes(outPath, textureBytes); 168 | } 169 | } 170 | } -------------------------------------------------------------------------------- /Assets/BaiduMap/Scripts/CSharp/Network/MapTexturePool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c192e7158fefb7741946a20b8d5adedb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a383893f6979224bbdd80dd2233467b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BaiduMap/Textures/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/achonor/UnityBaiduMap/55bd1daf36a313ca7f2f03080df6a8b7f57f7457/Assets/BaiduMap/Textures/Default.png -------------------------------------------------------------------------------- /Assets/BaiduMap/Textures/Default.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b803bc629c203947a12949c40153a44 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 1 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: Android 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 5e97eb03825dee720800000000000000 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Assets/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e313de0cc3ae1e44b9535981a6ab298 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c27c9f7c19bf70942b19a37a120b3c0e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &17006740 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 17006741} 133 | m_Layer: 0 134 | m_Name: MapTiles 135 | m_TagString: Untagged 136 | m_Icon: {fileID: 0} 137 | m_NavMeshLayer: 0 138 | m_StaticEditorFlags: 0 139 | m_IsActive: 1 140 | --- !u!4 &17006741 141 | Transform: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInstance: {fileID: 0} 145 | m_PrefabAsset: {fileID: 0} 146 | m_GameObject: {fileID: 17006740} 147 | m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} 148 | m_LocalPosition: {x: 0, y: 0, z: 0} 149 | m_LocalScale: {x: 1, y: 1, z: 1} 150 | m_Children: [] 151 | m_Father: {fileID: 1173554385} 152 | m_RootOrder: 3 153 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 154 | --- !u!1 &262790338 155 | GameObject: 156 | m_ObjectHideFlags: 0 157 | m_CorrespondingSourceObject: {fileID: 0} 158 | m_PrefabInstance: {fileID: 0} 159 | m_PrefabAsset: {fileID: 0} 160 | serializedVersion: 6 161 | m_Component: 162 | - component: {fileID: 262790339} 163 | - component: {fileID: 262790341} 164 | - component: {fileID: 262790340} 165 | m_Layer: 5 166 | m_Name: Text 167 | m_TagString: Untagged 168 | m_Icon: {fileID: 0} 169 | m_NavMeshLayer: 0 170 | m_StaticEditorFlags: 0 171 | m_IsActive: 1 172 | --- !u!224 &262790339 173 | RectTransform: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInstance: {fileID: 0} 177 | m_PrefabAsset: {fileID: 0} 178 | m_GameObject: {fileID: 262790338} 179 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 180 | m_LocalPosition: {x: 0, y: 0, z: 0} 181 | m_LocalScale: {x: 1, y: 1, z: 1} 182 | m_Children: [] 183 | m_Father: {fileID: 786962048} 184 | m_RootOrder: 0 185 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 186 | m_AnchorMin: {x: 0, y: 0} 187 | m_AnchorMax: {x: 1, y: 1} 188 | m_AnchoredPosition: {x: 0, y: 0} 189 | m_SizeDelta: {x: 0, y: 0} 190 | m_Pivot: {x: 0.5, y: 0.5} 191 | --- !u!114 &262790340 192 | MonoBehaviour: 193 | m_ObjectHideFlags: 0 194 | m_CorrespondingSourceObject: {fileID: 0} 195 | m_PrefabInstance: {fileID: 0} 196 | m_PrefabAsset: {fileID: 0} 197 | m_GameObject: {fileID: 262790338} 198 | m_Enabled: 1 199 | m_EditorHideFlags: 0 200 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 201 | m_Name: 202 | m_EditorClassIdentifier: 203 | m_Material: {fileID: 0} 204 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 205 | m_RaycastTarget: 1 206 | m_Maskable: 1 207 | m_OnCullStateChanged: 208 | m_PersistentCalls: 209 | m_Calls: [] 210 | m_FontData: 211 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 212 | m_FontSize: 14 213 | m_FontStyle: 0 214 | m_BestFit: 0 215 | m_MinSize: 10 216 | m_MaxSize: 40 217 | m_Alignment: 4 218 | m_AlignByGeometry: 0 219 | m_RichText: 1 220 | m_HorizontalOverflow: 0 221 | m_VerticalOverflow: 0 222 | m_LineSpacing: 1 223 | m_Text: "\u8857\u9053\u56FE" 224 | --- !u!222 &262790341 225 | CanvasRenderer: 226 | m_ObjectHideFlags: 0 227 | m_CorrespondingSourceObject: {fileID: 0} 228 | m_PrefabInstance: {fileID: 0} 229 | m_PrefabAsset: {fileID: 0} 230 | m_GameObject: {fileID: 262790338} 231 | m_CullTransparentMesh: 0 232 | --- !u!1 &580281659 233 | GameObject: 234 | m_ObjectHideFlags: 0 235 | m_CorrespondingSourceObject: {fileID: 0} 236 | m_PrefabInstance: {fileID: 0} 237 | m_PrefabAsset: {fileID: 0} 238 | serializedVersion: 6 239 | m_Component: 240 | - component: {fileID: 580281663} 241 | - component: {fileID: 580281662} 242 | - component: {fileID: 580281661} 243 | - component: {fileID: 580281660} 244 | - component: {fileID: 580281664} 245 | m_Layer: 5 246 | m_Name: Test 247 | m_TagString: Untagged 248 | m_Icon: {fileID: 0} 249 | m_NavMeshLayer: 0 250 | m_StaticEditorFlags: 0 251 | m_IsActive: 1 252 | --- !u!114 &580281660 253 | MonoBehaviour: 254 | m_ObjectHideFlags: 0 255 | m_CorrespondingSourceObject: {fileID: 0} 256 | m_PrefabInstance: {fileID: 0} 257 | m_PrefabAsset: {fileID: 0} 258 | m_GameObject: {fileID: 580281659} 259 | m_Enabled: 1 260 | m_EditorHideFlags: 0 261 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 262 | m_Name: 263 | m_EditorClassIdentifier: 264 | m_IgnoreReversedGraphics: 1 265 | m_BlockingObjects: 0 266 | m_BlockingMask: 267 | serializedVersion: 2 268 | m_Bits: 4294967295 269 | --- !u!114 &580281661 270 | MonoBehaviour: 271 | m_ObjectHideFlags: 0 272 | m_CorrespondingSourceObject: {fileID: 0} 273 | m_PrefabInstance: {fileID: 0} 274 | m_PrefabAsset: {fileID: 0} 275 | m_GameObject: {fileID: 580281659} 276 | m_Enabled: 1 277 | m_EditorHideFlags: 0 278 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 279 | m_Name: 280 | m_EditorClassIdentifier: 281 | m_UiScaleMode: 1 282 | m_ReferencePixelsPerUnit: 100 283 | m_ScaleFactor: 1 284 | m_ReferenceResolution: {x: 1170, y: 540} 285 | m_ScreenMatchMode: 0 286 | m_MatchWidthOrHeight: 0 287 | m_PhysicalUnit: 3 288 | m_FallbackScreenDPI: 96 289 | m_DefaultSpriteDPI: 96 290 | m_DynamicPixelsPerUnit: 1 291 | --- !u!223 &580281662 292 | Canvas: 293 | m_ObjectHideFlags: 0 294 | m_CorrespondingSourceObject: {fileID: 0} 295 | m_PrefabInstance: {fileID: 0} 296 | m_PrefabAsset: {fileID: 0} 297 | m_GameObject: {fileID: 580281659} 298 | m_Enabled: 1 299 | serializedVersion: 3 300 | m_RenderMode: 0 301 | m_Camera: {fileID: 0} 302 | m_PlaneDistance: 100 303 | m_PixelPerfect: 0 304 | m_ReceivesEvents: 1 305 | m_OverrideSorting: 0 306 | m_OverridePixelPerfect: 0 307 | m_SortingBucketNormalizedSize: 0 308 | m_AdditionalShaderChannelsFlag: 0 309 | m_SortingLayerID: 0 310 | m_SortingOrder: 0 311 | m_TargetDisplay: 0 312 | --- !u!224 &580281663 313 | RectTransform: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 580281659} 319 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 320 | m_LocalPosition: {x: 0, y: 0, z: 0} 321 | m_LocalScale: {x: 0, y: 0, z: 0} 322 | m_Children: 323 | - {fileID: 1454534375} 324 | m_Father: {fileID: 0} 325 | m_RootOrder: 1 326 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 327 | m_AnchorMin: {x: 0, y: 0} 328 | m_AnchorMax: {x: 0, y: 0} 329 | m_AnchoredPosition: {x: 0, y: 0} 330 | m_SizeDelta: {x: 0, y: 0} 331 | m_Pivot: {x: 0, y: 0} 332 | --- !u!114 &580281664 333 | MonoBehaviour: 334 | m_ObjectHideFlags: 0 335 | m_CorrespondingSourceObject: {fileID: 0} 336 | m_PrefabInstance: {fileID: 0} 337 | m_PrefabAsset: {fileID: 0} 338 | m_GameObject: {fileID: 580281659} 339 | m_Enabled: 1 340 | m_EditorHideFlags: 0 341 | m_Script: {fileID: 11500000, guid: 602f26b0c87805d48b3d9b6c06f9be3e, type: 3} 342 | m_Name: 343 | m_EditorClassIdentifier: 344 | mMapServices: {fileID: 1173554387} 345 | mStreetBtn: {fileID: 786962049} 346 | mSatelliteBtn: {fileID: 1578958133} 347 | --- !u!1 &705507993 348 | GameObject: 349 | m_ObjectHideFlags: 0 350 | m_CorrespondingSourceObject: {fileID: 0} 351 | m_PrefabInstance: {fileID: 0} 352 | m_PrefabAsset: {fileID: 0} 353 | serializedVersion: 6 354 | m_Component: 355 | - component: {fileID: 705507995} 356 | - component: {fileID: 705507994} 357 | m_Layer: 20 358 | m_Name: Light 359 | m_TagString: Untagged 360 | m_Icon: {fileID: 0} 361 | m_NavMeshLayer: 0 362 | m_StaticEditorFlags: 0 363 | m_IsActive: 1 364 | --- !u!108 &705507994 365 | Light: 366 | m_ObjectHideFlags: 0 367 | m_CorrespondingSourceObject: {fileID: 0} 368 | m_PrefabInstance: {fileID: 0} 369 | m_PrefabAsset: {fileID: 0} 370 | m_GameObject: {fileID: 705507993} 371 | m_Enabled: 1 372 | serializedVersion: 10 373 | m_Type: 1 374 | m_Shape: 0 375 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 376 | m_Intensity: 1 377 | m_Range: 10 378 | m_SpotAngle: 30 379 | m_InnerSpotAngle: 21.80208 380 | m_CookieSize: 10 381 | m_Shadows: 382 | m_Type: 2 383 | m_Resolution: -1 384 | m_CustomResolution: -1 385 | m_Strength: 1 386 | m_Bias: 0.05 387 | m_NormalBias: 0.4 388 | m_NearPlane: 0.2 389 | m_CullingMatrixOverride: 390 | e00: 1 391 | e01: 0 392 | e02: 0 393 | e03: 0 394 | e10: 0 395 | e11: 1 396 | e12: 0 397 | e13: 0 398 | e20: 0 399 | e21: 0 400 | e22: 1 401 | e23: 0 402 | e30: 0 403 | e31: 0 404 | e32: 0 405 | e33: 1 406 | m_UseCullingMatrixOverride: 0 407 | m_Cookie: {fileID: 0} 408 | m_DrawHalo: 0 409 | m_Flare: {fileID: 0} 410 | m_RenderMode: 0 411 | m_CullingMask: 412 | serializedVersion: 2 413 | m_Bits: 1048576 414 | m_RenderingLayerMask: 1 415 | m_Lightmapping: 1 416 | m_LightShadowCasterMode: 0 417 | m_AreaSize: {x: 1, y: 1} 418 | m_BounceIntensity: 1 419 | m_ColorTemperature: 6570 420 | m_UseColorTemperature: 0 421 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 422 | m_UseBoundingSphereOverride: 0 423 | m_ShadowRadius: 0 424 | m_ShadowAngle: 0 425 | --- !u!4 &705507995 426 | Transform: 427 | m_ObjectHideFlags: 0 428 | m_CorrespondingSourceObject: {fileID: 0} 429 | m_PrefabInstance: {fileID: 0} 430 | m_PrefabAsset: {fileID: 0} 431 | m_GameObject: {fileID: 705507993} 432 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 433 | m_LocalPosition: {x: 0, y: 0, z: 0} 434 | m_LocalScale: {x: 1, y: 1, z: 1} 435 | m_Children: [] 436 | m_Father: {fileID: 1173554385} 437 | m_RootOrder: 0 438 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 439 | --- !u!1 &786962047 440 | GameObject: 441 | m_ObjectHideFlags: 0 442 | m_CorrespondingSourceObject: {fileID: 0} 443 | m_PrefabInstance: {fileID: 0} 444 | m_PrefabAsset: {fileID: 0} 445 | serializedVersion: 6 446 | m_Component: 447 | - component: {fileID: 786962048} 448 | - component: {fileID: 786962051} 449 | - component: {fileID: 786962050} 450 | - component: {fileID: 786962049} 451 | m_Layer: 5 452 | m_Name: Button1 453 | m_TagString: Untagged 454 | m_Icon: {fileID: 0} 455 | m_NavMeshLayer: 0 456 | m_StaticEditorFlags: 0 457 | m_IsActive: 1 458 | --- !u!224 &786962048 459 | RectTransform: 460 | m_ObjectHideFlags: 0 461 | m_CorrespondingSourceObject: {fileID: 0} 462 | m_PrefabInstance: {fileID: 0} 463 | m_PrefabAsset: {fileID: 0} 464 | m_GameObject: {fileID: 786962047} 465 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 466 | m_LocalPosition: {x: 0, y: 0, z: 0} 467 | m_LocalScale: {x: 1, y: 1, z: 1} 468 | m_Children: 469 | - {fileID: 262790339} 470 | m_Father: {fileID: 1454534375} 471 | m_RootOrder: 0 472 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 473 | m_AnchorMin: {x: 0, y: 0} 474 | m_AnchorMax: {x: 0, y: 0} 475 | m_AnchoredPosition: {x: 0, y: 0} 476 | m_SizeDelta: {x: 0, y: 0} 477 | m_Pivot: {x: 0.5, y: 0.5} 478 | --- !u!114 &786962049 479 | MonoBehaviour: 480 | m_ObjectHideFlags: 0 481 | m_CorrespondingSourceObject: {fileID: 0} 482 | m_PrefabInstance: {fileID: 0} 483 | m_PrefabAsset: {fileID: 0} 484 | m_GameObject: {fileID: 786962047} 485 | m_Enabled: 1 486 | m_EditorHideFlags: 0 487 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 488 | m_Name: 489 | m_EditorClassIdentifier: 490 | m_Navigation: 491 | m_Mode: 3 492 | m_SelectOnUp: {fileID: 0} 493 | m_SelectOnDown: {fileID: 0} 494 | m_SelectOnLeft: {fileID: 0} 495 | m_SelectOnRight: {fileID: 0} 496 | m_Transition: 1 497 | m_Colors: 498 | m_NormalColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 499 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 500 | m_PressedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 501 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 502 | m_DisabledColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 503 | m_ColorMultiplier: 1 504 | m_FadeDuration: 0.1 505 | m_SpriteState: 506 | m_HighlightedSprite: {fileID: 0} 507 | m_PressedSprite: {fileID: 0} 508 | m_SelectedSprite: {fileID: 0} 509 | m_DisabledSprite: {fileID: 0} 510 | m_AnimationTriggers: 511 | m_NormalTrigger: Normal 512 | m_HighlightedTrigger: Highlighted 513 | m_PressedTrigger: Pressed 514 | m_SelectedTrigger: Selected 515 | m_DisabledTrigger: Disabled 516 | m_Interactable: 1 517 | m_TargetGraphic: {fileID: 786962050} 518 | m_OnClick: 519 | m_PersistentCalls: 520 | m_Calls: [] 521 | --- !u!114 &786962050 522 | MonoBehaviour: 523 | m_ObjectHideFlags: 0 524 | m_CorrespondingSourceObject: {fileID: 0} 525 | m_PrefabInstance: {fileID: 0} 526 | m_PrefabAsset: {fileID: 0} 527 | m_GameObject: {fileID: 786962047} 528 | m_Enabled: 1 529 | m_EditorHideFlags: 0 530 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 531 | m_Name: 532 | m_EditorClassIdentifier: 533 | m_Material: {fileID: 0} 534 | m_Color: {r: 1, g: 1, b: 1, a: 1} 535 | m_RaycastTarget: 1 536 | m_Maskable: 1 537 | m_OnCullStateChanged: 538 | m_PersistentCalls: 539 | m_Calls: [] 540 | m_Sprite: {fileID: 0} 541 | m_Type: 1 542 | m_PreserveAspect: 0 543 | m_FillCenter: 1 544 | m_FillMethod: 4 545 | m_FillAmount: 1 546 | m_FillClockwise: 1 547 | m_FillOrigin: 0 548 | m_UseSpriteMesh: 0 549 | m_PixelsPerUnitMultiplier: 1 550 | --- !u!222 &786962051 551 | CanvasRenderer: 552 | m_ObjectHideFlags: 0 553 | m_CorrespondingSourceObject: {fileID: 0} 554 | m_PrefabInstance: {fileID: 0} 555 | m_PrefabAsset: {fileID: 0} 556 | m_GameObject: {fileID: 786962047} 557 | m_CullTransparentMesh: 0 558 | --- !u!1 &963194225 559 | GameObject: 560 | m_ObjectHideFlags: 0 561 | m_CorrespondingSourceObject: {fileID: 0} 562 | m_PrefabInstance: {fileID: 0} 563 | m_PrefabAsset: {fileID: 0} 564 | serializedVersion: 6 565 | m_Component: 566 | - component: {fileID: 963194228} 567 | - component: {fileID: 963194227} 568 | - component: {fileID: 963194226} 569 | m_Layer: 20 570 | m_Name: Map Camera 571 | m_TagString: MainCamera 572 | m_Icon: {fileID: 0} 573 | m_NavMeshLayer: 0 574 | m_StaticEditorFlags: 0 575 | m_IsActive: 1 576 | --- !u!81 &963194226 577 | AudioListener: 578 | m_ObjectHideFlags: 0 579 | m_CorrespondingSourceObject: {fileID: 0} 580 | m_PrefabInstance: {fileID: 0} 581 | m_PrefabAsset: {fileID: 0} 582 | m_GameObject: {fileID: 963194225} 583 | m_Enabled: 1 584 | --- !u!20 &963194227 585 | Camera: 586 | m_ObjectHideFlags: 0 587 | m_CorrespondingSourceObject: {fileID: 0} 588 | m_PrefabInstance: {fileID: 0} 589 | m_PrefabAsset: {fileID: 0} 590 | m_GameObject: {fileID: 963194225} 591 | m_Enabled: 1 592 | serializedVersion: 2 593 | m_ClearFlags: 1 594 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} 595 | m_projectionMatrixMode: 1 596 | m_GateFitMode: 2 597 | m_FOVAxisMode: 0 598 | m_SensorSize: {x: 36, y: 24} 599 | m_LensShift: {x: 0, y: 0} 600 | m_FocalLength: 50 601 | m_NormalizedViewPortRect: 602 | serializedVersion: 2 603 | x: 0 604 | y: 0 605 | width: 1 606 | height: 1 607 | near clip plane: 0.01 608 | far clip plane: 100000 609 | field of view: 80 610 | orthographic: 0 611 | orthographic size: 5 612 | m_Depth: -1 613 | m_CullingMask: 614 | serializedVersion: 2 615 | m_Bits: 1048576 616 | m_RenderingPath: -1 617 | m_TargetTexture: {fileID: 0} 618 | m_TargetDisplay: 0 619 | m_TargetEye: 3 620 | m_HDR: 1 621 | m_AllowMSAA: 1 622 | m_AllowDynamicResolution: 0 623 | m_ForceIntoRT: 0 624 | m_OcclusionCulling: 1 625 | m_StereoConvergence: 10 626 | m_StereoSeparation: 0.022 627 | --- !u!4 &963194228 628 | Transform: 629 | m_ObjectHideFlags: 0 630 | m_CorrespondingSourceObject: {fileID: 0} 631 | m_PrefabInstance: {fileID: 0} 632 | m_PrefabAsset: {fileID: 0} 633 | m_GameObject: {fileID: 963194225} 634 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 635 | m_LocalPosition: {x: 0, y: 300, z: 0} 636 | m_LocalScale: {x: 1, y: 1, z: 1} 637 | m_Children: [] 638 | m_Father: {fileID: 1173554385} 639 | m_RootOrder: 1 640 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 641 | --- !u!1 &1173554384 642 | GameObject: 643 | m_ObjectHideFlags: 0 644 | m_CorrespondingSourceObject: {fileID: 0} 645 | m_PrefabInstance: {fileID: 0} 646 | m_PrefabAsset: {fileID: 0} 647 | serializedVersion: 6 648 | m_Component: 649 | - component: {fileID: 1173554385} 650 | - component: {fileID: 1173554387} 651 | - component: {fileID: 1173554388} 652 | m_Layer: 20 653 | m_Name: Map 654 | m_TagString: Untagged 655 | m_Icon: {fileID: 0} 656 | m_NavMeshLayer: 0 657 | m_StaticEditorFlags: 0 658 | m_IsActive: 1 659 | --- !u!4 &1173554385 660 | Transform: 661 | m_ObjectHideFlags: 0 662 | m_CorrespondingSourceObject: {fileID: 0} 663 | m_PrefabInstance: {fileID: 0} 664 | m_PrefabAsset: {fileID: 0} 665 | m_GameObject: {fileID: 1173554384} 666 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 667 | m_LocalPosition: {x: 0, y: 0, z: 0} 668 | m_LocalScale: {x: 1, y: 1, z: 1} 669 | m_Children: 670 | - {fileID: 705507995} 671 | - {fileID: 963194228} 672 | - {fileID: 1911610234} 673 | - {fileID: 17006741} 674 | m_Father: {fileID: 0} 675 | m_RootOrder: 0 676 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 677 | --- !u!114 &1173554387 678 | MonoBehaviour: 679 | m_ObjectHideFlags: 0 680 | m_CorrespondingSourceObject: {fileID: 0} 681 | m_PrefabInstance: {fileID: 0} 682 | m_PrefabAsset: {fileID: 0} 683 | m_GameObject: {fileID: 1173554384} 684 | m_Enabled: 1 685 | m_EditorHideFlags: 0 686 | m_Script: {fileID: 11500000, guid: 9c0efe8d3be140c4b9bdc8b725522384, type: 3} 687 | m_Name: 688 | m_EditorClassIdentifier: 689 | mMapCamera: {fileID: 963194227} 690 | mTileParent: {fileID: 17006741} 691 | mTilePool: {fileID: 1911610234} 692 | --- !u!114 &1173554388 693 | MonoBehaviour: 694 | m_ObjectHideFlags: 0 695 | m_CorrespondingSourceObject: {fileID: 0} 696 | m_PrefabInstance: {fileID: 0} 697 | m_PrefabAsset: {fileID: 0} 698 | m_GameObject: {fileID: 1173554384} 699 | m_Enabled: 1 700 | m_EditorHideFlags: 0 701 | m_Script: {fileID: 11500000, guid: 9310f031dff15bc4cbc4c170a91e6643, type: 3} 702 | m_Name: 703 | m_EditorClassIdentifier: 704 | --- !u!1 &1201027962 705 | GameObject: 706 | m_ObjectHideFlags: 0 707 | m_CorrespondingSourceObject: {fileID: 0} 708 | m_PrefabInstance: {fileID: 0} 709 | m_PrefabAsset: {fileID: 0} 710 | serializedVersion: 6 711 | m_Component: 712 | - component: {fileID: 1201027963} 713 | - component: {fileID: 1201027964} 714 | - component: {fileID: 1201027965} 715 | m_Layer: 20 716 | m_Name: Tile 717 | m_TagString: Untagged 718 | m_Icon: {fileID: 0} 719 | m_NavMeshLayer: 0 720 | m_StaticEditorFlags: 0 721 | m_IsActive: 0 722 | --- !u!4 &1201027963 723 | Transform: 724 | m_ObjectHideFlags: 0 725 | m_CorrespondingSourceObject: {fileID: 0} 726 | m_PrefabInstance: {fileID: 0} 727 | m_PrefabAsset: {fileID: 0} 728 | m_GameObject: {fileID: 1201027962} 729 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 730 | m_LocalPosition: {x: 0, y: 0, z: 0} 731 | m_LocalScale: {x: 1, y: 1, z: 1} 732 | m_Children: [] 733 | m_Father: {fileID: 1911610234} 734 | m_RootOrder: 0 735 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 736 | --- !u!212 &1201027964 737 | SpriteRenderer: 738 | m_ObjectHideFlags: 0 739 | m_CorrespondingSourceObject: {fileID: 0} 740 | m_PrefabInstance: {fileID: 0} 741 | m_PrefabAsset: {fileID: 0} 742 | m_GameObject: {fileID: 1201027962} 743 | m_Enabled: 1 744 | m_CastShadows: 0 745 | m_ReceiveShadows: 0 746 | m_DynamicOccludee: 1 747 | m_MotionVectors: 1 748 | m_LightProbeUsage: 1 749 | m_ReflectionProbeUsage: 1 750 | m_RayTracingMode: 0 751 | m_RenderingLayerMask: 1 752 | m_RendererPriority: 0 753 | m_Materials: 754 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 755 | m_StaticBatchInfo: 756 | firstSubMesh: 0 757 | subMeshCount: 0 758 | m_StaticBatchRoot: {fileID: 0} 759 | m_ProbeAnchor: {fileID: 0} 760 | m_LightProbeVolumeOverride: {fileID: 0} 761 | m_ScaleInLightmap: 1 762 | m_ReceiveGI: 1 763 | m_PreserveUVs: 0 764 | m_IgnoreNormalsForChartDetection: 0 765 | m_ImportantGI: 0 766 | m_StitchLightmapSeams: 1 767 | m_SelectedEditorRenderState: 0 768 | m_MinimumChartSize: 4 769 | m_AutoUVMaxDistance: 0.5 770 | m_AutoUVMaxAngle: 89 771 | m_LightmapParameters: {fileID: 0} 772 | m_SortingLayerID: 0 773 | m_SortingLayer: 0 774 | m_SortingOrder: 0 775 | m_Sprite: {fileID: 21300000, guid: f7e4684552a30bf48ad0db97d59023eb, type: 3} 776 | m_Color: {r: 1, g: 1, b: 1, a: 1} 777 | m_FlipX: 0 778 | m_FlipY: 0 779 | m_DrawMode: 0 780 | m_Size: {x: 0.16, y: 0.16} 781 | m_AdaptiveModeThreshold: 0.5 782 | m_SpriteTileMode: 0 783 | m_WasSpriteAssigned: 1 784 | m_MaskInteraction: 0 785 | m_SpriteSortPoint: 0 786 | --- !u!114 &1201027965 787 | MonoBehaviour: 788 | m_ObjectHideFlags: 0 789 | m_CorrespondingSourceObject: {fileID: 0} 790 | m_PrefabInstance: {fileID: 0} 791 | m_PrefabAsset: {fileID: 0} 792 | m_GameObject: {fileID: 1201027962} 793 | m_Enabled: 1 794 | m_EditorHideFlags: 0 795 | m_Script: {fileID: 11500000, guid: 748551474d1178549853ff466a256654, type: 3} 796 | m_Name: 797 | m_EditorClassIdentifier: 798 | mSpriteRender: {fileID: 1201027964} 799 | --- !u!1 &1454534374 800 | GameObject: 801 | m_ObjectHideFlags: 0 802 | m_CorrespondingSourceObject: {fileID: 0} 803 | m_PrefabInstance: {fileID: 0} 804 | m_PrefabAsset: {fileID: 0} 805 | serializedVersion: 6 806 | m_Component: 807 | - component: {fileID: 1454534375} 808 | - component: {fileID: 1454534376} 809 | m_Layer: 5 810 | m_Name: SwithMapType 811 | m_TagString: Untagged 812 | m_Icon: {fileID: 0} 813 | m_NavMeshLayer: 0 814 | m_StaticEditorFlags: 0 815 | m_IsActive: 1 816 | --- !u!224 &1454534375 817 | RectTransform: 818 | m_ObjectHideFlags: 0 819 | m_CorrespondingSourceObject: {fileID: 0} 820 | m_PrefabInstance: {fileID: 0} 821 | m_PrefabAsset: {fileID: 0} 822 | m_GameObject: {fileID: 1454534374} 823 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 824 | m_LocalPosition: {x: 0, y: 0, z: 0} 825 | m_LocalScale: {x: 1, y: 1, z: 1} 826 | m_Children: 827 | - {fileID: 786962048} 828 | - {fileID: 1578958132} 829 | m_Father: {fileID: 580281663} 830 | m_RootOrder: 0 831 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 832 | m_AnchorMin: {x: 0, y: 1} 833 | m_AnchorMax: {x: 0, y: 1} 834 | m_AnchoredPosition: {x: 0, y: 0} 835 | m_SizeDelta: {x: 120, y: 30} 836 | m_Pivot: {x: 0, y: 1} 837 | --- !u!114 &1454534376 838 | MonoBehaviour: 839 | m_ObjectHideFlags: 0 840 | m_CorrespondingSourceObject: {fileID: 0} 841 | m_PrefabInstance: {fileID: 0} 842 | m_PrefabAsset: {fileID: 0} 843 | m_GameObject: {fileID: 1454534374} 844 | m_Enabled: 1 845 | m_EditorHideFlags: 0 846 | m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} 847 | m_Name: 848 | m_EditorClassIdentifier: 849 | m_Padding: 850 | m_Left: 0 851 | m_Right: 0 852 | m_Top: 0 853 | m_Bottom: 0 854 | m_ChildAlignment: 0 855 | m_StartCorner: 0 856 | m_StartAxis: 0 857 | m_CellSize: {x: 60, y: 30} 858 | m_Spacing: {x: 0, y: 0} 859 | m_Constraint: 1 860 | m_ConstraintCount: 2 861 | --- !u!1 &1578958131 862 | GameObject: 863 | m_ObjectHideFlags: 0 864 | m_CorrespondingSourceObject: {fileID: 0} 865 | m_PrefabInstance: {fileID: 0} 866 | m_PrefabAsset: {fileID: 0} 867 | serializedVersion: 6 868 | m_Component: 869 | - component: {fileID: 1578958132} 870 | - component: {fileID: 1578958135} 871 | - component: {fileID: 1578958134} 872 | - component: {fileID: 1578958133} 873 | m_Layer: 5 874 | m_Name: Button2 875 | m_TagString: Untagged 876 | m_Icon: {fileID: 0} 877 | m_NavMeshLayer: 0 878 | m_StaticEditorFlags: 0 879 | m_IsActive: 1 880 | --- !u!224 &1578958132 881 | RectTransform: 882 | m_ObjectHideFlags: 0 883 | m_CorrespondingSourceObject: {fileID: 0} 884 | m_PrefabInstance: {fileID: 0} 885 | m_PrefabAsset: {fileID: 0} 886 | m_GameObject: {fileID: 1578958131} 887 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 888 | m_LocalPosition: {x: 0, y: 0, z: 0} 889 | m_LocalScale: {x: 1, y: 1, z: 1} 890 | m_Children: 891 | - {fileID: 1828847986} 892 | m_Father: {fileID: 1454534375} 893 | m_RootOrder: 1 894 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 895 | m_AnchorMin: {x: 0, y: 0} 896 | m_AnchorMax: {x: 0, y: 0} 897 | m_AnchoredPosition: {x: 0, y: 0} 898 | m_SizeDelta: {x: 0, y: 0} 899 | m_Pivot: {x: 0.5, y: 0.5} 900 | --- !u!114 &1578958133 901 | MonoBehaviour: 902 | m_ObjectHideFlags: 0 903 | m_CorrespondingSourceObject: {fileID: 0} 904 | m_PrefabInstance: {fileID: 0} 905 | m_PrefabAsset: {fileID: 0} 906 | m_GameObject: {fileID: 1578958131} 907 | m_Enabled: 1 908 | m_EditorHideFlags: 0 909 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 910 | m_Name: 911 | m_EditorClassIdentifier: 912 | m_Navigation: 913 | m_Mode: 3 914 | m_SelectOnUp: {fileID: 0} 915 | m_SelectOnDown: {fileID: 0} 916 | m_SelectOnLeft: {fileID: 0} 917 | m_SelectOnRight: {fileID: 0} 918 | m_Transition: 1 919 | m_Colors: 920 | m_NormalColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 921 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 922 | m_PressedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 923 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 924 | m_DisabledColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 925 | m_ColorMultiplier: 1 926 | m_FadeDuration: 0.1 927 | m_SpriteState: 928 | m_HighlightedSprite: {fileID: 0} 929 | m_PressedSprite: {fileID: 0} 930 | m_SelectedSprite: {fileID: 0} 931 | m_DisabledSprite: {fileID: 0} 932 | m_AnimationTriggers: 933 | m_NormalTrigger: Normal 934 | m_HighlightedTrigger: Highlighted 935 | m_PressedTrigger: Pressed 936 | m_SelectedTrigger: Selected 937 | m_DisabledTrigger: Disabled 938 | m_Interactable: 0 939 | m_TargetGraphic: {fileID: 1578958134} 940 | m_OnClick: 941 | m_PersistentCalls: 942 | m_Calls: [] 943 | --- !u!114 &1578958134 944 | MonoBehaviour: 945 | m_ObjectHideFlags: 0 946 | m_CorrespondingSourceObject: {fileID: 0} 947 | m_PrefabInstance: {fileID: 0} 948 | m_PrefabAsset: {fileID: 0} 949 | m_GameObject: {fileID: 1578958131} 950 | m_Enabled: 1 951 | m_EditorHideFlags: 0 952 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 953 | m_Name: 954 | m_EditorClassIdentifier: 955 | m_Material: {fileID: 0} 956 | m_Color: {r: 1, g: 1, b: 1, a: 1} 957 | m_RaycastTarget: 1 958 | m_Maskable: 1 959 | m_OnCullStateChanged: 960 | m_PersistentCalls: 961 | m_Calls: [] 962 | m_Sprite: {fileID: 0} 963 | m_Type: 1 964 | m_PreserveAspect: 0 965 | m_FillCenter: 1 966 | m_FillMethod: 4 967 | m_FillAmount: 1 968 | m_FillClockwise: 1 969 | m_FillOrigin: 0 970 | m_UseSpriteMesh: 0 971 | m_PixelsPerUnitMultiplier: 1 972 | --- !u!222 &1578958135 973 | CanvasRenderer: 974 | m_ObjectHideFlags: 0 975 | m_CorrespondingSourceObject: {fileID: 0} 976 | m_PrefabInstance: {fileID: 0} 977 | m_PrefabAsset: {fileID: 0} 978 | m_GameObject: {fileID: 1578958131} 979 | m_CullTransparentMesh: 0 980 | --- !u!1 &1828847985 981 | GameObject: 982 | m_ObjectHideFlags: 0 983 | m_CorrespondingSourceObject: {fileID: 0} 984 | m_PrefabInstance: {fileID: 0} 985 | m_PrefabAsset: {fileID: 0} 986 | serializedVersion: 6 987 | m_Component: 988 | - component: {fileID: 1828847986} 989 | - component: {fileID: 1828847988} 990 | - component: {fileID: 1828847987} 991 | m_Layer: 5 992 | m_Name: Text 993 | m_TagString: Untagged 994 | m_Icon: {fileID: 0} 995 | m_NavMeshLayer: 0 996 | m_StaticEditorFlags: 0 997 | m_IsActive: 1 998 | --- !u!224 &1828847986 999 | RectTransform: 1000 | m_ObjectHideFlags: 0 1001 | m_CorrespondingSourceObject: {fileID: 0} 1002 | m_PrefabInstance: {fileID: 0} 1003 | m_PrefabAsset: {fileID: 0} 1004 | m_GameObject: {fileID: 1828847985} 1005 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1006 | m_LocalPosition: {x: 0, y: 0, z: 0} 1007 | m_LocalScale: {x: 1, y: 1, z: 1} 1008 | m_Children: [] 1009 | m_Father: {fileID: 1578958132} 1010 | m_RootOrder: 0 1011 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1012 | m_AnchorMin: {x: 0, y: 0} 1013 | m_AnchorMax: {x: 1, y: 1} 1014 | m_AnchoredPosition: {x: 0, y: 0} 1015 | m_SizeDelta: {x: 0, y: 0} 1016 | m_Pivot: {x: 0.5, y: 0.5} 1017 | --- !u!114 &1828847987 1018 | MonoBehaviour: 1019 | m_ObjectHideFlags: 0 1020 | m_CorrespondingSourceObject: {fileID: 0} 1021 | m_PrefabInstance: {fileID: 0} 1022 | m_PrefabAsset: {fileID: 0} 1023 | m_GameObject: {fileID: 1828847985} 1024 | m_Enabled: 1 1025 | m_EditorHideFlags: 0 1026 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 1027 | m_Name: 1028 | m_EditorClassIdentifier: 1029 | m_Material: {fileID: 0} 1030 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 1031 | m_RaycastTarget: 1 1032 | m_Maskable: 1 1033 | m_OnCullStateChanged: 1034 | m_PersistentCalls: 1035 | m_Calls: [] 1036 | m_FontData: 1037 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1038 | m_FontSize: 14 1039 | m_FontStyle: 0 1040 | m_BestFit: 0 1041 | m_MinSize: 10 1042 | m_MaxSize: 40 1043 | m_Alignment: 4 1044 | m_AlignByGeometry: 0 1045 | m_RichText: 1 1046 | m_HorizontalOverflow: 0 1047 | m_VerticalOverflow: 0 1048 | m_LineSpacing: 1 1049 | m_Text: "\u536B\u661F\u56FE" 1050 | --- !u!222 &1828847988 1051 | CanvasRenderer: 1052 | m_ObjectHideFlags: 0 1053 | m_CorrespondingSourceObject: {fileID: 0} 1054 | m_PrefabInstance: {fileID: 0} 1055 | m_PrefabAsset: {fileID: 0} 1056 | m_GameObject: {fileID: 1828847985} 1057 | m_CullTransparentMesh: 0 1058 | --- !u!1 &1911610233 1059 | GameObject: 1060 | m_ObjectHideFlags: 0 1061 | m_CorrespondingSourceObject: {fileID: 0} 1062 | m_PrefabInstance: {fileID: 0} 1063 | m_PrefabAsset: {fileID: 0} 1064 | serializedVersion: 6 1065 | m_Component: 1066 | - component: {fileID: 1911610234} 1067 | m_Layer: 20 1068 | m_Name: TilePool 1069 | m_TagString: Untagged 1070 | m_Icon: {fileID: 0} 1071 | m_NavMeshLayer: 0 1072 | m_StaticEditorFlags: 0 1073 | m_IsActive: 0 1074 | --- !u!4 &1911610234 1075 | Transform: 1076 | m_ObjectHideFlags: 0 1077 | m_CorrespondingSourceObject: {fileID: 0} 1078 | m_PrefabInstance: {fileID: 0} 1079 | m_PrefabAsset: {fileID: 0} 1080 | m_GameObject: {fileID: 1911610233} 1081 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1082 | m_LocalPosition: {x: 0, y: 0, z: 0} 1083 | m_LocalScale: {x: 1, y: 1, z: 1} 1084 | m_Children: 1085 | - {fileID: 1201027963} 1086 | m_Father: {fileID: 1173554385} 1087 | m_RootOrder: 2 1088 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1089 | --- !u!1 &1925879931 1090 | GameObject: 1091 | m_ObjectHideFlags: 0 1092 | m_CorrespondingSourceObject: {fileID: 0} 1093 | m_PrefabInstance: {fileID: 0} 1094 | m_PrefabAsset: {fileID: 0} 1095 | serializedVersion: 6 1096 | m_Component: 1097 | - component: {fileID: 1925879934} 1098 | - component: {fileID: 1925879933} 1099 | - component: {fileID: 1925879932} 1100 | m_Layer: 0 1101 | m_Name: EventSystem 1102 | m_TagString: Untagged 1103 | m_Icon: {fileID: 0} 1104 | m_NavMeshLayer: 0 1105 | m_StaticEditorFlags: 0 1106 | m_IsActive: 1 1107 | --- !u!114 &1925879932 1108 | MonoBehaviour: 1109 | m_ObjectHideFlags: 0 1110 | m_CorrespondingSourceObject: {fileID: 0} 1111 | m_PrefabInstance: {fileID: 0} 1112 | m_PrefabAsset: {fileID: 0} 1113 | m_GameObject: {fileID: 1925879931} 1114 | m_Enabled: 1 1115 | m_EditorHideFlags: 0 1116 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 1117 | m_Name: 1118 | m_EditorClassIdentifier: 1119 | m_HorizontalAxis: Horizontal 1120 | m_VerticalAxis: Vertical 1121 | m_SubmitButton: Submit 1122 | m_CancelButton: Cancel 1123 | m_InputActionsPerSecond: 10 1124 | m_RepeatDelay: 0.5 1125 | m_ForceModuleActive: 0 1126 | --- !u!114 &1925879933 1127 | MonoBehaviour: 1128 | m_ObjectHideFlags: 0 1129 | m_CorrespondingSourceObject: {fileID: 0} 1130 | m_PrefabInstance: {fileID: 0} 1131 | m_PrefabAsset: {fileID: 0} 1132 | m_GameObject: {fileID: 1925879931} 1133 | m_Enabled: 1 1134 | m_EditorHideFlags: 0 1135 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 1136 | m_Name: 1137 | m_EditorClassIdentifier: 1138 | m_FirstSelected: {fileID: 0} 1139 | m_sendNavigationEvents: 1 1140 | m_DragThreshold: 10 1141 | --- !u!4 &1925879934 1142 | Transform: 1143 | m_ObjectHideFlags: 0 1144 | m_CorrespondingSourceObject: {fileID: 0} 1145 | m_PrefabInstance: {fileID: 0} 1146 | m_PrefabAsset: {fileID: 0} 1147 | m_GameObject: {fileID: 1925879931} 1148 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1149 | m_LocalPosition: {x: 0, y: 0, z: 0} 1150 | m_LocalScale: {x: 1, y: 1, z: 1} 1151 | m_Children: [] 1152 | m_Father: {fileID: 0} 1153 | m_RootOrder: 2 1154 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1155 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cfab582e8f6b3046ad1064c4a1a2478 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcb401c143d21b34c9196d38d172d7aa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5da03c1599ad89943a96eb157039a8d3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/EventManager.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using Achonor; 7 | 8 | namespace ShuJun.Event { 9 | public class EventManager : MonoBehaviour 10 | { 11 | private class EventContainer { 12 | public readonly Component mBindGo; 13 | public readonly Action mCallback; 14 | 15 | public EventContainer(Component _bindGo, Action _callback) { 16 | mBindGo = _bindGo; 17 | mCallback = _callback; 18 | } 19 | 20 | public bool Dispatch(IBaseEvent param) { 21 | if (null == mBindGo) { 22 | return false; 23 | } 24 | mCallback.Invoke(param); 25 | return true; 26 | } 27 | 28 | } 29 | 30 | private static Dictionary> mCallbackDict = new Dictionary>(); 31 | 32 | public static void Register(Action callback, Component _bindGo) where T : IBaseEvent { 33 | EventContainer eventContainer = new EventContainer(_bindGo, (IBaseEvent param) => { 34 | callback.Invoke((T)param); 35 | }); 36 | 37 | System.Type eventType = typeof(T); 38 | if (!mCallbackDict.ContainsKey(eventType)) { 39 | mCallbackDict.Add(eventType, new List()); 40 | } 41 | mCallbackDict[eventType].Add(eventContainer); 42 | } 43 | 44 | public static void Remove(Component _bindGo) { 45 | System.Type eventType = typeof(T); 46 | if (null == _bindGo || !mCallbackDict.ContainsKey(eventType)) { 47 | return; 48 | } 49 | List eventContainers = mCallbackDict[eventType]; 50 | for (int i = eventContainers.Count - 1; 0 <= i; i--) { 51 | if (eventContainers[i].mBindGo == _bindGo) { 52 | eventContainers.RemoveAt(i); 53 | } 54 | } 55 | } 56 | 57 | public static void Dispatch(T _event) where T : IBaseEvent { 58 | print("激活事件 : " + typeof(T).Name); 59 | System.Type eventType = typeof(T); 60 | if (!mCallbackDict.ContainsKey(eventType)) { 61 | return; 62 | } 63 | List eventContainers = mCallbackDict[eventType]; 64 | for (int i = eventContainers.Count - 1; 0 <= i; i--) { 65 | bool result = eventContainers[i].Dispatch(_event); 66 | if (!result) { 67 | eventContainers.RemoveAt(i); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/EventManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 560a17e01c9be4e45a4152b736acaab1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/IBaseEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System; 5 | 6 | namespace ShuJun.Event { 7 | public interface IBaseEvent 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/IBaseEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93fd6049a9f0dfb43ad4015608ba8fdf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchMoveEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ShuJun.Event { 6 | public class TouchMoveEvent : IBaseEvent 7 | { 8 | public Vector2 MoveOffset; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchMoveEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 656a485c21ae9c042830efb108d5549e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchMovedEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ShuJun.Event { 6 | public class TouchMovedEvent : IBaseEvent 7 | { 8 | public Vector2 TouchPoint = Vector2.zero; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchMovedEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb4e5c73ea232da4dad7bbd339704cd6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchRotateEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ShuJun.Event { 6 | public class TouchRotateEvent : IBaseEvent 7 | { 8 | public Vector2 ChangedEuler = Vector2.zero; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchRotateEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81b9a75760a501441ae76343698bc818 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchRotatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ShuJun.Event { 6 | public class TouchRotatedEvent : IBaseEvent 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchRotatedEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db01ac8c28ea57b4ca644f66fd108177 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchZoomEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace ShuJun.Event { 6 | public class TouchZoomEvent : IBaseEvent 7 | { 8 | public float ChangeZoom = 0; 9 | public Vector2 ZoomCenterPoint = Vector2.zero; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Event/TouchZoomEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bc7937bee2c0b14090ae4790d2129c0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Test.cs: -------------------------------------------------------------------------------- 1 | using Achonor.LBSMap; 2 | using ShuJun.Event; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | 8 | public class Test : MonoBehaviour 9 | { 10 | [SerializeField] 11 | private MapServices mMapServices; 12 | 13 | [SerializeField] 14 | private Button mStreetBtn; 15 | 16 | [SerializeField] 17 | private Button mSatelliteBtn; 18 | 19 | private void Awake() { 20 | if (null == mMapServices) { 21 | mMapServices = GetComponent(); 22 | } 23 | 24 | EventManager.Register((param) => { 25 | mMapServices.MoveMap(param.MoveOffset); 26 | }, this); 27 | 28 | EventManager.Register((param)=>{ 29 | mMapServices.DoRender(); 30 | }, this); 31 | 32 | EventManager.Register((param) => { 33 | mMapServices.ZoomMap(param.ChangeZoom); 34 | mMapServices.DoRender(); 35 | }, this); 36 | 37 | EventManager.Register((TouchRotateEvent param) => { 38 | mMapServices.RotateMap(param.ChangedEuler); 39 | }, this); 40 | 41 | EventManager.Register((TouchRotatedEvent param) => { 42 | mMapServices.DoRender(); 43 | }, this); 44 | 45 | mStreetBtn.onClick.AddListener(() => { 46 | SetMapType(MapType.Street); 47 | mMapServices.DoRender(); 48 | }); 49 | 50 | mSatelliteBtn.onClick.AddListener(() => { 51 | SetMapType(MapType.Satellite); 52 | mMapServices.DoRender(); 53 | }); 54 | 55 | print(MCTransform.ConvertLL2MC(new Vector2D(180, 74))); 56 | } 57 | 58 | private void Start() { 59 | SetMapType(MapType.Street); 60 | mMapServices.SetZoomLevel(19); 61 | mMapServices.SetMapCenter(new Vector2D(112.888678, 28.213555)); 62 | mMapServices.DoRender(); 63 | } 64 | 65 | 66 | private void SetMapType(MapType mapType) { 67 | mStreetBtn.interactable = mapType == MapType.Satellite; 68 | mSatelliteBtn.interactable = mapType == MapType.Street; 69 | mMapServices.SetMapType(mapType); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/Test.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 602f26b0c87805d48b3d9b6c06f9be3e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/TouchManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using ShuJun.Event; 5 | using Achonor; 6 | 7 | namespace ShuJun.Touch { 8 | public class TouchManager : MonoBehaviour 9 | { 10 | private Vector2 mLastMousePos; 11 | 12 | private bool mTouchMoving = false; 13 | private bool mTouchZooming = false; 14 | private bool mTouchRotateing = false; 15 | 16 | 17 | private void Update() { 18 | if (Input.touchCount <= 0 && !CheckPointInScreen(Input.mousePosition)) { 19 | return; 20 | } 21 | if (!mTouchZooming && Input.GetMouseButtonUp(0)) { 22 | if (mTouchMoving) { 23 | mTouchMoving = false; 24 | EventManager.Dispatch(new TouchMovedEvent() { 25 | TouchPoint = Input.mousePosition 26 | }); 27 | } 28 | if (mTouchRotateing) { 29 | mTouchRotateing = false; 30 | EventManager.Dispatch(new TouchRotatedEvent()); 31 | } 32 | } 33 | if ((Input.touchSupported && Input.touchCount <= 0)) { 34 | mTouchZooming = false; 35 | return; 36 | } 37 | if (2 == Input.touchCount) { 38 | mTouchZooming = true; 39 | UnityEngine.Touch touch1 = Input.touches[0]; 40 | UnityEngine.Touch touch2 = Input.touches[1]; 41 | if ((touch1.phase == TouchPhase.Moved || touch1.phase == TouchPhase.Stationary) 42 | && (touch2.phase == TouchPhase.Moved || touch2.phase == TouchPhase.Stationary)) { 43 | //计算距离 44 | float oldDistance = Vector2.Distance(touch1.position - touch1.deltaPosition, touch2.position - touch2.deltaPosition); 45 | float newDistance = Vector2.Distance(touch1.position, touch2.position); 46 | if (1e-8 < Mathf.Abs(oldDistance -newDistance)) { 47 | EventManager.Dispatch(new TouchZoomEvent() { 48 | ChangeZoom = (newDistance / oldDistance) - 1, 49 | ZoomCenterPoint = (touch1.position + touch2.position) / 2 50 | }); 51 | } 52 | } 53 | } else if (GetControl() && Input.GetAxis("Mouse ScrollWheel") < 0) { 54 | if (CheckPointInScreen(Input.mousePosition)) { 55 | //滚轮缩小 56 | EventManager.Dispatch(new TouchZoomEvent() { 57 | ChangeZoom = -0.1f, 58 | ZoomCenterPoint = Input.mousePosition 59 | }); 60 | } 61 | 62 | } else if (GetControl() && 0 < Input.GetAxis("Mouse ScrollWheel")) { 63 | if (CheckPointInScreen(Input.mousePosition)) { 64 | //滚轮放大 65 | EventManager.Dispatch(new TouchZoomEvent() { 66 | ChangeZoom = 0.1f, 67 | ZoomCenterPoint = Input.mousePosition 68 | }); 69 | } 70 | } else if (!mTouchZooming && GetAlt() && Input.GetMouseButton(0) 71 | && !mLastMousePos.Equals(Input.mousePosition)) { 72 | mTouchRotateing = true; 73 | //旋转地图 74 | Vector2 distance = ((Vector2)Input.mousePosition - mLastMousePos) * (540f / Screen.height) * 0.6f; 75 | EventManager.Dispatch(new TouchRotateEvent() { 76 | ChangedEuler = new Vector2(-distance.y, distance.x) 77 | }); 78 | } else if (Input.GetMouseButtonDown(0)) { 79 | //鼠标按下 80 | 81 | } else if (!mTouchZooming && Input.GetMouseButton(0) 82 | && !mLastMousePos.Equals(Input.mousePosition)) { 83 | mTouchMoving = true; 84 | // 鼠标长按,判断移动 85 | EventManager.Dispatch(new TouchMoveEvent() { 86 | MoveOffset = ((Vector2)Input.mousePosition - mLastMousePos) * (540f / Screen.height) 87 | }); 88 | } 89 | } 90 | 91 | private void LateUpdate() { 92 | mLastMousePos = Input.mousePosition; 93 | } 94 | 95 | private bool GetControl() { 96 | return Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl); 97 | } 98 | 99 | private bool GetAlt() { 100 | return Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt); 101 | } 102 | 103 | public bool CheckPointInScreen(Vector2 point) { 104 | return (0 <= point.x && point.x <= Screen.width 105 | && 0 <= point.y && point.y <= Screen.height); 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/CSharp/TouchManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9310f031dff15bc4cbc4c170a91e6643 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} 41 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 42 | m_PreloadedShaders: [] 43 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 44 | type: 0} 45 | m_CustomRenderPipeline: {fileID: 0} 46 | m_TransparencySortMode: 0 47 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 48 | m_DefaultRenderingPath: 1 49 | m_DefaultMobileRenderingPath: 1 50 | m_TierSettings: [] 51 | m_LightmapStripping: 0 52 | m_FogStripping: 0 53 | m_InstancingStripping: 0 54 | m_LightmapKeepPlain: 1 55 | m_LightmapKeepDirCombined: 1 56 | m_LightmapKeepDynamicPlain: 1 57 | m_LightmapKeepDynamicDirCombined: 1 58 | m_LightmapKeepShadowMask: 1 59 | m_LightmapKeepSubtractive: 1 60 | m_FogKeepLinear: 1 61 | m_FogKeepExp: 1 62 | m_FogKeepExp2: 1 63 | m_AlbedoSwatchInfos: [] 64 | m_LightsUseLinearIntensity: 0 65 | m_LightsUseColorTemperature: 0 66 | m_LogWhenShaderIsCompiled: 0 67 | m_AllowEnlightenSupportForUpgradedProject: 0 68 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13960, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.cn 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 20 7 | productGUID: 5eff4cb194fd9474d92e6df378c9d0d0 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: BaiduMap 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_ShowUnitySplashAds: 0 45 | m_AdsAndroidGameId: 46 | m_AdsIosGameId: 47 | m_ShowSplashAdsSlogan: 0 48 | m_SloganImage: {fileID: 0} 49 | m_SloganHeight: 150 50 | m_HolographicTrackingLossScreen: {fileID: 0} 51 | defaultScreenWidth: 1024 52 | defaultScreenHeight: 768 53 | defaultScreenWidthWeb: 960 54 | defaultScreenHeightWeb: 600 55 | m_StereoRenderingPath: 0 56 | m_ActiveColorSpace: 0 57 | m_MTRendering: 1 58 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 59 | iosShowActivityIndicatorOnLoading: -1 60 | androidShowActivityIndicatorOnLoading: -1 61 | iosUseCustomAppBackgroundBehavior: 0 62 | iosAllowHTTPDownload: 1 63 | allowedAutorotateToPortrait: 1 64 | allowedAutorotateToPortraitUpsideDown: 1 65 | allowedAutorotateToLandscapeRight: 1 66 | allowedAutorotateToLandscapeLeft: 1 67 | useOSAutorotation: 1 68 | use32BitDisplayBuffer: 1 69 | preserveFramebufferAlpha: 0 70 | disableDepthAndStencilBuffers: 0 71 | androidStartInFullscreen: 1 72 | androidRenderOutsideSafeArea: 1 73 | androidUseSwappy: 0 74 | androidBlitType: 0 75 | defaultIsNativeResolution: 1 76 | macRetinaSupport: 1 77 | runInBackground: 1 78 | captureSingleScreen: 0 79 | muteOtherAudioSources: 0 80 | Prepare IOS For Recording: 0 81 | Force IOS Speakers When Recording: 0 82 | deferSystemGesturesMode: 0 83 | hideHomeButton: 0 84 | submitAnalytics: 1 85 | usePlayerLog: 1 86 | bakeCollisionMeshes: 0 87 | forceSingleInstance: 0 88 | useFlipModelSwapchain: 1 89 | resizableWindow: 0 90 | useMacAppStoreValidation: 0 91 | macAppStoreCategory: public.app-category.games 92 | gpuSkinning: 1 93 | xboxPIXTextureCapture: 0 94 | xboxEnableAvatar: 0 95 | xboxEnableKinect: 0 96 | xboxEnableKinectAutoTracking: 0 97 | xboxEnableFitness: 0 98 | visibleInBackground: 1 99 | allowFullscreenSwitch: 1 100 | fullscreenMode: 1 101 | xboxSpeechDB: 0 102 | xboxEnableHeadOrientation: 0 103 | xboxEnableGuest: 0 104 | xboxEnablePIXSampling: 0 105 | metalFramebufferOnly: 0 106 | xboxOneResolution: 0 107 | xboxOneSResolution: 0 108 | xboxOneXResolution: 3 109 | xboxOneMonoLoggingLevel: 0 110 | xboxOneLoggingLevel: 1 111 | xboxOneDisableEsram: 0 112 | xboxOneEnableTypeOptimization: 0 113 | xboxOnePresentImmediateThreshold: 0 114 | switchQueueCommandMemory: 0 115 | switchQueueControlMemory: 16384 116 | switchQueueComputeMemory: 262144 117 | switchNVNShaderPoolsGranularity: 33554432 118 | switchNVNDefaultPoolsGranularity: 16777216 119 | switchNVNOtherPoolsGranularity: 16777216 120 | switchNVNMaxPublicTextureIDCount: 0 121 | switchNVNMaxPublicSamplerIDCount: 0 122 | stadiaPresentMode: 0 123 | stadiaTargetFramerate: 0 124 | vulkanNumSwapchainBuffers: 3 125 | vulkanEnableSetSRGBWrite: 0 126 | vulkanEnableLateAcquireNextImage: 0 127 | useSecurityBuild: 0 128 | m_SupportedAspectRatios: 129 | 4:3: 1 130 | 5:4: 1 131 | 16:10: 1 132 | 16:9: 1 133 | Others: 1 134 | bundleVersion: 0.1 135 | preloadedAssets: [] 136 | metroInputSource: 0 137 | wsaTransparentSwapchain: 0 138 | m_HolographicPauseOnTrackingLoss: 1 139 | xboxOneDisableKinectGpuReservation: 1 140 | xboxOneEnable7thCore: 1 141 | vrSettings: 142 | cardboard: 143 | depthFormat: 0 144 | enableTransitionView: 0 145 | daydream: 146 | depthFormat: 0 147 | useSustainedPerformanceMode: 0 148 | enableVideoLayer: 0 149 | useProtectedVideoMemory: 0 150 | minimumSupportedHeadTracking: 0 151 | maximumSupportedHeadTracking: 1 152 | hololens: 153 | depthFormat: 1 154 | depthBufferSharingEnabled: 1 155 | lumin: 156 | depthFormat: 0 157 | frameTiming: 2 158 | enableGLCache: 0 159 | glCacheMaxBlobSize: 524288 160 | glCacheMaxFileSize: 8388608 161 | oculus: 162 | sharedDepthBuffer: 1 163 | dashSupport: 1 164 | lowOverheadMode: 0 165 | protectedContext: 0 166 | v2Signing: 1 167 | enable360StereoCapture: 0 168 | isWsaHolographicRemotingEnabled: 0 169 | enableFrameTimingStats: 0 170 | useHDRDisplay: 0 171 | D3DHDRBitDepth: 0 172 | m_ColorGamuts: 00000000 173 | targetPixelDensity: 30 174 | resolutionScalingMode: 0 175 | androidSupportedAspectRatio: 1 176 | androidMaxAspectRatio: 2.1 177 | applicationIdentifier: {} 178 | buildNumber: {} 179 | AndroidBundleVersionCode: 1 180 | AndroidMinSdkVersion: 19 181 | AndroidTargetSdkVersion: 0 182 | AndroidPreferredInstallLocation: 1 183 | aotOptions: 184 | stripEngineCode: 1 185 | iPhoneStrippingLevel: 0 186 | iPhoneScriptCallOptimization: 0 187 | ForceInternetPermission: 0 188 | ForceSDCardPermission: 0 189 | CreateWallpaper: 0 190 | APKExpansionFiles: 0 191 | keepLoadedShadersAlive: 0 192 | StripUnusedMeshComponents: 1 193 | VertexChannelCompressionMask: 4054 194 | iPhoneSdkVersion: 988 195 | iOSTargetOSVersionString: 10.0 196 | tvOSSdkVersion: 0 197 | tvOSRequireExtendedGameController: 0 198 | tvOSTargetOSVersionString: 10.0 199 | uIPrerenderedIcon: 0 200 | uIRequiresPersistentWiFi: 0 201 | uIRequiresFullScreen: 1 202 | uIStatusBarHidden: 1 203 | uIExitOnSuspend: 0 204 | uIStatusBarStyle: 0 205 | appleTVSplashScreen: {fileID: 0} 206 | appleTVSplashScreen2x: {fileID: 0} 207 | tvOSSmallIconLayers: [] 208 | tvOSSmallIconLayers2x: [] 209 | tvOSLargeIconLayers: [] 210 | tvOSLargeIconLayers2x: [] 211 | tvOSTopShelfImageLayers: [] 212 | tvOSTopShelfImageLayers2x: [] 213 | tvOSTopShelfImageWideLayers: [] 214 | tvOSTopShelfImageWideLayers2x: [] 215 | iOSLaunchScreenType: 0 216 | iOSLaunchScreenPortrait: {fileID: 0} 217 | iOSLaunchScreenLandscape: {fileID: 0} 218 | iOSLaunchScreenBackgroundColor: 219 | serializedVersion: 2 220 | rgba: 0 221 | iOSLaunchScreenFillPct: 100 222 | iOSLaunchScreenSize: 100 223 | iOSLaunchScreenCustomXibPath: 224 | iOSLaunchScreeniPadType: 0 225 | iOSLaunchScreeniPadImage: {fileID: 0} 226 | iOSLaunchScreeniPadBackgroundColor: 227 | serializedVersion: 2 228 | rgba: 0 229 | iOSLaunchScreeniPadFillPct: 100 230 | iOSLaunchScreeniPadSize: 100 231 | iOSLaunchScreeniPadCustomXibPath: 232 | iOSUseLaunchScreenStoryboard: 0 233 | iOSLaunchScreenCustomStoryboardPath: 234 | iOSDeviceRequirements: [] 235 | iOSURLSchemes: [] 236 | iOSBackgroundModes: 0 237 | iOSMetalForceHardShadows: 0 238 | metalEditorSupport: 1 239 | metalAPIValidation: 1 240 | iOSRenderExtraFrameOnPause: 0 241 | iosCopyPluginsCodeInsteadOfSymlink: 0 242 | appleDeveloperTeamID: 243 | iOSManualSigningProvisioningProfileID: 244 | tvOSManualSigningProvisioningProfileID: 245 | iOSManualSigningProvisioningProfileType: 0 246 | tvOSManualSigningProvisioningProfileType: 0 247 | appleEnableAutomaticSigning: 0 248 | iOSRequireARKit: 0 249 | iOSAutomaticallyDetectAndAddCapabilities: 1 250 | appleEnableProMotion: 0 251 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 252 | templatePackageId: com.unity.template.3d@4.2.8 253 | templateDefaultScene: Assets/Scenes/SampleScene.unity 254 | AndroidTargetArchitectures: 1 255 | AndroidSplashScreenScale: 0 256 | androidSplashScreen: {fileID: 0} 257 | AndroidKeystoreName: 258 | AndroidKeyaliasName: 259 | AndroidBuildApkPerCpuArchitecture: 0 260 | AndroidTVCompatibility: 0 261 | AndroidIsGame: 1 262 | AndroidEnableTango: 0 263 | androidEnableBanner: 1 264 | androidUseLowAccuracyLocation: 0 265 | androidUseCustomKeystore: 0 266 | m_AndroidBanners: 267 | - width: 320 268 | height: 180 269 | banner: {fileID: 0} 270 | androidGamepadSupportLevel: 0 271 | AndroidValidateAppBundleSize: 1 272 | AndroidAppBundleSizeToValidate: 150 273 | m_BuildTargetIcons: [] 274 | m_BuildTargetPlatformIcons: [] 275 | m_BuildTargetBatching: 276 | - m_BuildTarget: Standalone 277 | m_StaticBatching: 1 278 | m_DynamicBatching: 0 279 | - m_BuildTarget: tvOS 280 | m_StaticBatching: 1 281 | m_DynamicBatching: 0 282 | - m_BuildTarget: Android 283 | m_StaticBatching: 1 284 | m_DynamicBatching: 0 285 | - m_BuildTarget: iPhone 286 | m_StaticBatching: 1 287 | m_DynamicBatching: 0 288 | - m_BuildTarget: WebGL 289 | m_StaticBatching: 0 290 | m_DynamicBatching: 0 291 | m_BuildTargetEncrypting: [] 292 | m_BuildTargetGraphicsJobs: 293 | - m_BuildTarget: MacStandaloneSupport 294 | m_GraphicsJobs: 0 295 | - m_BuildTarget: Switch 296 | m_GraphicsJobs: 1 297 | - m_BuildTarget: MetroSupport 298 | m_GraphicsJobs: 1 299 | - m_BuildTarget: AppleTVSupport 300 | m_GraphicsJobs: 0 301 | - m_BuildTarget: BJMSupport 302 | m_GraphicsJobs: 1 303 | - m_BuildTarget: LinuxStandaloneSupport 304 | m_GraphicsJobs: 1 305 | - m_BuildTarget: PS4Player 306 | m_GraphicsJobs: 1 307 | - m_BuildTarget: iOSSupport 308 | m_GraphicsJobs: 0 309 | - m_BuildTarget: WindowsStandaloneSupport 310 | m_GraphicsJobs: 1 311 | - m_BuildTarget: XboxOnePlayer 312 | m_GraphicsJobs: 1 313 | - m_BuildTarget: LuminSupport 314 | m_GraphicsJobs: 0 315 | - m_BuildTarget: AndroidPlayer 316 | m_GraphicsJobs: 0 317 | - m_BuildTarget: WebGLSupport 318 | m_GraphicsJobs: 0 319 | m_BuildTargetGraphicsJobMode: 320 | - m_BuildTarget: PS4Player 321 | m_GraphicsJobMode: 0 322 | - m_BuildTarget: XboxOnePlayer 323 | m_GraphicsJobMode: 0 324 | m_BuildTargetGraphicsAPIs: 325 | - m_BuildTarget: AndroidPlayer 326 | m_APIs: 150000000b000000 327 | m_Automatic: 0 328 | - m_BuildTarget: iOSSupport 329 | m_APIs: 10000000 330 | m_Automatic: 1 331 | - m_BuildTarget: AppleTVSupport 332 | m_APIs: 10000000 333 | m_Automatic: 0 334 | - m_BuildTarget: WebGLSupport 335 | m_APIs: 0b000000 336 | m_Automatic: 1 337 | m_BuildTargetVRSettings: 338 | - m_BuildTarget: Standalone 339 | m_Enabled: 0 340 | m_Devices: 341 | - Oculus 342 | - OpenVR 343 | openGLRequireES31: 0 344 | openGLRequireES31AEP: 0 345 | openGLRequireES32: 0 346 | m_TemplateCustomTags: {} 347 | mobileMTRendering: 348 | Android: 1 349 | iPhone: 1 350 | tvOS: 1 351 | m_BuildTargetGroupLightmapEncodingQuality: [] 352 | m_BuildTargetGroupLightmapSettings: [] 353 | playModeTestRunnerEnabled: 0 354 | runPlayModeTestAsEditModeTest: 0 355 | actionOnDotNetUnhandledException: 1 356 | enableInternalProfiler: 0 357 | logObjCUncaughtExceptions: 1 358 | enableCrashReportAPI: 0 359 | cameraUsageDescription: 360 | locationUsageDescription: 361 | microphoneUsageDescription: 362 | switchNetLibKey: 363 | switchSocketMemoryPoolSize: 6144 364 | switchSocketAllocatorPoolSize: 128 365 | switchSocketConcurrencyLimit: 14 366 | switchScreenResolutionBehavior: 2 367 | switchUseCPUProfiler: 0 368 | switchApplicationID: 0x01004b9000490000 369 | switchNSODependencies: 370 | switchTitleNames_0: 371 | switchTitleNames_1: 372 | switchTitleNames_2: 373 | switchTitleNames_3: 374 | switchTitleNames_4: 375 | switchTitleNames_5: 376 | switchTitleNames_6: 377 | switchTitleNames_7: 378 | switchTitleNames_8: 379 | switchTitleNames_9: 380 | switchTitleNames_10: 381 | switchTitleNames_11: 382 | switchTitleNames_12: 383 | switchTitleNames_13: 384 | switchTitleNames_14: 385 | switchPublisherNames_0: 386 | switchPublisherNames_1: 387 | switchPublisherNames_2: 388 | switchPublisherNames_3: 389 | switchPublisherNames_4: 390 | switchPublisherNames_5: 391 | switchPublisherNames_6: 392 | switchPublisherNames_7: 393 | switchPublisherNames_8: 394 | switchPublisherNames_9: 395 | switchPublisherNames_10: 396 | switchPublisherNames_11: 397 | switchPublisherNames_12: 398 | switchPublisherNames_13: 399 | switchPublisherNames_14: 400 | switchIcons_0: {fileID: 0} 401 | switchIcons_1: {fileID: 0} 402 | switchIcons_2: {fileID: 0} 403 | switchIcons_3: {fileID: 0} 404 | switchIcons_4: {fileID: 0} 405 | switchIcons_5: {fileID: 0} 406 | switchIcons_6: {fileID: 0} 407 | switchIcons_7: {fileID: 0} 408 | switchIcons_8: {fileID: 0} 409 | switchIcons_9: {fileID: 0} 410 | switchIcons_10: {fileID: 0} 411 | switchIcons_11: {fileID: 0} 412 | switchIcons_12: {fileID: 0} 413 | switchIcons_13: {fileID: 0} 414 | switchIcons_14: {fileID: 0} 415 | switchSmallIcons_0: {fileID: 0} 416 | switchSmallIcons_1: {fileID: 0} 417 | switchSmallIcons_2: {fileID: 0} 418 | switchSmallIcons_3: {fileID: 0} 419 | switchSmallIcons_4: {fileID: 0} 420 | switchSmallIcons_5: {fileID: 0} 421 | switchSmallIcons_6: {fileID: 0} 422 | switchSmallIcons_7: {fileID: 0} 423 | switchSmallIcons_8: {fileID: 0} 424 | switchSmallIcons_9: {fileID: 0} 425 | switchSmallIcons_10: {fileID: 0} 426 | switchSmallIcons_11: {fileID: 0} 427 | switchSmallIcons_12: {fileID: 0} 428 | switchSmallIcons_13: {fileID: 0} 429 | switchSmallIcons_14: {fileID: 0} 430 | switchManualHTML: 431 | switchAccessibleURLs: 432 | switchLegalInformation: 433 | switchMainThreadStackSize: 1048576 434 | switchPresenceGroupId: 435 | switchLogoHandling: 0 436 | switchReleaseVersion: 0 437 | switchDisplayVersion: 1.0.0 438 | switchStartupUserAccount: 0 439 | switchTouchScreenUsage: 0 440 | switchSupportedLanguagesMask: 0 441 | switchLogoType: 0 442 | switchApplicationErrorCodeCategory: 443 | switchUserAccountSaveDataSize: 0 444 | switchUserAccountSaveDataJournalSize: 0 445 | switchApplicationAttribute: 0 446 | switchCardSpecSize: -1 447 | switchCardSpecClock: -1 448 | switchRatingsMask: 0 449 | switchRatingsInt_0: 0 450 | switchRatingsInt_1: 0 451 | switchRatingsInt_2: 0 452 | switchRatingsInt_3: 0 453 | switchRatingsInt_4: 0 454 | switchRatingsInt_5: 0 455 | switchRatingsInt_6: 0 456 | switchRatingsInt_7: 0 457 | switchRatingsInt_8: 0 458 | switchRatingsInt_9: 0 459 | switchRatingsInt_10: 0 460 | switchRatingsInt_11: 0 461 | switchRatingsInt_12: 0 462 | switchLocalCommunicationIds_0: 463 | switchLocalCommunicationIds_1: 464 | switchLocalCommunicationIds_2: 465 | switchLocalCommunicationIds_3: 466 | switchLocalCommunicationIds_4: 467 | switchLocalCommunicationIds_5: 468 | switchLocalCommunicationIds_6: 469 | switchLocalCommunicationIds_7: 470 | switchParentalControl: 0 471 | switchAllowsScreenshot: 1 472 | switchAllowsVideoCapturing: 1 473 | switchAllowsRuntimeAddOnContentInstall: 0 474 | switchDataLossConfirmation: 0 475 | switchUserAccountLockEnabled: 0 476 | switchSystemResourceMemory: 16777216 477 | switchSupportedNpadStyles: 22 478 | switchNativeFsCacheSize: 32 479 | switchIsHoldTypeHorizontal: 0 480 | switchSupportedNpadCount: 8 481 | switchSocketConfigEnabled: 0 482 | switchTcpInitialSendBufferSize: 32 483 | switchTcpInitialReceiveBufferSize: 64 484 | switchTcpAutoSendBufferSizeMax: 256 485 | switchTcpAutoReceiveBufferSizeMax: 256 486 | switchUdpSendBufferSize: 9 487 | switchUdpReceiveBufferSize: 42 488 | switchSocketBufferEfficiency: 4 489 | switchSocketInitializeEnabled: 1 490 | switchNetworkInterfaceManagerInitializeEnabled: 1 491 | switchPlayerConnectionEnabled: 1 492 | ps4NPAgeRating: 12 493 | ps4NPTitleSecret: 494 | ps4NPTrophyPackPath: 495 | ps4ParentalLevel: 11 496 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 497 | ps4Category: 0 498 | ps4MasterVersion: 01.00 499 | ps4AppVersion: 01.00 500 | ps4AppType: 0 501 | ps4ParamSfxPath: 502 | ps4VideoOutPixelFormat: 0 503 | ps4VideoOutInitialWidth: 1920 504 | ps4VideoOutBaseModeInitialWidth: 1920 505 | ps4VideoOutReprojectionRate: 60 506 | ps4PronunciationXMLPath: 507 | ps4PronunciationSIGPath: 508 | ps4BackgroundImagePath: 509 | ps4StartupImagePath: 510 | ps4StartupImagesFolder: 511 | ps4IconImagesFolder: 512 | ps4SaveDataImagePath: 513 | ps4SdkOverride: 514 | ps4BGMPath: 515 | ps4ShareFilePath: 516 | ps4ShareOverlayImagePath: 517 | ps4PrivacyGuardImagePath: 518 | ps4ExtraSceSysFile: 519 | ps4NPtitleDatPath: 520 | ps4RemotePlayKeyAssignment: -1 521 | ps4RemotePlayKeyMappingDir: 522 | ps4PlayTogetherPlayerCount: 0 523 | ps4EnterButtonAssignment: 1 524 | ps4ApplicationParam1: 0 525 | ps4ApplicationParam2: 0 526 | ps4ApplicationParam3: 0 527 | ps4ApplicationParam4: 0 528 | ps4DownloadDataSize: 0 529 | ps4GarlicHeapSize: 2048 530 | ps4ProGarlicHeapSize: 2560 531 | playerPrefsMaxSize: 32768 532 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 533 | ps4pnSessions: 1 534 | ps4pnPresence: 1 535 | ps4pnFriends: 1 536 | ps4pnGameCustomData: 1 537 | playerPrefsSupport: 0 538 | enableApplicationExit: 0 539 | resetTempFolder: 1 540 | restrictedAudioUsageRights: 0 541 | ps4UseResolutionFallback: 0 542 | ps4ReprojectionSupport: 0 543 | ps4UseAudio3dBackend: 0 544 | ps4UseLowGarlicFragmentationMode: 1 545 | ps4SocialScreenEnabled: 0 546 | ps4ScriptOptimizationLevel: 0 547 | ps4Audio3dVirtualSpeakerCount: 14 548 | ps4attribCpuUsage: 0 549 | ps4PatchPkgPath: 550 | ps4PatchLatestPkgPath: 551 | ps4PatchChangeinfoPath: 552 | ps4PatchDayOne: 0 553 | ps4attribUserManagement: 0 554 | ps4attribMoveSupport: 0 555 | ps4attrib3DSupport: 0 556 | ps4attribShareSupport: 0 557 | ps4attribExclusiveVR: 0 558 | ps4disableAutoHideSplash: 0 559 | ps4videoRecordingFeaturesUsed: 0 560 | ps4contentSearchFeaturesUsed: 0 561 | ps4CompatibilityPS5: 0 562 | ps4GPU800MHz: 1 563 | ps4attribEyeToEyeDistanceSettingVR: 0 564 | ps4IncludedModules: [] 565 | ps4attribVROutputEnabled: 0 566 | monoEnv: 567 | splashScreenBackgroundSourceLandscape: {fileID: 0} 568 | splashScreenBackgroundSourcePortrait: {fileID: 0} 569 | blurSplashScreenBackground: 1 570 | spritePackerPolicy: 571 | webGLMemorySize: 16 572 | webGLExceptionSupport: 1 573 | webGLNameFilesAsHashes: 0 574 | webGLDataCaching: 1 575 | webGLDebugSymbols: 0 576 | webGLEmscriptenArgs: 577 | webGLModulesDirectory: 578 | webGLTemplate: APPLICATION:Default 579 | webGLAnalyzeBuildSize: 0 580 | webGLUseEmbeddedResources: 0 581 | webGLCompressionFormat: 1 582 | webGLLinkerTarget: 1 583 | webGLThreadsSupport: 0 584 | webGLWasmStreaming: 0 585 | scriptingDefineSymbols: {} 586 | platformArchitecture: {} 587 | scriptingBackend: {} 588 | il2cppCompilerConfiguration: {} 589 | managedStrippingLevel: {} 590 | incrementalIl2cppBuild: {} 591 | allowUnsafeCode: 0 592 | additionalIl2CppArgs: 593 | scriptingRuntimeVersion: 1 594 | gcIncremental: 0 595 | gcWBarrierValidation: 0 596 | apiCompatibilityLevelPerPlatform: {} 597 | m_RenderingPath: 1 598 | m_MobileRenderingPath: 1 599 | metroPackageName: Template_3D 600 | metroPackageVersion: 601 | metroCertificatePath: 602 | metroCertificatePassword: 603 | metroCertificateSubject: 604 | metroCertificateIssuer: 605 | metroCertificateNotAfter: 0000000000000000 606 | metroApplicationDescription: Template_3D 607 | wsaImages: {} 608 | metroTileShortName: 609 | metroTileShowName: 0 610 | metroMediumTileShowName: 0 611 | metroLargeTileShowName: 0 612 | metroWideTileShowName: 0 613 | metroSupportStreamingInstall: 0 614 | metroLastRequiredScene: 0 615 | metroDefaultTileSize: 1 616 | metroTileForegroundText: 2 617 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 618 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 619 | a: 1} 620 | metroSplashScreenUseBackgroundColor: 0 621 | platformCapabilities: {} 622 | metroTargetDeviceFamilies: {} 623 | metroFTAName: 624 | metroFTAFileTypes: [] 625 | metroProtocolName: 626 | XboxOneProductId: 627 | XboxOneUpdateKey: 628 | XboxOneSandboxId: 629 | XboxOneContentId: 630 | XboxOneTitleId: 631 | XboxOneSCId: 632 | XboxOneGameOsOverridePath: 633 | XboxOnePackagingOverridePath: 634 | XboxOneAppManifestOverridePath: 635 | XboxOneVersion: 1.0.0.0 636 | XboxOnePackageEncryption: 0 637 | XboxOnePackageUpdateGranularity: 2 638 | XboxOneDescription: 639 | XboxOneLanguage: 640 | - enus 641 | XboxOneCapability: [] 642 | XboxOneGameRating: {} 643 | XboxOneIsContentPackage: 0 644 | XboxOneEnableGPUVariability: 1 645 | XboxOneSockets: {} 646 | XboxOneSplashScreen: {fileID: 0} 647 | XboxOneAllowedProductIds: [] 648 | XboxOnePersistentLocalStorageSize: 0 649 | XboxOneXTitleMemory: 8 650 | XboxOneOverrideIdentityName: 651 | XboxOneOverrideIdentityPublisher: 652 | vrEditorSettings: 653 | daydream: 654 | daydreamIconForeground: {fileID: 0} 655 | daydreamIconBackground: {fileID: 0} 656 | cloudServicesEnabled: 657 | UNet: 1 658 | luminIcon: 659 | m_Name: 660 | m_ModelFolderPath: 661 | m_PortalFolderPath: 662 | luminCert: 663 | m_CertPath: 664 | m_SignPackage: 1 665 | luminIsChannelApp: 0 666 | luminVersion: 667 | m_VersionCode: 1 668 | m_VersionName: 669 | apiCompatibilityLevel: 6 670 | cloudProjectId: 671 | framebufferDepthMemorylessMode: 0 672 | projectName: 673 | organizationId: 674 | cloudEnabled: 0 675 | enableNativePlatformBackendsForNewInputSystem: 0 676 | disableOldInputManagerSupport: 0 677 | legacyClampBlendShapeWeights: 0 678 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.15f1c1 2 | m_EditorVersionWithRevision: 2019.4.15f1c1 (4a8a1bf8e113) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - ShuJunMap 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity.cn 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityBaiduMap 2 | Unity跨平台地图方案,支持PC,Android,iOS,支持添加模型,支持卫星图,街道图 3 | 目前国内支持Unity的地图只有腾讯地图,但是腾讯地图只有两个月的试用时间,而且相对百度地图,腾讯地图确实有点拉跨,无奈只能自己写地图了 4 | 5 | 地图原理基于墨卡托坐标,每个经纬度在Unity中都是固定的世界坐标,在地图中添加模型只需要将经纬度转成世界坐标,再把模型设置到位置即可, 6 | 地图有缓存机制,默认最大容量500MB,可以自行设置,项目刚刚写完,有BUG在所难免,发现BUG欢迎留言 7 | 8 | 详细介绍请看:https://blog.csdn.net/AcmHonor/article/details/112641313 9 | --------------------------------------------------------------------------------