Conversation
Add go.mod Adjust taskfile
Encode array and simple fields as URL query parameters in the Nakama Unreal client instead of embedding them in the JSON body (e.g. ids, usernames, user_ids, metadata, and several id fields across AddFriends, AddGroupUsers, BanGroupUsers, BlockFriends, DeleteFriends, DeleteNotifications, Kick/Promote/Demote group users, etc.). Updated the codegen template (nakama-unreal.ue.cpp.tmpl) to emit this pattern. Also added a large set of extended automation tests (auth, account, friends, storage, and group specs) to validate a variety of edge cases and behaviors. Removed "proto/" from .gitignore.
Add an explicit SessionToken parameter to FNakamaClient::MakeRequest and update many client API methods to accept a const FNakamaSession& Session, using Session.Token for bearer auth. Authentication endpoints pass an empty token and no longer assign to CurrentSession inside callbacks. Lambdas no longer capture this where unnecessary. Updated related headers, tests, and codegen templates to reflect the new signature and session propagation, removing implicit reliance on a shared CurrentSession.
Add support for HttpKey server-to-server authentication in MakeRequest (Basic auth with Base64("key:")). Introduce numerous FNakamaClient overloads that accept an HttpKey parameter for server-side endpoints (friends, groups, account, leaderboards, storage, events, links, listings, etc.), building query params and request bodies accordingly. Update headers and codegen templates to generate these HttpKey-based API variants to enable server operations without a user session.
Introduce multiple new automation specs to NakamaTest covering validation and edge cases across the client API. Added tests include: social auth validation (Facebook/Google/Steam/Apple/GameCenter), session extensions (logout/refresh), users queries, friends-of-friends and friend list edge cases, group creation/update/delete/join/leave/list with permission checks, storage read/write permission scenarios (public/private), channel message listing edge cases, and linking/unlinking behaviors including already-linked cases. These tests create ephemeral users/groups and assert proper error handling and server behaviors to improve coverage of validation, permissions, and edge conditions.
Add .env to .gitignore and enhance the check-unreal-engine Taskfile task to auto-detect Unreal Engine installations across platforms. On macOS/Linux it searches for RunUAT.sh (mdfind/locate), on Windows it runs a PowerShell probe for UE_* folders and RunUAT.bat; when found the path is written to .env and exported. Improves usability by auto-populating UNREAL_ENGINE and providing clearer error messaging when detection fails.
Enable enum handling in code generation and update project tasks/workflow. - Codegen: detect and fully qualify enum names (including nested enums), expose isLastEnumField helper, pass Api into getCppFuncMap, and treat enums as int32_t (or vector<int32_t> for repeated fields). Adjusted func map signatures accordingly. - Templates: emit generated UENUM definitions in nakama-unreal.ue.h.tmpl using the new enum metadata. - Taskfile: reorganize generation tasks (generate, generate-nakama-unreal, generate-nakama-blueprints), make link-nakama-plugin cross-platform and safer (create Plugins dir, use robust symlink/junction commands), split Mac/Linux build commands, add link-nakama-plugin dependency to build, update test defaults (TEST_SUITE) and UnrealEditor binary path. - Misc: add Reports/NakamaTest outputs to .gitignore and update a doc comment in NakamaClientBlueprintLibrary.h to increase the friend list limit from 100 to 1000. These changes add first-class enum support in the code generator and streamline cross-platform generation/build tasks.
Delete the auto-generated placeholder file Nakama/Source/NakamaUnreal/Public/nakama-cpp/NUtils.h. The header only contained a minimal UrlEncode stub and license header; Unreal provides equivalent utilities, so removing this unused/duplicative stub cleans up the codebase.
Register a new NakamaBlueprints runtime module in the uplugin and update generated Blueprint bindings and supporting code. Changes include: - Add NakamaBlueprints entry to Nakama.uplugin (Runtime, Default loading, platform whitelist). - Regenerate/update NakamaClientBlueprintLibrary (cpp/h) and NakamaUnreal (cpp/h) to provide Blueprint client functionality. - Update NakamaTest.Build.cs and codegen artifacts (funcMaps.go and UE templates) to support the new Blueprint generation. - Bump proto (proto/nakama-types.proto) to reflect updated types used by the generated code. These changes enable Blueprint access to Nakama client APIs and update code generation/templates to produce the Blueprint library implementation.
Add profiling and stats to Nakama Unreal: declare STATGROUP/Nakama counters, add SCOPE_CYCLE_COUNTER, TRACE_CPUPROFILER_EVENT_SCOPE and STAT increments/decrements in FNakamaClient::MakeRequest and response handling. Add TRACE_CPUPROFILER_EVENT_SCOPE_STR calls to many Blueprint async Activate() functions. Use a Self shared pointer in MakeRequest, reference instance fields via Self, and enforce TSharedFromThis safety by adding a private constructor and friend declarations in FNakamaClient. Add a comprehensive Blueprint async action test suite and test assets, enable a test module in the uproject, and update .gitignore and codegen templates/Taskfile.yml to support the changes.
To adjust for various proto schemas throughout the project, just read a list of files and build up a context. Adjust command line parsing. Minimal adjustments to taskfile.
Set explicit default values for many FNakama* struct fields (booleans to false, integers to 0, etc.) to avoid uninitialized state. Add NakamaMenuWidget (new .cpp/.h) and remove the old NakamaMenuActor implementation. Add C++ .editorconfig for NakamaTest, ignore DerivedDataCache in .gitignore, switch DefaultEngine maps to the menu assets, and enable VisualStudioTools in the .uproject. Also include updated map assets and misc build/codegen/docker changes.
Remove duplicated 'isMessageType' and 'isBPWrapperType' entries in cmd/codegen/funcMaps.go to eliminate redundant map keys. Add proto/realtime.proto containing the Nakama realtime protocol definitions (envelope, channels, matches, matchmaking, parties, status, streams, presence, ping/pong, and related messages) for the realtime API.
When the menu is shown, get the first player controller and enable the mouse cursor as well as switch to FInputModeUIOnly so the UI can be interacted with without capturing the mouse. Also add the GameFramework/PlayerController include required for this change.
…ient. To finish with websocket work (#159)
Precompute and reuse a serialized JSON string (BodyString) so bodies are serialized only once when present and for non-GET requests; use BodyString when setting request content. Change RpcFunc signatures to accept a TSharedPtr<FJsonObject> payload instead of FString. Consolidate and reorder AuthType, SessionToken and Body declarations across many API methods and initialize Body where required, plus minor formatting/cleanup to reduce redundant code.
Change RPC body handling to serialize scalar/map bodies into a condensed JSON string field. - Blueprint API: change RPC body parameter from FString to TMap<FString, FString> and store as TMap; convert the stored map into a TSharedPtr<FJsonObject> when activating the RPC call. - Nakama client: wrap scalar JSON bodies in a JSON object where the body field contains a condensed serialized string, and send that object in requests (both bearer and http-key paths). - Codegen templates: update generated .h/.cpp templates to use TMap for non-message body fields, store them accordingly, and emit the conversion code that serializes maps/messages into a condensed string field. - Minor: move SCOPE_CYCLE_COUNTER for JSON serialize out of an inner block in MakeRequest. These changes ensure non-message RPC bodies (maps/scalar JSON) are sent as a condensed JSON string field for compatibility with the server RPC payload format.
Refactor FNakamaClient: extract SendRequest from MakeRequest and switch RPC payload handling to send a condensed, escaped JSON string (BodyString) instead of embedding a JSON object. Update codegen templates accordingly so generated clients use the new SendRequest/BodyString flow. Add a minimal Nakama plugin and test server (main.go, Dockerfile, go.mod) implementing a "transform" RPC, and move docker-compose into NakamaTest/nakama-server so the server image is built with the plugin. Update Taskfile to reference the new compose file path and adjust docker commands. Update NakamaAutomationTests to use nullptr for empty payloads, add tests for the transform RPC (including server and HTTP-key paths), and adapt existing RPC tests to the new payload handling. Also update .gitignore to ignore NakamaTest/Reports.
…nity build rules, mark bpclases transient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of Nakama Unreal SDK v3 project
Depends on the following proto schemas adjustments:
Nakama Common PR
Nakama PR
Satori PR