All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams
Documentation · Quick Start · QQ Group: 467608841 / 233840761
GameFrameX Web ProtoBuff request component - provides HTTP network request functionality based on Protocol Buffer, supporting asynchronous sending and receiving of ProtoBuff messages.
- ProtoBuf Support: Native support for Protocol Buffer message format
- Async Operations:
Task<T>based async API for easy use withasync/await - Timeout Control: Customizable request timeout
- Cross-Platform: Compatible with Unity WebGL and other native platforms
Add the following scripting define symbol in Unity's Player Settings -> Scripting Define Symbols:
ENABLE_GAME_FRAME_X_WEB_PROTOBUF_NETWORK
Choose one of the following methods:
-
Edit your Unity project's
Packages/manifest.jsonand add thescopedRegistriessection:{ "scopedRegistries": [ { "name": "GameFrameX", "url": "https://gameframex.upm.alianblank.uk", "scopes": [ "com.gameframex" ] } ], "dependencies": { "com.gameframex.unity.web.protobuff": "1.1.3" } }scopescontrols which packages are resolved through this registry. Only packages whose names start withcom.gameframexwill be fetched from it. -
Add to
manifest.jsondependencies:{ "com.gameframex.unity.web.protobuff": "https://github.com/gameframex/com.gameframex.unity.web.protobuff.git" } -
Use Package Manager in Unity with Git URL:
https://github.com/gameframex/com.gameframex.unity.web.protobuff.git -
Clone the repository into your Unity project's
Packagesdirectory. It will be loaded automatically.
Edit your Unity project's Packages/manifest.json and add the scopedRegistries section:
{
"scopedRegistries": [
{
"name": "GameFrameX",
"url": "https://gameframex.upm.alianblank.uk",
"scopes": [
"com.gameframex"
]
}
]
}scopes controls which packages are resolved through this registry. Only packages whose names start with com.gameframex will be fetched from it.
Then add the package to dependencies:
{
"dependencies": {
"com.gameframex.unity.web.protobuff": "1.1.3"
}
}using GameFrameX.Web.ProtoBuff.Runtime;
// Send request and wait for result
LoginResponse response = await WebComponent.Post<LoginResponse>(url, request);