单点登录不在进程内运行问题;gps取定位服务的;点击图标显示毫秒
This commit is contained in:
1 parent
42e23e2f84
commit
5ba176725f
19 files changed
+1738
-1392
No files matched your search
@@ -579,6 +579,22 @@ public class LoginController : BaseScene
|
||||
{
|
||||
if (!App.TextureCache.ContainsKey("rotateImage"))
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
StartCoroutine(Utils.StartLocation(async loc =>
|
||||
{
|
||||
App.latitude = loc.latitude;
|
||||
App.longitude = loc.longitude;
|
||||
var i = await ConfigHelper.thirdPartApi.GetMapImage(loc.latitude,loc.longitude);
|
||||
var t = new Texture2D(4, 4,TextureFormat.ASTC_RGB_4x4, false);
|
||||
if (t.LoadImage(Utils.StreamToBytes(i)))
|
||||
{
|
||||
Debug.Log("成功");
|
||||
App.TextureCache["rotateImage"] = t;
|
||||
Utils.WriteTextureToPlayerPrefs("rotateImage", t);
|
||||
}
|
||||
}));
|
||||
#else
|
||||
|
||||
var locationInfo = await ConfigHelper.thirdPartApi.GetLocationInfo();
|
||||
App.latitude = locationInfo.latitude;
|
||||
App.longitude = locationInfo.longitude;
|
||||
@@ -595,7 +611,7 @@ public class LoginController : BaseScene
|
||||
//}
|
||||
Debug.Log(JsonConvert.SerializeObject(locationInfo));
|
||||
var i = await ConfigHelper.thirdPartApi.GetMapImage(locationInfo);
|
||||
var t = new Texture2D(2, 2);
|
||||
var t = new Texture2D(4, 4,TextureFormat.DXT5, false);
|
||||
if (t.LoadImage(Utils.StreamToBytes(i)))
|
||||
{
|
||||
Debug.Log("成功");
|
||||
@@ -606,6 +622,7 @@ public class LoginController : BaseScene
|
||||
//Utils.DownloadImageToLocal(StartCoroutine,
|
||||
//$"https://api.mapbox.com/styles/v1/mapbox/dark-v10/static/{locationInfo.longitude},{locationInfo.latitude},12.14,0/1280x1280?access_token=pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA",
|
||||
//"rotateImage");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user