浏览代码

udpate apm

/main
siyao 3 年前
当前提交
30ae4f32
共有 37 个文件被更改,包括 4110 次插入235 次删除
  1. 24
      Assets/HuaweiService/apm/APMS.cs
  2. 148
      Assets/HuaweiService/apm/AddCustomTrace.cs
  3. 154
      Assets/HuaweiService/apm/Editor/TraceInjectPostProecess.cs
  4. 44
      Assets/HuaweiService/apm/NetworkMeasure.cs
  5. 82
      Assets/HuaweiServiceDemo/Scenes/HmsGameServiceDemo.unity
  6. 657
      Assets/HuaweiServiceDemo/Scenes/HmsPerformanceSampleTest.unity
  7. 4
      Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/Button/RequestPermissionButton.cs
  8. 3
      Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/TestCases/StreamDownloadTest.cs
  9. 20
      Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/TestCases/UploadTaskTest.cs
  10. 2
      Assets/Plugins/Android/baseProjectTemplate.gradle
  11. 7
      Assets/Plugins/Android/launcherTemplate.gradle
  12. 7
      Assets/Plugins/Android/mainTemplate.gradle
  13. 880
      Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
  14. 6
      Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll.meta
  15. 1001
      Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
  16. 6
      Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll.meta
  17. 1001
      Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
  18. 6
      Assets/HuaweiService/apm/Editor/Unity.Cecil.dll.meta
  19. 39
      Assets/HuaweiService/apm/GameAPM.cs
  20. 11
      Assets/HuaweiService/apm/GameAPM.cs.meta
  21. 43
      Assets/HuaweiService/apm/GameAttribute.cs
  22. 11
      Assets/HuaweiService/apm/GameAttribute.cs.meta
  23. 27
      Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs
  24. 11
      Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs.meta
  25. 70
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs
  26. 11
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs.meta
  27. 24
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTestButton.cs
  28. 11
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTestButton.cs.meta
  29. 24
      Assets/HuaweiServiceDemo/Scripts/test/apm/StopLoadingSceneButton.cs
  30. 11
      Assets/HuaweiServiceDemo/Scripts/test/apm/StopLoadingSceneButton.cs.meta
  31. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
  32. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll.meta
  33. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
  34. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll.meta
  35. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
  36. 0
      /Assets/HuaweiService/apm/Editor/Unity.Cecil.dll.meta

24
Assets/HuaweiService/apm/APMS.cs


public NetworkMeasure createNetworkMeasure(string arg0, string arg1) {
return Call<NetworkMeasure>("createNetworkMeasure", arg0, arg1);
}
public void startGamePlugin() {
GameAPM.getInstance().start();
}
public void stopGamePlugin() {
GameAPM.getInstance().stop();
}
public string startLoadingScene(GameAttribute arg0)
{
return GameAPM.getInstance().startLoadingScene(arg0);
}
public void stopLoadingScene(string arg0)
{
GameAPM.getInstance().stopLoadingScene(arg0);
}
public void setCurrentGameAttribute(GameAttribute arg0) {
GameAPM.getInstance().setCurrentGameAttribute(arg0);
}
public void setReportRate(int arg0) {
GameAPM.getInstance().setReportRate(arg0);
}
public void enableGamePlugin(bool arg0) {
GameAPM.getInstance().enableGamePlugin(arg0);
}
}
}

148
Assets/HuaweiService/apm/AddCustomTrace.cs


using UnityEngine;
using System.Reflection;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using HuaweiService.apm;
namespace HuaweiService
{

set{
m_enable = value;
}
}
}
public class TraceInjector
{
public static void Inject(string assemblyPath)
{
//Debug.Log("inject custom trace Start");
// 按路径读取程序集, 如果文件不存在则返回错误信息
if(!System.IO.File.Exists(assemblyPath)){
Debug.LogError(string.Format("{0} is not Exists",
assemblyPath));
}
var readerParameters = new ReaderParameters { ReadSymbols = true };
var assembly = AssemblyDefinition.ReadAssembly(assemblyPath, readerParameters);
if (assembly == null)
{
Debug.LogError(string.Format("InjectTool Inject Load assembly failed: {0}",
assemblyPath));
return;
}
try
{
var module = assembly.MainModule;
foreach (var type in module.Types)
{
foreach (var method in type.Methods)
{
// 找到method中需要注入的类型
var needInjectAttr = typeof(AddCustomTrace).FullName;
bool needInject = method.CustomAttributes.Any(typeAttribute => typeAttribute.AttributeType.FullName == needInjectAttr);
if (!needInject)
{
continue;
}
// 只对公有方法进行注入
if (method.IsConstructor || method.IsGetter || method.IsSetter || !method.IsPublic)
continue;
Inject(module, method, type);
}
}
assembly.Write(assemblyPath, new WriterParameters { WriteSymbols = true });
}
catch (System.Exception ex)
{
Debug.LogError(string.Format("InjectTool Inject failed: {0}", ex));
throw;
}
finally
{
if (assembly.MainModule.SymbolReader != null)
{
assembly.MainModule.SymbolReader.Dispose();
}
}
}
private static void Inject(ModuleDefinition module, MethodDefinition method, TypeDefinition type)
{
if(module == null){
throw new ArgumentNullException("input argument invalid, module is null");
}
if(method == null){
throw new ArgumentNullException("input argument invalid, method is null");
}
if(type == null){
throw new ArgumentNullException("input argument invalid, type is null");
}
//获取方法AddCustomTrace
AddCustomTrace attr = getTraceAttribute(type, method);
//判断功能是否开启
if(attr.enable != true){
//Debug.Log(method.Name + " close add custom trace attribute.");
return;
}
//获取特性名称
String name = attr.name;
//更改待注入函数局部变量表
method.Body.InitLocals = true;
var customTraceType = module.ImportReference(typeof(CustomTrace));
var customTraceTypeDef = new VariableDefinition(customTraceType);
method.Body.Variables.Add(customTraceTypeDef);
//准备注入的函数
MethodReference getInstance = module.ImportReference(typeof(APMS).GetMethod("getInstance"));
MethodReference createInstance = module.ImportReference(typeof(APMS).GetMethod("createCustomTrace", new Type[] {typeof(string)}));
MethodReference customTraceStart = module.ImportReference(typeof(CustomTrace).GetMethod("start"));
MethodReference customTraceEnd = module.ImportReference(typeof(CustomTrace).GetMethod("stop"));
//设置一些标签用于语句跳转
Instruction first = method.Body.Instructions[0];
// 开始注入IL代码
var ilProcessor = method.Body.GetILProcessor();
ilProcessor.InsertBefore(first, ilProcessor.Create(OpCodes.Nop));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Call, getInstance));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Ldstr, name));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Callvirt, createInstance));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Stloc, customTraceTypeDef));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Ldloc, customTraceTypeDef));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Callvirt, customTraceStart));
ilProcessor.InsertBefore(first, ilProcessor.Create(OpCodes.Nop));
//在每一个返回的地方插入stop函数,注意插入指令之后,method.Body.Instructions.Count会增加,需要调整i值
for(int i=0;i<method.Body.Instructions.Count;i++){
Instruction ins = method.Body.Instructions[i];
OpCode code = ins.OpCode;
if(ins.OpCode.Equals(OpCodes.Ret) || ins.OpCode.Equals(OpCodes.Throw)){
//Debug.Log("method: " + method.Name + "i: " + i + " code: " + code);
ilProcessor.InsertBefore(ins, ilProcessor.Create(OpCodes.Nop));
ilProcessor.InsertBefore(ins, Instruction.Create(OpCodes.Ldloc, customTraceTypeDef));
ilProcessor.InsertBefore(ins, Instruction.Create(OpCodes.Callvirt, customTraceEnd));
ilProcessor.InsertBefore(ins, ilProcessor.Create(OpCodes.Nop));
i+=4;
}
}
}
//获取函数的特性
private static AddCustomTrace getTraceAttribute(TypeDefinition type, MethodDefinition method){
Type inejectClassType = Type.GetType(type.FullName);
if(inejectClassType == null){
throw new NullReferenceException("Class Type is null, Attribute: " + type.FullName);
}
MethodInfo methodinfo = inejectClassType.GetMethod(method.Name);
if(methodinfo == null){
throw new NullReferenceException("methodinfo in class " + type.FullName + " is null, method name: " + method.Name);
}
AddCustomTrace attr = (AddCustomTrace)methodinfo.GetCustomAttributes(typeof(AddCustomTrace), true)[0] ;
if(attr == null){
throw new NullReferenceException("attr AddCustomTrace on method "+ method.Name + " is null");
}
return attr;
}
}
}

154
Assets/HuaweiService/apm/Editor/TraceInjectPostProecess.cs


using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
using System.Reflection;
using System;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using HuaweiService.apm;
namespace HuaweiService{
[InitializeOnLoad]
public class TraceInjectPostProecess{

TraceInjector.Inject(arg1);
}
}
}
public class TraceInjector
{
public static void Inject(string assemblyPath)
{
//Debug.Log("inject custom trace Start");
//Read the assembly according to the path, if the file does not exist, return an error message
if(!System.IO.File.Exists(assemblyPath)){
Debug.LogError(string.Format("{0} is not Exists",
assemblyPath));
}
var readerParameters = new ReaderParameters { ReadSymbols = true };
var assembly = AssemblyDefinition.ReadAssembly(assemblyPath, readerParameters);
if (assembly == null)
{
Debug.LogError(string.Format("InjectTool Inject Load assembly failed: {0}",
assemblyPath));
return;
}
try
{
var module = assembly.MainModule;
foreach (var type in module.Types)
{
foreach (var method in type.Methods)
{
//Find the type that needs to be injected in the method
var needInjectAttr = typeof(AddCustomTrace).FullName;
bool needInject = method.CustomAttributes.Any(typeAttribute => typeAttribute.AttributeType.FullName == needInjectAttr);
if (!needInject)
{
continue;
}
//Only public methods need to be injected
if (method.IsConstructor || method.IsGetter || method.IsSetter || !method.IsPublic)
continue;
Inject(module, method, type, assembly);
}
}
assembly.Write(assemblyPath, new WriterParameters { WriteSymbols = true });
}
catch (System.Exception ex)
{
Debug.LogError(string.Format("InjectTool Inject failed: {0}", ex));
throw;
}
finally
{
if (assembly.MainModule.SymbolReader != null)
{
assembly.MainModule.SymbolReader.Dispose();
}
}
}
private static void Inject(ModuleDefinition module, MethodDefinition method, TypeDefinition type, AssemblyDefinition assembly)
{
if(module == null){
throw new ArgumentNullException("input argument invalid, module is null");
}
if(method == null){
throw new ArgumentNullException("input argument invalid, method is null");
}
if(type == null){
throw new ArgumentNullException("input argument invalid, type is null");
}
//get AddCustomTrace attribute in method
AddCustomTrace attr = getTraceAttribute(type, method, assembly);
//whether the function is turned on
if(attr.enable != true){
return;
}
//get name of attribute
String name = attr.name;
//Change the local variable table of the function to be injected
method.Body.InitLocals = true;
var customTraceType = module.ImportReference(typeof(CustomTrace));
var customTraceTypeDef = new VariableDefinition(customTraceType);
method.Body.Variables.Add(customTraceTypeDef);
//Prepare functions to be injected
MethodReference getInstance = module.ImportReference(typeof(APMS).GetMethod("getInstance"));
MethodReference createInstance = module.ImportReference(typeof(APMS).GetMethod("createCustomTrace", new Type[] {typeof(string)}));
MethodReference customTraceStart = module.ImportReference(typeof(CustomTrace).GetMethod("start"));
MethodReference customTraceEnd = module.ImportReference(typeof(CustomTrace).GetMethod("stop"));
//Set some labels for statement jump
Instruction first = method.Body.Instructions[0];
// start injecting IL code
var ilProcessor = method.Body.GetILProcessor();
ilProcessor.InsertBefore(first, ilProcessor.Create(OpCodes.Nop));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Call, getInstance));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Ldstr, name));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Callvirt, createInstance));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Stloc, customTraceTypeDef));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Ldloc, customTraceTypeDef));
ilProcessor.InsertBefore(first, Instruction.Create(OpCodes.Callvirt, customTraceStart));
ilProcessor.InsertBefore(first, ilProcessor.Create(OpCodes.Nop));
//Insert stop functions at every return. Note that after inserting the instruction,
//method.Body.Instructions.Count increment,and need to adjust the value of i
for(int i=0;i<method.Body.Instructions.Count;i++){
Instruction ins = method.Body.Instructions[i];
OpCode code = ins.OpCode;
if(ins.OpCode.Equals(OpCodes.Ret) || ins.OpCode.Equals(OpCodes.Throw)){
//Debug.Log("method: " + method.Name + "i: " + i + " code: " + code);
ilProcessor.InsertBefore(ins, ilProcessor.Create(OpCodes.Nop));
ilProcessor.InsertBefore(ins, Instruction.Create(OpCodes.Ldloc, customTraceTypeDef));
ilProcessor.InsertBefore(ins, Instruction.Create(OpCodes.Callvirt, customTraceEnd));
ilProcessor.InsertBefore(ins, ilProcessor.Create(OpCodes.Nop));
i+=4;
}
}
}
//get attribute of given method
private static AddCustomTrace getTraceAttribute(TypeDefinition type, MethodDefinition method, AssemblyDefinition assembly){
Type inejectClassType = Type.GetType(type.FullName + ", " + assembly.Name);
if(inejectClassType == null){
throw new NullReferenceException("Class Type is null, Attribute: " + type.FullName);
}
MethodInfo methodinfo = inejectClassType.GetMethod(method.Name);
if(methodinfo == null){
throw new NullReferenceException("methodinfo in class " + type.FullName + " is null, method name: " + method.Name);
}
AddCustomTrace attr = (AddCustomTrace)methodinfo.GetCustomAttributes(typeof(AddCustomTrace), true)[0] ;
if(attr == null){
throw new NullReferenceException("attr AddCustomTrace on method "+ method.Name + " is null");
}
return attr;
}
}
}

44
Assets/HuaweiService/apm/NetworkMeasure.cs


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);
}
}
}

82
Assets/HuaweiServiceDemo/Scenes/HmsGameServiceDemo.unity


objectReference: {fileID: 0}
- target: {fileID: 114456233620969682, guid: 6d6d75170ea784433bdea8e915d0593b,
type: 3}
propertyPath: m_FontData.m_FontSize
value: 40
propertyPath: m_FontData.m_MaxSize
value: 50
objectReference: {fileID: 0}
- target: {fileID: 114456233620969682, guid: 6d6d75170ea784433bdea8e915d0593b,
type: 3}

- target: {fileID: 114456233620969682, guid: 6d6d75170ea784433bdea8e915d0593b,
type: 3}
propertyPath: m_FontData.m_MaxSize
value: 50
propertyPath: m_FontData.m_FontSize
value: 40
propertyPath: m_LocalPosition.x
value: 0
propertyPath: m_Pivot.x
value: 0.5
propertyPath: m_LocalPosition.y
value: 0
propertyPath: m_Pivot.y
value: 0.5
propertyPath: m_LocalPosition.z
value: 0
propertyPath: m_RootOrder
value: 1
propertyPath: m_LocalRotation.x
value: -0
propertyPath: m_AnchorMax.x
value: 0.5
propertyPath: m_LocalRotation.y
value: -0
propertyPath: m_AnchorMax.y
value: 0.5
propertyPath: m_LocalRotation.z
value: -0
propertyPath: m_AnchorMin.x
value: 0.5
propertyPath: m_LocalRotation.w
value: 1
propertyPath: m_AnchorMin.y
value: 0.5
propertyPath: m_RootOrder
value: 1
propertyPath: m_SizeDelta.x
value: 160
propertyPath: m_AnchoredPosition.x
value: -580
propertyPath: m_SizeDelta.y
value: 43.4
propertyPath: m_AnchoredPosition.y
value: 202
propertyPath: m_LocalPosition.x
value: 0
propertyPath: m_SizeDelta.x
value: 160
propertyPath: m_LocalPosition.y
value: 0
propertyPath: m_SizeDelta.y
value: 43.4
propertyPath: m_LocalPosition.z
value: 0
propertyPath: m_AnchorMin.x
value: 0.5
propertyPath: m_LocalRotation.w
value: 1
propertyPath: m_AnchorMin.y
value: 0.5
propertyPath: m_LocalRotation.x
value: -0
propertyPath: m_AnchorMax.x
value: 0.5
propertyPath: m_LocalRotation.y
value: -0
propertyPath: m_AnchorMax.y
value: 0.5
propertyPath: m_LocalRotation.z
value: -0
propertyPath: m_Pivot.x
value: 0.5
propertyPath: m_AnchoredPosition.x
value: -580
propertyPath: m_Pivot.y
value: 0.5
propertyPath: m_AnchoredPosition.y
value: 202
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6d6d75170ea784433bdea8e915d0593b, type: 3}

m_GameObject: {fileID: 1896786727}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b81caf03bd9156c4595c5dedead8c0c8, type: 3}
m_Script: {fileID: 11500000, guid: e95097d8abc0d4159bbb534f550ce14b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1901415242

657
Assets/HuaweiServiceDemo/Scenes/HmsPerformanceSampleTest.unity


- {fileID: 489714211}
- {fileID: 160783507}
- {fileID: 1105848596}
- {fileID: 1504345070}
- {fileID: 826373935}
- {fileID: 1784979884}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -427.53302}

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -412, y: -291}
m_AnchoredPosition: {x: -275, y: -94}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &160783508

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -412, y: 111}
m_AnchoredPosition: {x: -275, y: 111}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &333410859

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 333410857}
m_CullTransparentMesh: 0
--- !u!1 &354498977
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 354498978}
- component: {fileID: 354498980}
- component: {fileID: 354498979}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &354498978
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354498977}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 826373935}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &354498979
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354498977}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: StopLoadingScene
--- !u!222 &354498980
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354498977}
m_CullTransparentMesh: 0
--- !u!1 &489714210
GameObject:
m_ObjectHideFlags: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -412, y: -82}
m_AnchoredPosition: {x: 253, y: 111}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &489714212

m_Name:
m_EditorClassIdentifier:
m_button: {fileID: 489714212}
--- !u!1 &826373934
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 826373935}
- component: {fileID: 826373939}
- component: {fileID: 826373938}
- component: {fileID: 826373937}
- component: {fileID: 826373936}
m_Layer: 5
m_Name: StopLoadingSceneButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &826373935
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 826373934}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 354498978}
m_Father: {fileID: 35730120}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -276.2, y: -432}
m_SizeDelta: {x: 443.0124, y: 342.88556}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &826373936
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 826373934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 912273f27246744ed9855716e74c89a1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_button: {fileID: 826373937}
--- !u!114 &826373937
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 826373934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 826373938}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &826373938
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 826373934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &826373939
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 826373934}
m_CullTransparentMesh: 0
--- !u!1 &828985450
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 828985450}
m_CullTransparentMesh: 0
--- !u!1 &932391617
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 932391618}
- component: {fileID: 932391620}
- component: {fileID: 932391619}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &932391618
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 932391617}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1784979884}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &932391619
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 932391617}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: EnableGamePlugin
--- !u!222 &932391620
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 932391617}
m_CullTransparentMesh: 0
--- !u!1 &991386385
GameObject:
m_ObjectHideFlags: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -412, y: 303}
m_AnchoredPosition: {x: -275, y: 303}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1010356385

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 116, y: 303}
m_AnchoredPosition: {x: 253, y: 303}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1105848597

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1105848595}
m_CullTransparentMesh: 0
--- !u!1 &1504345069
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1504345070}
- component: {fileID: 1504345074}
- component: {fileID: 1504345073}
- component: {fileID: 1504345072}
- component: {fileID: 1504345071}
m_Layer: 5
m_Name: GameApmTestButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1504345070
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1504345069}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1807970807}
m_Father: {fileID: 35730120}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 268, y: -432}
m_SizeDelta: {x: 459.96704, y: 342.88293}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1504345071
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1504345069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a63dfa2538d674731bb685972b5790cb, type: 3}
m_Name:
m_EditorClassIdentifier:
m_button: {fileID: 1504345072}
--- !u!114 &1504345072
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1504345069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1504345073}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName:
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1504345073
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1504345069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1504345074
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1504345069}
m_CullTransparentMesh: 0
--- !u!1 &1559996177
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1684931507}
m_CullTransparentMesh: 0
--- !u!1 &1784979883
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1784979884}
- component: {fileID: 1784979888}
- component: {fileID: 1784979887}
- component: {fileID: 1784979886}
- component: {fileID: 1784979885}
m_Layer: 5
m_Name: EnableGamePluginButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1784979884
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1784979883}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 932391618}
m_Father: {fileID: 35730120}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 253, y: -94}
m_SizeDelta: {x: 349.0927, y: 116.53342}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1784979885
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1784979883}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 64ccd6332557749f9a5bee0313e242a8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_button: {fileID: 1784979886}
--- !u!114 &1784979886
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1784979883}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1784979887}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1784979887
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1784979883}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1784979888
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1784979883}
m_CullTransparentMesh: 0
--- !u!1 &1807970806
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1807970807}
- component: {fileID: 1807970809}
- component: {fileID: 1807970808}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1807970807
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1807970806}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1504345070}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1807970808
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1807970806}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: GameApmTest
--- !u!222 &1807970809
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1807970806}
m_CullTransparentMesh: 0

4
Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/Button/RequestPermissionButton.cs


{
AndroidJavaClass javaUnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
Activity aaa = HmsUtil.GetHmsBase<Activity>(currentActivity);
ActivityCompat.requestPermissions(aaa, permissions, 1);
Activity activity = HmsUtil.GetHmsBase<Activity>(currentActivity);
ActivityCompat.requestPermissions(activity, permissions, 1);
}
}
}

3
Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/TestCases/StreamDownloadTest.cs


private AGCStorageManagement mAGCStorageManagement;
private string storageFileName= "MetadataLoader.cpp";
private string downloadFileFolder = "/sdcard/";
private void initAGCStorageManagement()
{
mAGCStorageManagement = AGCStorageManagement.getInstance();

20
Assets/HuaweiServiceDemo/Scripts/test/cloudstorage/TestCases/UploadTaskTest.cs


mAGCStorageManagement = AGCStorageManagement.getInstance();
}
public void uploadFile(string path)
{
Debug.Log("upload file start.");
File file = new File(path);
if (!System.IO.File.Exists(path))
{
Debug.Log("upload file does not exists: " + path);
return;
}
StorageReference storageReference = mAGCStorageManagement.getStorageReference(path);
UploadTask task = storageReference.putFile(file);
task.addOnFailureListener(new MyFailureListener()).addOnSuccessListener(new MySuccessListener());
Debug.Log("upload file end.");
}
public void addOnCanceledListenerTest()
{
Debug.Log("UploadTask addOnCanceledListenerTest");

Debug.LogFormat("MyProgressListener:onProgress, get metadata failed!");
}
//UploadTask.UploadResult uploadResult = (UploadTask.UploadResult)arg0;
Debug.LogFormat(m_name + " progress : {0}",
(uploadResult.getBytesTransferred() * 1.0) / uploadResult.getTotalByteCount());
}

2
Assets/Plugins/Android/baseProjectTemplate.gradle


// To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.huawei.agconnect:agcp:1.4.2.300'
classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.4.1.303'
classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.5.2.300'
**BUILD_SCRIPT_DEPS**
}
}

7
Assets/Plugins/Android/launcherTemplate.gradle


dependencies {
implementation project(':unityLibrary')
implementation 'com.huawei.agconnect:agconnect-apms:1.4.1.303'
implementation 'com.huawei.agconnect:agconnect-apms:1.5.2.300'
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.300'
implementation "com.huawei.agconnect:agconnect-storage:1.3.1.100"
implementation "com.huawei.agconnect:agconnect-appmessaging:1.4.1.300"
implementation 'com.huawei.agconnect:agconnect-applinking:1.4.1.300'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.huawei.hms:hianalytics:5.1.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-function:1.4.2.300'
implementation 'com.huawei.hms:base:5.0.5.300'
implementation 'com.huawei.hms:game:5.0.4.302'

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/io.netty.versions.properties'

7
Assets/Plugins/Android/mainTemplate.gradle


implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.huawei.agconnect:agconnect-appmessaging:1.4.1.300"
implementation 'com.huawei.hms:hianalytics:5.1.0.300'
//Google
//Google
implementation 'com.google.android.gms:play-services-auth:18.1.0'
//Google Play Game
implementation 'com.google.android.gms:play-services-games:17.0.0'

api 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
//facebook
implementation 'com.facebook.android:facebook-android-sdk:4.20.0'
implementation 'com.huawei.agconnect:agconnect-apms:1.3.1.300'
implementation 'com.huawei.agconnect:agconnect-apms:1.5.2.300'
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.300'
//hms
implementation 'com.huawei.hms:base:5.0.5.300'

880
Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll
文件差异内容过多而无法显示
查看文件

6
Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll.meta


fileFormatVersion: 2
guid: 9efb4912cb3574c20baaa09cb02e74b8
guid: c7449664c3a974b36b2271a91984d7b5
PluginImporter:
externalObjects: {}
serializedVersion: 2

- first:
Any:
second:
enabled: 1
enabled: 0
enabled: 0
enabled: 1
settings:
DefaultValueInitialized: true
- first:

1001
Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll
文件差异内容过多而无法显示
查看文件

6
Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll.meta


fileFormatVersion: 2
guid: 42e54d16dc18b4f25a7fcdcc7198d239
guid: c1f85638e280d4fcea5d66f40e87b1eb
PluginImporter:
externalObjects: {}
serializedVersion: 2

- first:
Any:
second:
enabled: 1
enabled: 0
enabled: 0
enabled: 1
settings:
DefaultValueInitialized: true
- first:

1001
Assets/HuaweiService/apm/Editor/Unity.Cecil.dll
文件差异内容过多而无法显示
查看文件

6
Assets/HuaweiService/apm/Editor/Unity.Cecil.dll.meta


fileFormatVersion: 2
guid: 72f5d07e55d994bc5ada469adb68fef4
guid: dbc41c2b339c445b0a6c49ae76d25dcc
PluginImporter:
externalObjects: {}
serializedVersion: 2

- first:
Any:
second:
enabled: 1
enabled: 0
enabled: 0
enabled: 1
settings:
DefaultValueInitialized: true
- first:

39
Assets/HuaweiService/apm/GameAPM.cs


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);
}
}
}

11
Assets/HuaweiService/apm/GameAPM.cs.meta


fileFormatVersion: 2
guid: b20a78c5c43af4bf287066f9b4e0f046
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

43
Assets/HuaweiService/apm/GameAttribute.cs


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() { }
}
}
}

11
Assets/HuaweiService/apm/GameAttribute.cs.meta


fileFormatVersion: 2
guid: ab4f67324391b4f2995864238102de70
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

27
Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs


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;
}
}
}

11
Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs.meta


fileFormatVersion: 2
guid: 64ccd6332557749f9a5bee0313e242a8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

70
Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs


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);
}
}
}
}

11
Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs.meta


fileFormatVersion: 2
guid: 0529b18a85b754f60888c1940d8c630e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

24
Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTestButton.cs


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);
}
}
}

11
Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTestButton.cs.meta


fileFormatVersion: 2
guid: a63dfa2538d674731bb685972b5790cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

24
Assets/HuaweiServiceDemo/Scripts/test/apm/StopLoadingSceneButton.cs


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);
}
}
}

11
Assets/HuaweiServiceDemo/Scripts/test/apm/StopLoadingSceneButton.cs.meta


fileFormatVersion: 2
guid: 912273f27246744ed9855716e74c89a1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.Mdb.dll → /Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.Mdb.dll.meta → /Assets/HuaweiService/apm/Editor/Unity.Cecil.Mdb.dll.meta

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.Pdb.dll → /Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.Pdb.dll.meta → /Assets/HuaweiService/apm/Editor/Unity.Cecil.Pdb.dll.meta

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.dll → /Assets/HuaweiService/apm/Editor/Unity.Cecil.dll

/Assets/HuaweiService/apm/Plugin/Unity.Cecil.dll.meta → /Assets/HuaweiService/apm/Editor/Unity.Cecil.dll.meta

正在加载...
取消
保存