Skip to content

Commit 1f990c7

Browse files
committed
feat: 添加Web ProtoBuff组件支持HTTP请求和ProtoBuf序列化
添加Web ProtoBuff组件,支持HTTP GET/POST请求和ProtoBuf消息序列化 包含Web请求管理器、组件实现和编辑器扩展 添加CI/CD工作流和文档说明
0 parents  commit 1f990c7

41 files changed

Lines changed: 1477 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish-release:
10+
# 引用外部仓库的可重用工作流
11+
# 权限由外部工作流统一配置,无需在调用方声明
12+
uses: GameFrameX/public-github-actions/.github/workflows/publish-release.yml@main
13+
with:
14+
# 传递tag名称给外部工作流
15+
tag_name: ${{ github.ref_name }}
16+
# 传递仓库名称
17+
repository_name: ${{ github.repository }}
18+
# 组织级别已配置密钥,可以使用 inherit 继承所有密钥
19+
secrets: inherit

.github/workflows/sync.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Sync Github To Image (External)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
workflow_run:
10+
workflows: ["Publish Release"] # 监听的工作流名称
11+
types:
12+
- completed # 监听完成事件
13+
#schedule:
14+
# 定时任务,每天 UTC 时间 0 点运行
15+
#- cron: "0 0 * * *"
16+
workflow_dispatch:
17+
18+
jobs:
19+
sync-gitee:
20+
# 引用外部仓库的可重用工作流
21+
# 格式: {owner}/{repo}/.github/workflows/{filename}@{ref}
22+
uses: GameFrameX/public-github-actions/.github/workflows/sync.yml@main
23+
with:
24+
# 传递参数给外部工作流
25+
target_branch: ${{ github.ref_name }}
26+
repository_name: ${{ github.repository }}
27+
# 组织级别已配置密钥,可以使用 inherit 继承所有密钥
28+
secrets: inherit

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Changelog
2+
3+
## [1.1.8](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.8) (2025-05-31)
4+
5+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.7...1.1.8)
6+
7+
## [1.1.7](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.7) (2025-05-30)
8+
9+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.6...1.1.7)
10+
11+
## [1.1.6](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.6) (2025-04-07)
12+
13+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.5...1.1.6)
14+
15+
## [1.1.5](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.5) (2025-01-20)
16+
17+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.3...1.1.5)
18+
19+
## [1.1.3](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.3) (2024-12-30)
20+
21+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.2...1.1.3)
22+
23+
## [1.1.2](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.2) (2024-12-27)
24+
25+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.1...1.1.2)
26+
27+
## [1.1.1](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.1) (2024-10-11)
28+
29+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.1.0...1.1.1)
30+
31+
## [1.1.0](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.1.0) (2024-09-10)
32+
33+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.6...1.1.0)
34+
35+
## [1.0.6](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.6) (2024-09-10)
36+
37+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.4...1.0.6)
38+
39+
## [1.0.4](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.4) (2024-09-10)
40+
41+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.5...1.0.4)
42+
43+
## [1.0.5](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.5) (2024-09-10)
44+
45+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.3...1.0.5)
46+
47+
## [1.0.3](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.3) (2024-09-10)
48+
49+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.2...1.0.3)
50+
51+
## [1.0.2](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.2) (2024-09-10)
52+
53+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/1.0.1...1.0.2)
54+
55+
## [1.0.1](https://github.com/GameFrameX/com.gameframex.unity.web/tree/1.0.1) (2024-05-20)
56+
57+
[Full Changelog](https://github.com/GameFrameX/com.gameframex.unity.web/compare/163a297eefa9ade04e6bdd245eb15ac27c7e3c27...1.0.1)
58+
59+
60+
61+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

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.

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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "GameFrameX.Web.ProtoBuff.Editor",
3+
"references": [
4+
"GameFrameX.Web.Runtime",
5+
"GameFrameX.Web.ProtoBuff.Runtime",
6+
"GameFrameX.Editor",
7+
"GameFrameX.Runtime"
8+
],
9+
"includePlatforms": [
10+
"Editor"
11+
],
12+
"excludePlatforms": [],
13+
"allowUnsafeCode": false,
14+
"overrideReferences": false,
15+
"precompiledReferences": [],
16+
"autoReferenced": true,
17+
"defineConstraints": [],
18+
"versionDefines": [],
19+
"noEngineReferences": false
20+
}

Editor/GameFrameX.Web.ProtoBuff.Editor.asmdef.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.

Editor/Inspector.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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using GameFrameX.Editor;
2+
using GameFrameX.Web.ProtoBuff.Runtime;
3+
using UnityEditor;
4+
5+
namespace GameFrameX.Web.ProtoBuff.Editor
6+
{
7+
[CustomEditor(typeof(WebProtoBuffComponent))]
8+
internal sealed class WebProtoBuffComponentInspector : ComponentTypeComponentInspector
9+
{
10+
private SerializedProperty m_Timeout = null;
11+
12+
protected override void RefreshTypeNames()
13+
{
14+
RefreshComponentTypeNames(typeof(IWebProtoBuffManager));
15+
}
16+
17+
public override void OnInspectorGUI()
18+
{
19+
base.OnInspectorGUI();
20+
serializedObject.Update();
21+
22+
WebProtoBuffComponent t = (WebProtoBuffComponent)target;
23+
float timeout = EditorGUILayout.Slider("Timeout", m_Timeout.floatValue, 0f, 120f);
24+
if (timeout != m_Timeout.floatValue)
25+
{
26+
if (EditorApplication.isPlaying)
27+
{
28+
t.Timeout = timeout;
29+
}
30+
else
31+
{
32+
m_Timeout.floatValue = timeout;
33+
}
34+
}
35+
36+
serializedObject.ApplyModifiedProperties();
37+
}
38+
39+
protected override void Enable()
40+
{
41+
base.Enable();
42+
43+
m_Timeout = serializedObject.FindProperty("m_Timeout");
44+
serializedObject.ApplyModifiedProperties();
45+
}
46+
}
47+
}

Editor/Inspector/WebComponentInspector.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.

0 commit comments

Comments
 (0)