meng.yan
4 年前
当前提交
7f43cfca
共有 29 个文件被更改,包括 3347 次插入 和 212 次删除
-
41.DS_Store
-
1.gitignore
-
24Assets/HuaweiService/apm/APMS.cs
-
148Assets/HuaweiService/apm/AddCustomTrace.cs
-
154Assets/HuaweiService/apm/Editor/TraceInjectPostProecess.cs
-
44Assets/HuaweiService/apm/NetworkMeasure.cs
-
2Assets/Plugins/Android/baseProjectTemplate.gradle
-
7Assets/Plugins/Android/launcherTemplate.gradle
-
7Assets/Plugins/Android/mainTemplate.gradle
-
880Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
-
1001Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
-
1001Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
-
1Assets/HuaweiService/.DS_Store
-
1Assets/HuaweiService/apm/.DS_Store
-
1Assets/HuaweiService/apm/Editor/.DS_Store
-
39Assets/HuaweiService/apm/GameAPM.cs
-
43Assets/HuaweiService/apm/GameAttribute.cs
-
1Assets/HuaweiService/app_linking/.DS_Store
-
2Assets/HuaweiServiceDemo/Scripts/test/.DS_Store
-
27Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs
-
70Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs
-
24Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTestButton.cs
-
24Assets/HuaweiServiceDemo/Scripts/test/apm/StopLoadingSceneButton.cs
-
8Assets/HuaweiService/apm.meta
-
8Assets/HuaweiServiceDemo/Scripts/test/apm.meta
-
0/Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
-
0/Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
-
0/Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
41
.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using UnityEngine; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace HuaweiService.apm |
|||
{ |
|||
public class NetworkMeasure_Data : IHmsBaseClass{ |
|||
public string name => "com.huawei.agconnect.apms.custom.NetworkMeasure"; |
|||
} |
|||
public class NetworkMeasure :HmsClass<NetworkMeasure_Data> |
|||
{ |
|||
public NetworkMeasure (string arg0, string arg1): base(arg0, arg1) { } |
|||
public NetworkMeasure (): base() { } |
|||
public void start() { |
|||
Call("start"); |
|||
} |
|||
public void stop() { |
|||
Call("stop"); |
|||
} |
|||
public void setStatusCode(int arg0) { |
|||
Call("setStatusCode", arg0); |
|||
} |
|||
public void setBytesSent(long arg0) { |
|||
Call("setBytesSent", arg0); |
|||
} |
|||
public void setBytesReceived(long arg0) { |
|||
Call("setBytesReceived", arg0); |
|||
} |
|||
public void setContentType(string arg0) { |
|||
Call("setContentType", arg0); |
|||
} |
|||
public void putProperty(string arg0, string arg1) { |
|||
Call("putProperty", arg0, arg1); |
|||
} |
|||
public void removeProperty(string arg0) { |
|||
Call("removeProperty", arg0); |
|||
} |
|||
public Map getProperties() { |
|||
return Call<Map>("getProperties"); |
|||
} |
|||
public string getProperty(string arg0) { |
|||
return Call<string>("getProperty", arg0); |
|||
} |
|||
} |
|||
} |
880
Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1
Assets/HuaweiService/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1
Assets/HuaweiService/apm/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1
Assets/HuaweiService/apm/Editor/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using UnityEngine; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace HuaweiService.apm |
|||
{ |
|||
public class GameAPM_Data : IHmsBaseClass{ |
|||
public string name => "com.huawei.agconnect.apms.game.GameAPM"; |
|||
} |
|||
public class GameAPM :HmsClass<GameAPM_Data> |
|||
{ |
|||
public GameAPM (): base() { } |
|||
public static GameAPM getInstance() { |
|||
return CallStatic<GameAPM>("getInstance"); |
|||
} |
|||
public void start() { |
|||
Call("start"); |
|||
} |
|||
public void stop() { |
|||
Call("stop"); |
|||
} |
|||
public string startLoadingScene(GameAttribute arg0) { |
|||
return Call<string>("startLoadingScene", arg0); |
|||
} |
|||
public void stopLoadingScene(string arg0) { |
|||
Call("stopLoadingScene", arg0); |
|||
} |
|||
public void setCurrentGameAttribute(GameAttribute arg0) { |
|||
Call("setCurrentGameAttribute", arg0); |
|||
} |
|||
public void setReportRate(int arg0) { |
|||
Call("setReportRate", arg0); |
|||
} |
|||
public void enableGamePlugin(bool arg0) { |
|||
Call("enableGamePlugin", arg0); |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace HuaweiService.apm |
|||
{ |
|||
public class GameAttribute_Data : IHmsBaseClass{ |
|||
public string name => "com.huawei.agconnect.apms.game.GameAttribute"; |
|||
} |
|||
public class GameAttribute :HmsClass<GameAttribute_Data> |
|||
{ |
|||
public GameAttribute(string arg0, LoadingState arg1) : base(arg0, arg1) |
|||
{ |
|||
this.obj = this.obj; |
|||
|
|||
} |
|||
public GameAttribute() : base() |
|||
{ |
|||
this.obj = this.obj; |
|||
} |
|||
public LoadingState getLoadingState() { |
|||
return Call<LoadingState>("getLoadingState"); |
|||
} |
|||
public void setLoadingState(LoadingState arg0) { |
|||
Call("setLoadingState", arg0); |
|||
} |
|||
public string getScene() { |
|||
return Call<string>("getScene"); |
|||
} |
|||
|
|||
public class LoadingState_Data : IHmsBaseClass{ |
|||
public string name => "com.huawei.agconnect.apms.game.GameAttribute$LoadingState"; |
|||
} |
|||
public class LoadingState :HmsClass<LoadingState_Data> |
|||
{ |
|||
public static LoadingState NOT_LOADING => HmsUtil.GetStaticValue<LoadingState>("NOT_LOADING"); |
|||
|
|||
public static LoadingState LOADING => HmsUtil.GetStaticValue<LoadingState>("LOADING"); |
|||
|
|||
public LoadingState (string arg0, int arg1, int arg2): base(arg0, arg1, arg2) { } |
|||
public LoadingState (): base() { } |
|||
} |
|||
} |
|||
} |
1
Assets/HuaweiService/app_linking/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
2
Assets/HuaweiServiceDemo/Scripts/test/.DS_Store
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
|
|||
namespace ApmTest |
|||
{ |
|||
public class EnableGamePluginButton : MonoBehaviour |
|||
{ |
|||
// Start is called before the first frame update
|
|||
public Button m_button; |
|||
private GameApmTest m_test; |
|||
private bool m_gamePluginStatus; |
|||
|
|||
void Start() |
|||
{ |
|||
m_gamePluginStatus = false; |
|||
m_test = new GameApmTest(); |
|||
Button btn = m_button.GetComponent<Button>(); |
|||
btn.onClick.AddListener(this.switchStatus); |
|||
} |
|||
|
|||
void switchStatus() |
|||
{ |
|||
m_test.switchGamePluginStatus(m_gamePluginStatus); |
|||
m_gamePluginStatus = !m_gamePluginStatus; |
|||
} |
|||
} |
|||
} |
|
|||
using System.IO; |
|||
using System.Threading; |
|||
using UnityEngine; |
|||
using HuaweiService.apm; |
|||
using HuaweiService; |
|||
using UnityEngine.UI; |
|||
|
|||
namespace ApmTest |
|||
{ |
|||
public class GameApmTest |
|||
{ |
|||
private static string sceneHandler = ""; |
|||
static int gameApmTest_count = 0; |
|||
private static int stopLoadingSceneTest_count = 0; |
|||
public void gameApmTest(Text text) |
|||
{ |
|||
gameApmTest_count++; |
|||
text.text = "gameApmTest start, count: " + gameApmTest_count + "\n"; |
|||
|
|||
GameAttribute attribute = new GameAttribute("new scene", GameAttribute.LoadingState.NOT_LOADING); |
|||
text.text += "create new attribute success\n"; |
|||
|
|||
APMS.getInstance().startGamePlugin(); |
|||
text.text +="GameAPM start\n"; |
|||
|
|||
APMS.getInstance().enableGamePlugin(true); |
|||
text.text +="enableGamePlugin: true\n"; |
|||
|
|||
sceneHandler = APMS.getInstance().startLoadingScene(attribute); |
|||
text.text +="startLoadingScene, sceneHandler= " + sceneHandler + "\n"; |
|||
|
|||
APMS.getInstance().setCurrentGameAttribute(attribute); |
|||
text.text +="setCurrentGameAttribute\n"; |
|||
|
|||
APMS.getInstance().setReportRate(1); |
|||
text.text += "setReportRate\n"; |
|||
|
|||
text.text += "gameApmTest success\n\n"; |
|||
} |
|||
|
|||
public void stopLoadingScene(Text text) |
|||
{ |
|||
stopLoadingSceneTest_count++; |
|||
text.text = "stopLoadingSceneTest start, count: " + stopLoadingSceneTest_count + "\n"; |
|||
|
|||
APMS.getInstance().stopLoadingScene(sceneHandler); |
|||
text.text +="stopLoadingScene\n"; |
|||
|
|||
APMS.getInstance().stopGamePlugin(); |
|||
text.text +="GameAPM stop\n"; |
|||
|
|||
text.text += "stopLoadingSceneTest success\n"; |
|||
} |
|||
|
|||
public void switchGamePluginStatus(bool status) |
|||
{ |
|||
if (status == false) |
|||
{ |
|||
Debug.Log("switch enableCollection status from false -> true"); |
|||
APMS.getInstance().enableGamePlugin(true); |
|||
} |
|||
else if (status == true) |
|||
{ |
|||
Debug.Log("switch enableCollection status from true -> false"); |
|||
APMS.getInstance().enableGamePlugin(false); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
|
|||
namespace ApmTest |
|||
{ |
|||
public class GameApmTestButton : MonoBehaviour |
|||
{ |
|||
// Start is called before the first frame update
|
|||
public Button m_button; |
|||
|
|||
void Start() |
|||
{ |
|||
Button btn = m_button.GetComponent<Button>(); |
|||
btn.onClick.AddListener(this.gameApmTest); |
|||
} |
|||
|
|||
void gameApmTest() |
|||
{ |
|||
GameApmTest test = new GameApmTest(); |
|||
Text text = this.GetComponentInChildren<Text>(); |
|||
test.gameApmTest(text); |
|||
} |
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
|
|||
namespace ApmTest |
|||
{ |
|||
public class StopLoadingSceneButton : MonoBehaviour |
|||
{ |
|||
// Start is called before the first frame update
|
|||
public Button m_button; |
|||
|
|||
void Start() |
|||
{ |
|||
Button btn = m_button.GetComponent<Button>(); |
|||
btn.onClick.AddListener(this.stopLoadingScene); |
|||
} |
|||
|
|||
void stopLoadingScene() |
|||
{ |
|||
GameApmTest test = new GameApmTest(); |
|||
Text text = this.GetComponentInChildren<Text>(); |
|||
test.stopLoadingScene(text); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ed0048e9ddfc0420e99d42298a7beba2 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7a58a1d7ae6354573b066eb9f7d85940 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue