bilibilisdk移动到sdk_package
parent
604a781c63
commit
9c81bd3420
|
|
@ -0,0 +1,468 @@
|
|||
#if SDK_BILIBILI
|
||||
using UnityEngine;
|
||||
using LitJson;
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using UnityEngine.Android;
|
||||
using Assets.PhxhSDK.AOT.BI;
|
||||
|
||||
namespace PhxhSDK.AOT.Bilibili
|
||||
{
|
||||
public class GSCCallbackListerner : MonoBehaviour
|
||||
{
|
||||
public const int StatusCode_Success = 10010;
|
||||
|
||||
public const string CALLBACKTYPE_INIT = "init"; //初始化
|
||||
public const string CALLBACKTYPE_PAY = "pay"; //支付
|
||||
public const string CALLBACKTYPE_SDKTYPE = "sdkType"; //获取sdktype
|
||||
public const string CALLBACKTYPE_CHANNELID = "channelId"; //获取渠道id
|
||||
public const string CALLBACKTYPE_FINGERPRINT = "fingerprint"; //获取设备指纹
|
||||
public const string CALLBACKTYPE_ISLOGIN = "isLogin"; //获取是否登录
|
||||
public const string CALLBACKTYPE_LOGIN = "login"; //登录
|
||||
public const string CALLBACKTYPE_LOGOUT = "logout"; //登出
|
||||
public const string CALLBACKTYPE_GETUSERINFO = "getUserInfo"; //获取用户信息
|
||||
public const string CALLBACKTYPE_ACCOUNTPROTECT = "accountProtect"; //账号保护
|
||||
public const string CALLBACKTYPE_AGREEMENTWITHLICENCE = "agreementWithLicence"; //用户协议
|
||||
public const string CALLBACKTYPE_AGREEMENTWITHPRIVACY = "agreementWithPrivacy"; //隐私政策
|
||||
public const string CALLBACKTYPE_GEETESTVIEW = "geetestView"; //人机验证
|
||||
public const string CALLBACKTYPE_ACCOUNTINVALID = "AccountInvalid"; //账号异常
|
||||
public const string CALLBACKTYPE_ISREALNAMEAUTH = "isRealNameAuth"; //获取是否还没
|
||||
public const string CALLBACKTYPE_EXIT = "exit"; //退出
|
||||
public const string CALLBACKTYPE_QUIT = "quit"; //退出游戏杀死进程的那种
|
||||
|
||||
/// <summary>
|
||||
/// 登录回调
|
||||
/// </summary>
|
||||
private Action<string, string, string> loginAction;
|
||||
/// <summary>
|
||||
/// 登录失败回调
|
||||
/// </summary>
|
||||
private Action<int, string> loginFailAction;
|
||||
/// <summary>
|
||||
/// 支付回调
|
||||
/// </summary>
|
||||
private Action<string, string> payAction;
|
||||
|
||||
/// <summary>
|
||||
/// 注册登录回调
|
||||
/// </summary>
|
||||
public void RegistLoginCallback(Action<string, string, string> login, Action<int, string> failAction)
|
||||
{
|
||||
loginAction = login;
|
||||
loginFailAction = failAction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册支付回调
|
||||
/// </summary>
|
||||
/// <param name="pay"></param>
|
||||
public void RegistPayCallback(Action<string, string> pay)
|
||||
{
|
||||
payAction = pay;
|
||||
}
|
||||
|
||||
public void OnGSCSdkCallback(string jsonstr)
|
||||
{
|
||||
Debug.Log("OnGSCSdkCallback message: jsonstr=" + jsonstr);
|
||||
JsonData json = JsonMapper.ToObject(jsonstr);
|
||||
string callbackType = (string)json["callbackType"];
|
||||
int code = (int)json["code"];
|
||||
JsonData data = json["data"];
|
||||
switch (callbackType)
|
||||
{
|
||||
case CALLBACKTYPE_INIT:
|
||||
OnInitCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_PAY:
|
||||
OnPayCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_SDKTYPE:
|
||||
OnSdkTypeCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_CHANNELID:
|
||||
OnChannelIdCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_FINGERPRINT:
|
||||
OnFingerPrintCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_ISLOGIN:
|
||||
OnIsLoginCallback(code, data);
|
||||
break;
|
||||
case CALLBACKTYPE_ISREALNAMEAUTH:
|
||||
OnIsRealNameAuthCallback(code, data);
|
||||
break;
|
||||
case CALLBACKTYPE_LOGIN:
|
||||
OnLoginCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_LOGOUT:
|
||||
OnLogoutCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_GETUSERINFO:
|
||||
OnGetUserInfoCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_ACCOUNTPROTECT:
|
||||
OnAccountProtectCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_AGREEMENTWITHLICENCE:
|
||||
OnAgreementWithLicenceCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_AGREEMENTWITHPRIVACY:
|
||||
OnAgreementWithPrivacyCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_GEETESTVIEW:
|
||||
OnGeetestViewCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_ACCOUNTINVALID:
|
||||
OnAccountInvalidCallback(code, (string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_EXIT:
|
||||
OnExitCallback((string)data);
|
||||
break;
|
||||
case CALLBACKTYPE_QUIT:
|
||||
OnQuitCallback((string)data);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public virtual void OnInitCallback(int code, string data)
|
||||
{
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
Debug.Log($"初始化成功,code:{code},data:{data}");
|
||||
if (!Permission.HasUserAuthorizedPermission(Permission.ExternalStorageWrite))
|
||||
{
|
||||
Permission.RequestUserPermission(Permission.ExternalStorageWrite);
|
||||
}
|
||||
#if SDK_TALKINGDATA
|
||||
//用于TalkingData启动
|
||||
if (!BIToolinAOT.Instance.IsStart && Permission.HasUserAuthorizedPermission(Permission.ExternalStorageWrite))
|
||||
{
|
||||
BIToolinAOT.Instance.TalkingDataStart();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"初始化失败,code:{code},data:{data}");
|
||||
GSCSdkInterface.showToast($"OnInitCallbackError code: {code} message: {data}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 支付回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnPayCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnPayCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string out_trade_no = (string)json["out_trade_no"]; // CP商户订单号
|
||||
string bs_trade_no = (string)json["bs_trade_no"]; // 我方订单号
|
||||
Debug.Log("bili最终支付成功");
|
||||
payAction?.Invoke(out_trade_no, bs_trade_no);
|
||||
GSCSdkInterface.showToast("OnPayCallbackSuccess " + " out_trade_no: " + out_trade_no + " bs_out_trade_no: " + bs_trade_no);
|
||||
}
|
||||
else
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string message = (string)json["message"];
|
||||
string out_trade_no = (string)json["out_trade_no"];
|
||||
Debug.LogError("bili最终支付失败");
|
||||
GSCSdkInterface.showToast("OnPayCallbackError " + " code: " + code + "out_trade_no" + out_trade_no + " message: +" + message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取sdk_type回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnSdkTypeCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnSdkTypeCallback" + data);
|
||||
GSCSdkInterface.showToast("OnSdkTypeCallback " + " sdkType: " + data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取渠道id回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnChannelIdCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnChannelIdCallback" + data);
|
||||
GSCSdkInterface.showToast("OnChannelIdCallback " + " channelId: " + data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备指纹信息回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnFingerPrintCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnFingerPrintCallback" + data);
|
||||
GSCSdkInterface.showToast("OnFingerPrintCallback " + " fingerPrint: " + data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否登录回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnIsLoginCallback(int code, JsonData data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnIsLoginCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
bool isLogin = (bool)data;
|
||||
GSCSdkInterface.showToast("OnIsLoginCallbackSuccess " + " isLogin: " + isLogin);
|
||||
GSCSdkInterface.IsLogin = true;
|
||||
GSCSdkInterface.CheckLoging = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
string message = (string)data;
|
||||
GSCSdkInterface.IsLogin = false;
|
||||
GSCSdkInterface.CheckLoging = false;
|
||||
GSCSdkInterface.showToast($"OnIsLoginCallbackError code: {code} message: {message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否实名认证回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnIsRealNameAuthCallback(int code, JsonData data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnIsRealNameAuthCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
bool isRealName = (bool)data;
|
||||
GSCSdkInterface.showToast("OnIsRealNameAuthCallback " + " isRealName: " + isRealName);
|
||||
}
|
||||
else
|
||||
{
|
||||
string message = (string)data;
|
||||
GSCSdkInterface.showToast("OnIsRealNameAuthCallback " + " code: " + code + " message: +" + message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取登录回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnLoginCallback(int code, string data)
|
||||
{
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string username = (string)json["username"];
|
||||
string access_token = (string)json["access_token"];
|
||||
string uid = (string)json["uid"];
|
||||
loginAction?.Invoke(uid, username, access_token);
|
||||
Debug.Log($"登录成功,code:{code},data:{data}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"登录失败,code:{code},data:{data}");
|
||||
loginFailAction?.Invoke(code, data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取登出回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnLogoutCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnLogoutCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
GSCSdkInterface.IsLogin = false;
|
||||
GSCSdkInterface.showToast("OnLogoutCallbackSuccess " + " logout: " + data);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnLogoutCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnGetUserInfoCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnGetUserInfoCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string username = (string)json["username"];
|
||||
string lastLoginTime = (string)json["lastLoginTime"];
|
||||
string avatar = (string)json["avatar"];
|
||||
string s_avatar = (string)json["s_avatar"];
|
||||
GSCSdkInterface.showToast("OnGetUserInfoCallbackSuccess " + " username: " + username + " lastLoginTime: " + lastLoginTime
|
||||
+ " avatar: " + avatar + " s_avatar:" + s_avatar);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnGetUserInfoCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 账号保护回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnAccountProtectCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnAccountProtectCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string result = (string)json["result"];
|
||||
GSCSdkInterface.showToast("OnAccountProtectCallbackSuccess " + " result: " + result);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnAccountProtectCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户协议回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnAgreementWithLicenceCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnAgreementWithLicenceCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
GSCSdkInterface.showToast("OnAgreementWithLicenceCallbackSuccess " + " data: " + data);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnAgreementWithLicenceCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐私政策回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnAgreementWithPrivacyCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnAgreementWithPrivacyCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
GSCSdkInterface.showToast("OnAgreementWithPrivacyCallbackSuccess " + " data: " + data);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnAgreementWithPrivacyCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人机验证回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnGeetestViewCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnGeetestViewCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
JsonData json = JsonMapper.ToObject(data);
|
||||
string captcha_type = (string)json["captcha_type"];
|
||||
string image_token = (string)json["image_token"];
|
||||
string captcha_code = (string)json["captcha_code"];
|
||||
string challenge = (string)json["challenge"];
|
||||
string validate = (string)json["validate"];
|
||||
string seccode = (string)json["seccode"];
|
||||
string gt_user_id = (string)json["gt_user_id"];
|
||||
GSCSdkInterface.showToast("OnGeetestViewCallbackSuccess " + " captcha_type: " + captcha_type + " image_token: " + image_token + " captcha_code " + captcha_code + " challenge: " + challenge + " validate: " + validate + " seccode " + seccode + " gt_user_id " + gt_user_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSCSdkInterface.showToast("OnGeetestViewCallbackError " + " code: " + code + " message: +" + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 账号异常回调
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="data"></param>
|
||||
public void OnAccountInvalidCallback(int code, string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnAccountInvalidCallback" + data);
|
||||
if (code == StatusCode_Success)
|
||||
{
|
||||
//Demo.uid = 0;
|
||||
//TODO
|
||||
//游戏登出逻辑
|
||||
GSCSdkInterface.showToast("OnAccountInvalidCallbackSuccess " + data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退出回调
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public virtual void OnExitCallback(string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnExitCallback," + data);
|
||||
GSCSdkInterface.showToast(data);
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Application.Quit();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退出游戏回调(防沉迷,付费之类)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public void OnQuitCallback(string data)
|
||||
{
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Debug.Log("OnQuitCallback" + data);
|
||||
GSCSdkInterface.showToast("OnQuitCallback - message: +" + data);
|
||||
//下面的用于demo,请改成自己的代码
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,480 @@
|
|||
#if SDK_BILIBILI
|
||||
using UnityEngine;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PhxhSDK.AOT.Bilibili
|
||||
{
|
||||
/// <summary>
|
||||
/// 接收 SDK 的回调消息,进行处理。
|
||||
/// 该脚本应关联到每一个场景的 "Main Camera" 对象,以能接收SDK回调的消息。
|
||||
/// 下面各方法中的逻辑处理,在游戏中应修改为真实的逻辑。
|
||||
/// </summary>
|
||||
public class GSCSdkInterface : MonoBehaviour
|
||||
{
|
||||
#region SDK接入信息
|
||||
/// <summary>
|
||||
/// Debug商户唯一id
|
||||
/// </summary>
|
||||
private const string DEBUG_MERCHANT_ID = "3973";
|
||||
/// <summary>
|
||||
/// Release商户唯一id
|
||||
/// </summary>
|
||||
private const string RELEASE_MERCHANT_ID = "3973";
|
||||
/// <summary>
|
||||
/// Debug游戏id
|
||||
/// </summary>
|
||||
private const string DEBUG_APP_ID = "11295";
|
||||
/// <summary>
|
||||
/// Release游戏id
|
||||
/// </summary>
|
||||
private const string RELEASE_APP_ID = "11295";
|
||||
/// <summary>
|
||||
/// Debug服务器id
|
||||
/// </summary>
|
||||
private const string DEBUG_SERVER_ID = "10429";
|
||||
/// <summary>
|
||||
/// Release服务器id
|
||||
/// </summary>
|
||||
private const string RELEASE_SERVER_ID = "10429";
|
||||
/// <summary>
|
||||
/// Debug客户端密钥
|
||||
/// </summary>
|
||||
private const string DEBUG_APP_KEY = "93189717734e4383a6469a6b8aaea8c0";
|
||||
/// <summary>
|
||||
/// Release客户端密钥
|
||||
/// </summary>
|
||||
private const string RELEASE_APP_KEY = "93189717734e4383a6469a6b8aaea8c0";
|
||||
/// <summary>
|
||||
/// Debug服务器名
|
||||
/// </summary>
|
||||
private const string DEBUG_SERVER_NAME = "bilibili区";
|
||||
/// <summary>
|
||||
/// Release服务器名
|
||||
/// </summary>
|
||||
private const string RELEASE_SERVER_NAME = "bilibili区";
|
||||
|
||||
/// <summary>
|
||||
/// 商户唯一id
|
||||
/// </summary>
|
||||
public static string MerchantID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_MERCHANT_ID;
|
||||
#else
|
||||
return RELEASE_MERCHANT_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 游戏id
|
||||
/// </summary>
|
||||
public static string AppID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_APP_ID;
|
||||
#else
|
||||
return RELEASE_APP_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务器id
|
||||
/// </summary>
|
||||
public static string ServerID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_SERVER_ID;
|
||||
#else
|
||||
return RELEASE_SERVER_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 客户端密钥
|
||||
/// </summary>
|
||||
public static string AppKey
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_APP_KEY;
|
||||
#else
|
||||
return RELEASE_APP_KEY;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务器名
|
||||
/// </summary>
|
||||
public static string ServerName
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_SERVER_NAME;
|
||||
#else
|
||||
return RELEASE_SERVER_NAME;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 检查登录
|
||||
/// </summary>
|
||||
public static bool CheckLoging;
|
||||
/// <summary>
|
||||
/// 是否登录
|
||||
/// </summary>
|
||||
public static bool IsLogin;
|
||||
|
||||
#if UNITY_IOS
|
||||
//iOS unity调用iOS层方法
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __initIosSDK(string gameId, string cpId, string serverId, string appkey, string sandboxKey);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosLogin();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosLogout();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosUserInfo(string accesskey);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosIsRealnameAuth();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosGetSdkType();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosGetSdkChannel();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosGetSdkVersion();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosCreateRole(string roleid, string rolename);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosNotifyZone(string serverid, string servername, string roleid, string rolename);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosSetGameOpenUrl(string url);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosHeartbeatStart();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosHeartbeatStop();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosAgreementWithLicence();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosAgreementWithPrivacy();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosGeetest();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosAccountProtect();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosGetFreeUrl(string sourceUrl, string gameId, string appKey);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void __iosPay(string productId, string outTradeNo, string money, string productName, string productCount, string description, string extension, string orderSign, string notifyUrl);
|
||||
#endif
|
||||
|
||||
//android unity调用java层方法
|
||||
public static void callSdkApi(string apiName, params object[] args)
|
||||
{
|
||||
using AndroidJavaClass cls = new("com.phxh.nlddev.GSCSdkCenter");
|
||||
cls.CallStatic(apiName, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* android 支付接口
|
||||
* @param uid 用户的唯一标识(整型)
|
||||
* @param username 用户名或者email(唯一)
|
||||
* @param role 充值的角色信息
|
||||
* @param serverId 区服号
|
||||
* @param total_fee 充值金额
|
||||
* @param game_money 游戏币,需要用充值金额*充值比率
|
||||
* @param out_trade_no 充值订单号
|
||||
* @param subject 充值主题
|
||||
* @param body 充值描述
|
||||
* @param extension_info 附加信息,会在服务器异步回调中原样传回
|
||||
*/
|
||||
public static void androidPay(long uid, string username, string role,
|
||||
int total_fee, int game_money, string out_trade_no, string subject, string body, string extension_info, string notify_url, string order_sign)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
callSdkApi("pay", uid, username, role, ServerID, total_fee, game_money, out_trade_no, subject, body, extension_info, notify_url, order_sign);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* android获取设备指纹信息接口
|
||||
*/
|
||||
public static void androidFingerprint()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
callSdkApi("getFingerprint");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* android获取是否登录接口
|
||||
*/
|
||||
public static void androidCheckLogin()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
CheckLoging = true;
|
||||
callSdkApi("checkLogin");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* android退出接口
|
||||
*/
|
||||
public static void androidExit()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
callSdkApi("exit");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS支付接口
|
||||
*/
|
||||
public static void iOSPay(string product_id, string out_trade_no, int money, string subject, int game_money, string body, string extension_info, string order_sign, string notify_url)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosPay(product_id, out_trade_no, money, subject, game_money, body, extension_info, order_sign, notify_url);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS获取sdk的版本接口
|
||||
*/
|
||||
public static void iOSSdkVersion()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosGetSdkVersion();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
/// </summary>
|
||||
public static void init()
|
||||
{
|
||||
Debug.Log("init");
|
||||
#if UNITY_IOS
|
||||
__initIosSDK(MerchantID, AppID, ServerID, AppKey, "11");
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("init", MerchantID, AppID, ServerID, AppKey);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录接口
|
||||
*/
|
||||
public static void login()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosLogin();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("login");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知区服接口
|
||||
*/
|
||||
public static void notifyZone(string role_id, string role_name)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosNotifyZone(ServerID, ServerName, role_id, role_name);
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("notifyZone", ServerID, ServerName, role_id, role_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 创角接口
|
||||
*/
|
||||
public static void createRole(string role_name, string role_id)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosCreateRole(role_name, role_id);
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("createRole", role_id, role_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止心跳接口
|
||||
*/
|
||||
public static void stopHeartbeat()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosHeartbeatStop();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("stop");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始心跳接口
|
||||
*/
|
||||
public static void startHeartbeat()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosHeartbeatStart();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("start");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取sdk类型接口
|
||||
*/
|
||||
public static void getSdkType()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosGetSdkType();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("getSdkType");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取渠道号接口
|
||||
*/
|
||||
public static void getChannelId()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosGetSdkChannel();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("getChannelId");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否实名认证接口
|
||||
*/
|
||||
public static void isRealNameAuth()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosIsRealnameAuth();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("isRealNameAuth");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出接口
|
||||
*/
|
||||
public static void logout()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosLogout();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("logout");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息接口
|
||||
*/
|
||||
public static void getUserInfo(string accesskey)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosUserInfo(accesskey);
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("getUserInfo");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 账号保护接口
|
||||
*/
|
||||
public static void accountProtect()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosAccountProtect();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("accountProtect");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示用户协议界面接口
|
||||
*/
|
||||
public static void showAgreementWithLicence()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosAgreementWithLicence();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("showAgreementWithLicence");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示隐私政策界面接口
|
||||
*/
|
||||
public static void showAgreementWithPrivacy()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosAgreementWithPrivacy();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("showAgreementWithPrivacy");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示人机验证接口
|
||||
*/
|
||||
public static void showGeetestView()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
__iosGeetest();
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("showGeetestView");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
public static void showToast(string content)
|
||||
{
|
||||
return;
|
||||
|
||||
#if UNITY_IOS
|
||||
|
||||
|
||||
#elif UNITY_ANDROID
|
||||
callSdkApi("showToast", content);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
#if SDK_BILIBILI
|
||||
using PhxhSDK.AOT.Bilibili;
|
||||
using System;
|
||||
|
||||
namespace PhxhSDK
|
||||
{
|
||||
public partial class BilibiliSdkHelper : ILoginService
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录成功回调
|
||||
/// </summary>
|
||||
private Action loginSuccess;
|
||||
/// <summary>
|
||||
/// B站唯一id
|
||||
/// </summary>
|
||||
public string UID;
|
||||
public string AccessToken;
|
||||
/// <summary>
|
||||
/// B站用户名
|
||||
/// </summary>
|
||||
public string UserName;
|
||||
|
||||
public string GetProfileName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void LoginSuccess(string uid, string username, string accessToken)
|
||||
{
|
||||
UID = uid;
|
||||
UserName = username;
|
||||
AccessToken = accessToken;
|
||||
|
||||
loginSuccess?.Invoke();
|
||||
}
|
||||
|
||||
public void Login(Action<string, string, string> onLoginSuccess, Action<int, string> onLoginFail)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Login(Action onLoginSuccess, Action<int, string> onLoginFail)
|
||||
{
|
||||
loginSuccess = onLoginSuccess;
|
||||
|
||||
SdkHelper sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.Bilibili);
|
||||
BilibiliSdkHelper biliSdkHelper = sdkHelper as BilibiliSdkHelper;
|
||||
biliSdkHelper.BiliListerner.RegistLoginCallback(LoginSuccess, onLoginFail);
|
||||
GSCSdkInterface.login();
|
||||
}
|
||||
|
||||
public void Logout()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void QuickLogin(Action<string, string, string> onLoginSuccess, Action<int, string> onLoginFail)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetCurLoginParty(ThirdLoginSDK loginSDK)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void CheckLoginState(string id, Action<bool> onResultBack)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 07c4140744f402c40acc517a9dc2ca47
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#if SDK_BILIBILI
|
||||
using PhxhSDK.AOT.Bilibili;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PhxhSDK
|
||||
{
|
||||
public partial class BilibiliSdkHelper : IPayLimitService
|
||||
{
|
||||
public void CheckPayLimit(long amount, Action submit, Action limit)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SubmitPayResult(long amount)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 支付
|
||||
/// </summary>
|
||||
/// <param name="role">角色名</param>
|
||||
/// <param name="totalFee">真实价格(单位:分)</param>
|
||||
/// <param name="gameMoney">游戏币数量</param>
|
||||
/// <param name="goodName">商品名</param>
|
||||
/// <param name="orderNum">订单号</param>
|
||||
/// <param name="goodDescription">商品描述</param>
|
||||
public void Pay(string role, int totalFee, int gameMoney, string goodName,string orderNum, string goodDescription, string sign)
|
||||
{
|
||||
if (long.TryParse(UID, out long uid))
|
||||
{
|
||||
DebugUtil.Log("bilibili支付");
|
||||
GSCSdkInterface.androidPay(uid, UserName, role, totalFee, gameMoney, orderNum, goodName, goodDescription,
|
||||
"Test", "https://dev_openapi.kedrgame.com/api/v1/biliGame/notify", sign);
|
||||
}
|
||||
else
|
||||
Debug.LogError($"UID错误:{UID}");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 369e736ec84e3bf4ea7fb6b29f9c1bf7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
#if SDK_BILIBILI
|
||||
using UnityEngine;
|
||||
using PhxhSDK.AOT.Bilibili;
|
||||
|
||||
namespace PhxhSDK
|
||||
{
|
||||
public partial class BilibiliSdkHelper : SdkHelper
|
||||
{
|
||||
#region SDK接入信息
|
||||
/// <summary>
|
||||
/// Debug商户唯一id
|
||||
/// </summary>
|
||||
private const string DEBUG_MERCHANT_ID = "3973";
|
||||
/// <summary>
|
||||
/// Release商户唯一id
|
||||
/// </summary>
|
||||
private const string RELEASE_MERCHANT_ID = "3973";
|
||||
/// <summary>
|
||||
/// Debug游戏id
|
||||
/// </summary>
|
||||
private const string DEBUG_APP_ID = "11295";
|
||||
/// <summary>
|
||||
/// Release游戏id
|
||||
/// </summary>
|
||||
private const string RELEASE_APP_ID = "11295";
|
||||
/// <summary>
|
||||
/// Debug服务器id
|
||||
/// </summary>
|
||||
private const string DEBUG_SERVER_ID = "10429";
|
||||
/// <summary>
|
||||
/// Release服务器id
|
||||
/// </summary>
|
||||
private const string RELEASE_SERVER_ID = "10429";
|
||||
/// <summary>
|
||||
/// Debug客户端密钥
|
||||
/// </summary>
|
||||
private const string DEBUG_APP_KEY = "93189717734e4383a6469a6b8aaea8c0";
|
||||
/// <summary>
|
||||
/// Release客户端密钥
|
||||
/// </summary>
|
||||
private const string RELEASE_APP_KEY = "93189717734e4383a6469a6b8aaea8c0";
|
||||
/// <summary>
|
||||
/// Debug服务器名
|
||||
/// </summary>
|
||||
private const string DEBUG_SERVER_NAME = "bilibili区";
|
||||
/// <summary>
|
||||
/// Release服务器名
|
||||
/// </summary>
|
||||
private const string RELEASE_SERVER_NAME = "bilibili区";
|
||||
|
||||
/// <summary>
|
||||
/// 商户唯一id
|
||||
/// </summary>
|
||||
public string MerchantID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_MERCHANT_ID;
|
||||
#else
|
||||
return RELEASE_MERCHANT_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 游戏id
|
||||
/// </summary>
|
||||
public string AppID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_APP_ID;
|
||||
#else
|
||||
return RELEASE_APP_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务器id
|
||||
/// </summary>
|
||||
public string ServerID
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_SERVER_ID;
|
||||
#else
|
||||
return RELEASE_SERVER_ID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 客户端密钥
|
||||
/// </summary>
|
||||
public string AppKey
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_APP_KEY;
|
||||
#else
|
||||
return RELEASE_APP_KEY;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 服务器名
|
||||
/// </summary>
|
||||
public string ServerName
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEVELOPMENT_BUILD || DEBUG
|
||||
return DEBUG_SERVER_NAME;
|
||||
#else
|
||||
return RELEASE_SERVER_NAME;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public string RoleName;
|
||||
|
||||
/// <summary>
|
||||
/// bilibili回调监听组件
|
||||
/// </summary>
|
||||
public GSCCallbackListerner BiliListerner { get; private set; }
|
||||
|
||||
public override void AfterLoginInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void EarlyInit()
|
||||
{
|
||||
GameObject goBilibili = GameObject.Find("BiliBiliSDK");
|
||||
if(null != goBilibili)
|
||||
BiliListerner = goBilibili.GetComponent<GSCCallbackListerner>();
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Release()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6a4de382beec9b044a3ff8c6f5d9a662
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.unity3d.player"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.percom.gsc.unityasdemomission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="oplus.permission.settings.LAUNCH_FOR_EXPORT" />
|
||||
<uses-permission android:name="freemme.permission.msa" />
|
||||
<uses-permission android:name="com.asus.msa.SupplementaryDID.ACCESS" />
|
||||
<uses-permission android:name="freemme.permission.msa.SECURITY_ACCESS" />
|
||||
<uses-permission android:name="com.vivo.identifier.permission.OAID_STATE_DIALOG" />
|
||||
|
||||
<application
|
||||
tools:replace="android:allowBackup,android:usesCleartextTraffic"
|
||||
android:allowBackup="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:supportsRtl="true"
|
||||
android:name="com.phxh.nlddev.App">
|
||||
<activity
|
||||
android:name="com.phxh.nlddev.GSCDemoPlayerActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="unityplayer.UnityActivity"
|
||||
android:value="true" /> <!-- 加上这个,Unity中需要 -->
|
||||
<!-- Unity打包屏蔽权限弹窗 -->
|
||||
<meta-data android:name="unityplayer.SkipPermissionsDialog"
|
||||
android:value="true"/>
|
||||
</activity>
|
||||
|
||||
<!--是否为付费下载游戏,付费下载游戏填true,免费下载游戏填false-->
|
||||
<!--付费下载游戏指的是用户只有先购买才能下载,与游戏内购是有区别的-->
|
||||
<meta-data
|
||||
android:name="BSGameSdk_PaidGame"
|
||||
android:value="false" />
|
||||
<!--微信支付需要-->
|
||||
<activity
|
||||
android:name="com.phxh.nlddev.bilibili.wxapi.WXPayEntryActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:exported="true"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:launchMode="singleTop" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 69c64bbba704718489680a54e8ab45a4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d13a1268f88343a40b610d9a9bb9627c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.unity3d.player"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.percom.gsc.unityasdemomission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="oplus.permission.settings.LAUNCH_FOR_EXPORT" />
|
||||
<uses-permission android:name="freemme.permission.msa" />
|
||||
<uses-permission android:name="com.asus.msa.SupplementaryDID.ACCESS" />
|
||||
<uses-permission android:name="freemme.permission.msa.SECURITY_ACCESS" />
|
||||
<uses-permission android:name="com.vivo.identifier.permission.OAID_STATE_DIALOG" />
|
||||
|
||||
<application
|
||||
tools:replace="android:allowBackup,android:usesCleartextTraffic"
|
||||
android:allowBackup="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:supportsRtl="true"
|
||||
android:name="com.phxh.nlddev.App">
|
||||
<activity
|
||||
android:name="com.phxh.nlddev.GSCDemoPlayerActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="unityplayer.UnityActivity"
|
||||
android:value="true" /> <!-- 加上这个,Unity中需要 -->
|
||||
<!--Unity打包屏蔽权限弹窗-->
|
||||
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
|
||||
</activity>
|
||||
|
||||
<!--是否为付费下载游戏,付费下载游戏填true,免费下载游戏填false-->
|
||||
<!--付费下载游戏指的是用户只有先购买才能下载,与游戏内购是有区别的-->
|
||||
<meta-data
|
||||
android:name="BSGameSdk_PaidGame"
|
||||
android:value="false" />
|
||||
<!--微信支付需要-->
|
||||
<activity
|
||||
android:name="com.phxh.nlddev.bilibili.wxapi.WXPayEntryActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:exported="true"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:launchMode="singleTop" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 78a2683f8c641e54381577c166f5b5c3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3478e2eec98fbec43a917a2bfe440a85
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27881eeae4a260b45a213b2a70bb5d6b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dc3c370cd2b32374a96b0f3f5d594f05
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b079c773caa9ab7469b949b3a545a99c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ebe7d57c9b0e7cc46a3396fd605968dc
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1ac4248ea989af14e96ee79c423cdabe
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1 @@
|
|||
1.0.0
|
||||
Loading…
Reference in New Issue