54 lines
1.2 KiB
C#
54 lines
1.2 KiB
C#
#if UNITY_WEBGL && WEBGL_WX
|
|
using System.Collections.Generic;
|
|
using WeChatWASM;
|
|
|
|
namespace HC
|
|
{
|
|
public class HCWXAppInfo : HCIAppInfo
|
|
{
|
|
public string GetBundleID()
|
|
{
|
|
return WX.GetAccountInfoSync().miniProgram.appId;
|
|
}
|
|
|
|
public string GetVersion()
|
|
{
|
|
return WX.GetAccountInfoSync().miniProgram.version;
|
|
}
|
|
|
|
public string GetModel()
|
|
{
|
|
return WX.GetSystemInfoSync().model;
|
|
}
|
|
|
|
public string GetBrand()
|
|
{
|
|
return WX.GetSystemInfoSync().brand;
|
|
}
|
|
|
|
public string GetLanguage()
|
|
{
|
|
return WX.GetSystemInfoSync().language;
|
|
}
|
|
|
|
public string GetSystemName()
|
|
{
|
|
return WX.GetSystemInfoSync().system;
|
|
}
|
|
|
|
public Dictionary<string, object> GetBaseInfo()
|
|
{
|
|
var dictionary = new Dictionary<string, object>
|
|
{
|
|
["envVersion"] = WX.GetAccountInfoSync().miniProgram.envVersion
|
|
};
|
|
return dictionary;
|
|
}
|
|
|
|
public string GetPlatform()
|
|
{
|
|
return "wechat_" + WX.GetSystemInfoSync().platform.ToLower();
|
|
}
|
|
}
|
|
}
|
|
#endif |