Skip to content

Commit ab25e2c

Browse files
author
ci-gitlab
committed
feat:update upm
0 parents  commit ab25e2c

File tree

130 files changed

+2082
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2082
-0
lines changed

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# ChangeLog
2+
3+
## 3.11.1
4+
5+
- 同步版本号
6+
7+
## 3.11.0
8+
9+
- 同步版本号
10+
11+
## 3.10.0
12+
13+
- 同步版本号
14+
15+
## 3.9.0
16+
17+
- 同步版本号
18+
19+
## 3.8.0
20+
21+
- 同步版本号
22+
23+
## 3.7.1
24+
25+
- 同步版本号
26+
27+
## 3.7.0
28+
29+
- 同步版本号
30+
31+
32+
## 3.6.3
33+
34+
- 同步版本号
35+
36+
## 3.6.1
37+
38+
- 同步版本号
39+
40+
## 3.6.0
41+
42+
- 同步版本号
43+
44+
## 3.5.0
45+
46+
- 同步版本号
47+
48+
## 3.4.0
49+
50+
- 同步版本号
51+
52+
## 3.3.0
53+
54+
- 同步版本号
55+
56+
## 3.2.0
57+
58+
### New Feature
59+
60+
- 新增工单系统
61+

CHANGELOG.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## TapSupport
2+
3+
## 命名空间
4+
5+
```c#
6+
using TapTap.Support;
7+
```
8+
9+
### 初始化
10+
11+
工单系统是厂商维度的,游戏在接入工单系统时需要绑定一个工单域名。
12+
13+
serverUrl 为用户初始化时配置的工单域名
14+
15+
rootCategoryID 也是用户在初始化时可选指定的,默认值为 `-`,这个参数的意义参见 https://github.com/leancloud/ticket/wiki/Ticket-in-app-page-API#baseurl
16+
17+
callback 用于回调当前是否有未读的工单
18+
19+
```c#
20+
TapSupport.Init("serverUrl","rootCategoryID",new TapSupportCallback
21+
{
22+
UnReadStatusChanged = (hasUnRead, exception) =>
23+
{
24+
Debug.Log($"hasUnRead:{hasUnRead} exception:{exception}");
25+
}
26+
});
27+
```
28+
29+
### 登录
30+
31+
> 当前版本仅支持匿名登录
32+
33+
游戏方可以自行维护匿名登录的 UUID ,如果传入的 UUID 为空,`TapSupport` 则会生成一个 UUID 并且写入 `Application.persistentDataPath` 中。
34+
35+
```c#
36+
TapSupport.AnonymousLogin(string uuid);
37+
```
38+
39+
### 生成工单 Url
40+
41+
工单的 Url 的构成是这样的,小括号代表可选:
42+
43+
```url
44+
https://{domain}/in-app/v1/categories/{rootCategoryID}{path}#{authInfo}(&metaData)(&fieldsData)
45+
```
46+
47+
`TapSupport` 提供几个 API 用于帮忙游戏方生成工单 Url 以及设置默认的 field 和 metaData
48+
49+
```c#
50+
// 设置默认的 fieldData 以及 metaData
51+
TapSupport.SetDefaultFieldsData(Dictionary<string,object> filedsData);
52+
TapSupport.SetDefaultMetaData(Dictionary<string,object> metaData);
53+
54+
// 生成工单
55+
TapSupport.GetSupportWebUrl(string path, Dictionary<string, object> metaData,Dictionary<string, object> fieldsData)
56+
```
57+
58+
### 未读消息通知
59+
60+
游戏方可以通过 `TapSupport` 中的 `Resume` 以及 `Pause` 方法来进行轮询获取当前工单是否有未读消息。
61+
62+
> TapSupport 通过 Timer 来进行轮询
63+
64+
#### 开始轮询
65+
66+
`TapSupport` 在登录之后,或开始轮询获取当前是否有未读的工单,并且通过 `TapSupportCallback` 回调给开发者。
67+
68+
当前的轮询策略为 10s 一次,如果没有未读消息则增增加间隔时间为 20s ,每次增加的时间为 10s,直到最大间隔时间 300s,每次重新调用 `Resume` 方法时,会重置轮询时间。
69+
70+
```c#
71+
TapSupport.Resume();
72+
```
73+
74+
#### 结束轮询
75+
76+
结束轮询时,会重制当前轮询时间。
77+
78+
```c#
79+
TapSupport.Pause();
80+
```
81+

Documentation/README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Mobile.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Mobile/Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#if UNITY_IOS
2+
3+
using UnityEngine;
4+
using UnityEditor;
5+
using UnityEditor.Callbacks;
6+
using TapTap.Common.Editor;
7+
8+
namespace TapTap.Support.Editor {
9+
public class TapSupportIOSProcessor {
10+
// 添加标签,unity导出工程后自动执行该函数
11+
[PostProcessBuild(107)]
12+
public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
13+
if (buildTarget != BuildTarget.iOS) return;
14+
// 获得工程路径
15+
var projPath = TapCommonCompile.GetProjPath(path);
16+
var proj = TapCommonCompile.ParseProjPath(projPath);
17+
var target = TapCommonCompile.GetUnityTarget(proj);
18+
19+
if (TapCommonCompile.CheckTarget(target)) {
20+
Debug.LogError("Unity-iPhone is NUll");
21+
return;
22+
}
23+
24+
if (TapCommonCompile.HandlerIOSSetting(path,
25+
Application.dataPath,
26+
"TapSupportResource",
27+
"com.taptap.tds.support",
28+
"Support",
29+
new[] { "TapSupportResource.bundle" },
30+
target, projPath, proj)) {
31+
Debug.Log("TapSupport add Bundle Success!");
32+
return;
33+
}
34+
35+
Debug.LogWarning("TapSupport add Bundle Failed!");
36+
}
37+
}
38+
}
39+
40+
#endif

Mobile/Editor/TapSupportIOSProcessor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using UnityEditor.Build.Reporting;
3+
using TapTap.Common.Editor;
4+
5+
namespace TapTap.Support.Editor {
6+
public class TapSupportMobileProcessBuild : SDKLinkProcessBuild {
7+
public override int callbackOrder => 0;
8+
9+
public override string LinkPath => "TapTap/Support/link.xml";
10+
11+
public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] {
12+
new LinkedAssembly { Fullname = "TapTap.Support.Runtime" },
13+
new LinkedAssembly { Fullname = "TapTap.Support.Mobile.Runtime" }
14+
};
15+
16+
public override Func<BuildReport, bool> IsTargetPlatform => (report) => {
17+
return BuildTargetUtils.IsSupportMobile(report.summary.platform);
18+
};
19+
}
20+
}

0 commit comments

Comments
 (0)