本演示项目在Unity for Android Build中启用部分华为HMS和AGC服务,对应的类和函数的名称和用法相同。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
1023 B

using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class Location_Data : IHmsBaseClass{
public string name => "android.location.Location";
}
public class Location :HmsClass<Location_Data>
{
public const int FORMAT_DEGREES = 0;
public const int FORMAT_MINUTES = 1;
public const int FORMAT_SECONDS = 2;
public Location (string arg0): base(arg0) { }
public Location (Location arg0): base(arg0) { }
public Location (): base() { }
public double getLongitude() {
return Call<double>("getLongitude");
}
public double getLatitude() {
return Call<double>("getLatitude");
}
public float getAccuracy() {
return Call<float>("getAccuracy");
}
public void setLatitude(double arg0) {
Call("setLatitude", arg0);
}
public void setLongitude(double arg0) {
Call("setLongitude", arg0);
}
}
}