浏览代码

update

/AsSubmodule
siyao 3 年前
当前提交
597e0572
共有 12 个文件被更改,包括 60 次插入56 次删除
  1. 1
      .gitignore
  2. 4
      Assets/HuaweiService/apm/APMS.cs
  3. 4
      Assets/HuaweiService/apm/GameAPM.cs
  4. 2
      Assets/HuaweiService/apm/GameAPM.cs.meta
  5. 4
      Assets/HuaweiService/apm/GameAttribute.cs
  6. 2
      Assets/HuaweiService/apm/GameAttribute.cs.meta
  7. 82
      Assets/HuaweiServiceDemo/Scenes/HmsGameServiceDemo.unity
  8. 3
      Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs
  9. 2
      Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs.meta
  10. 8
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs
  11. 2
      Assets/Plugins/Android/launcherTemplate.gradle
  12. 2
      Assets/Plugins/Android/mainTemplate.gradle

1
.gitignore


SceneDependencyCache.meta
SceneDependencyCache/
Assets/TextMesh Pro*

4
Assets/HuaweiService/apm/APMS.cs


public void setCurrentGameAttribute(GameAttribute arg0) {
GameAPM.getInstance().setCurrentGameAttribute(arg0);
}
public void setReportRate(int arg0) {
GameAPM.getInstance().setReportRate(arg0);
public void setReportMinRate(int arg0) {
GameAPM.getInstance().setReportMinRate(arg0);
}
public void enableGamePlugin(bool arg0) {
GameAPM.getInstance().enableGamePlugin(arg0);

4
Assets/HuaweiService/apm/GameAPM.cs


public void setCurrentGameAttribute(GameAttribute arg0) {
Call("setCurrentGameAttribute", arg0);
}
public void setReportRate(int arg0) {
Call("setReportRate", arg0);
public void setReportMinRate(int arg0) {
Call("setReportMinRate", arg0);
}
public void enableGamePlugin(bool arg0) {
Call("enableGamePlugin", arg0);

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


fileFormatVersion: 2
guid: b20a78c5c43af4bf287066f9b4e0f046
guid: 7517faf1a8e93024a8bf1de85e36a569
MonoImporter:
externalObjects: {}
serializedVersion: 2

4
Assets/HuaweiService/apm/GameAttribute.cs


}
public class LoadingState :HmsClass<LoadingState_Data>
{
public static LoadingState NOT_LOADING => HmsUtil.GetStaticValue<LoadingState>("NOT_LOADING");
public static LoadingState LOADED => HmsUtil.GetStaticValue<LoadingState>("LOADED");
public LoadingState (string arg0, int arg1, int arg2): base(arg0, arg1, arg2) { }
public LoadingState (): base() { }

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


fileFormatVersion: 2
guid: ab4f67324391b4f2995864238102de70
guid: 80e56d8fe5ac62f4fb52eaff30440354
MonoImporter:
externalObjects: {}
serializedVersion: 2

82
Assets/HuaweiServiceDemo/Scenes/HmsGameServiceDemo.unity


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

- target: {fileID: 114456233620969682, guid: 6d6d75170ea784433bdea8e915d0593b,
type: 3}
propertyPath: m_FontData.m_FontSize
value: 40
propertyPath: m_FontData.m_MaxSize
value: 50
propertyPath: m_Pivot.x
value: 0.5
propertyPath: m_LocalPosition.x
value: 0
propertyPath: m_Pivot.y
value: 0.5
propertyPath: m_LocalPosition.y
value: 0
propertyPath: m_RootOrder
value: 1
propertyPath: m_LocalPosition.z
value: 0
propertyPath: m_AnchorMax.x
value: 0.5
propertyPath: m_LocalRotation.x
value: -0
propertyPath: m_AnchorMax.y
value: 0.5
propertyPath: m_LocalRotation.y
value: -0
propertyPath: m_AnchorMin.x
value: 0.5
propertyPath: m_LocalRotation.z
value: -0
propertyPath: m_AnchorMin.y
value: 0.5
propertyPath: m_LocalRotation.w
value: 1
propertyPath: m_SizeDelta.x
value: 160
propertyPath: m_RootOrder
value: 1
propertyPath: m_SizeDelta.y
value: 43.4
propertyPath: m_AnchoredPosition.x
value: -580
propertyPath: m_LocalPosition.x
value: 0
propertyPath: m_AnchoredPosition.y
value: 202
propertyPath: m_LocalPosition.y
value: 0
propertyPath: m_SizeDelta.x
value: 160
propertyPath: m_LocalPosition.z
value: 0
propertyPath: m_SizeDelta.y
value: 43.4
propertyPath: m_LocalRotation.w
value: 1
propertyPath: m_AnchorMin.x
value: 0.5
propertyPath: m_LocalRotation.x
value: -0
propertyPath: m_AnchorMin.y
value: 0.5
propertyPath: m_LocalRotation.y
value: -0
propertyPath: m_AnchorMax.x
value: 0.5
propertyPath: m_LocalRotation.z
value: -0
propertyPath: m_AnchorMax.y
value: 0.5
propertyPath: m_AnchoredPosition.x
value: -580
propertyPath: m_Pivot.x
value: 0.5
propertyPath: m_AnchoredPosition.y
value: 202
propertyPath: m_Pivot.y
value: 0.5
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: e95097d8abc0d4159bbb534f550ce14b, type: 3}
m_Script: {fileID: 11500000, guid: b81caf03bd9156c4595c5dedead8c0c8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1901415242

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


void switchStatus()
{
m_test.switchGamePluginStatus(m_gamePluginStatus);
Text text = this.GetComponentInChildren<Text>();
m_test.switchGamePluginStatus(m_gamePluginStatus, text);
m_gamePluginStatus = !m_gamePluginStatus;
}
}

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


fileFormatVersion: 2
guid: 64ccd6332557749f9a5bee0313e242a8
guid: 5da26e2b62088e241ba125f9961706b8
MonoImporter:
externalObjects: {}
serializedVersion: 2

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


gameApmTest_count++;
text.text = "gameApmTest start, count: " + gameApmTest_count + "\n";
GameAttribute attribute = new GameAttribute("new scene", GameAttribute.LoadingState.NOT_LOADING);
GameAttribute attribute = new GameAttribute("newscene", GameAttribute.LoadingState.LOADING);
text.text += "create new attribute success\n";
APMS.getInstance().startGamePlugin();

APMS.getInstance().setCurrentGameAttribute(attribute);
text.text +="setCurrentGameAttribute\n";
APMS.getInstance().setReportRate(1);
APMS.getInstance().setReportMinRate(1);
text.text += "setReportRate\n";
text.text += "gameApmTest success\n\n";

text.text += "stopLoadingSceneTest success\n";
}
public void switchGamePluginStatus(bool status)
public void switchGamePluginStatus(bool status, Text text)
text.text = "enableCollection status: true";
text.text = "enableCollection status: false";
}
}

2
Assets/Plugins/Android/launcherTemplate.gradle


dependencies {
implementation project(':unityLibrary')
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-apms-game:1.5.2.303'
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'

2
Assets/Plugins/Android/mainTemplate.gradle


implementation "com.huawei.agconnect:agconnect-storage:1.3.1.100"
//apm
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-apms-game:1.5.2.303'
//hms
implementation 'com.huawei.hms:base:5.0.5.300'

正在加载...
取消
保存