[Unreal] Refactor agones component to subsystem#4033
[Unreal] Refactor agones component to subsystem#4033markmandel merged 18 commits intoagones-dev:mainfrom GloryOfNight:refactor-to-subsystem
Conversation
|
Build Succeeded 🥳 Build Id: 3ab0bc2c-9618-471a-af73-0f58076bc7d9 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Build Failed 😭 Build Id: 25d7e15e-cdf9-4b3c-a2b3-6d160f0177d3 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
/gcbrun |
|
Build Succeeded 🥳 Build Id: f3e2be54-b83b-4fda-ae32-fdb1375a3cc7 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
@KAllan357 as an Unreal contributor, could you please review? This PR in particular is marked as breaking. |
|
/gcbrun |
|
Build Failed 😭 Build Id: c1fe56e2-bbf7-4971-a783-6e629d40a987 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
@KiaArmani @DevChagrins @oniku2929 as recent Unreal contributors, could you please take a look at this PR? |
Without pulling the code and building locally, the code looks good to me. |
# Conflicts: # sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp
|
/gcbrun |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Agones Unreal SDK from an ActorComponent-based architecture to a GameInstanceSubsystem-based architecture. The changes improve lifecycle management, reduce dependencies, and provide better integration with Unreal Engine's subsystem framework.
- Migrates from
UAgonesComponenttoUAgonesSubsystemusing Unreal's subsystem architecture - Introduces a custom
FTimerManagerto handle timer operations independently of World - Adds new configuration options for disabling auto-connect and auto-health ping features
Reviewed Changes
Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h | Renamed and refactored header to use GameInstanceSubsystem base class, added subsystem lifecycle methods |
| sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp | Renamed and refactored implementation to use subsystem lifecycle and custom timer management |
| sdks/unreal/Agones/Agones.Build.cs | Removed unnecessary Slate dependencies |
| sdks/unreal/Agones/Agones.uplugin | Changed plugin loading phase from PreLoadingScreen to Default |
| site/static/images/unreal_bp_usage.png | Added new image asset for documentation |
Comments suppressed due to low confidence (4)
sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:121
- Corrected spelling of 'Retrive' to 'Retrieve'.
sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:140 - Corrected spelling of 'HealhPing' to 'HealthPing'.
sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:163 - Corrected spelling of 'initilization' to 'initialization'.
sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:111 - The documentation still refers to this as 'Unreal Component' but it's now a subsystem. This should be updated to 'Unreal Subsystem' for accuracy.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Swinging about around on this - CoPilot did find some spelling errors that we should fix please:
|
|
Build Succeeded 🥳 Build Id: 23824d24-3a84-4ee8-83ab-a093855cc5bd The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 10 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:121
- The comment contains a typo: "Retrive" should be "Retrieve".
sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp:110 - [nitpick] Consider adding a null check for
GameInstancebefore dereferencing. WhileGetSubsystemmay handle null internally, being explicit about the null case improves code clarity and prevents potential crashes if the implementation changes.
sdks/unreal/Agones/Source/Agones/Private/AgonesSubsystem.cpp:116 - [nitpick]
UE_SERVERis a compile-time preprocessor definition. Using it in a runtime function likeShouldCreateSubsystemmeans the subsystem will either always be created or never created depending on the build configuration. This is correct for the intended behavior (server-only subsystem), but the documentation comment should clarify that this only affects compilation, not runtime server detection.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
markmandel
left a comment
There was a problem hiding this comment.
/gcbrun
Seems legit to me. other than spelling errors.
Any objection to merging @igooch , @lacroixthomas ?
|
/gcbrun |
Co-authored-by: Mark Mandel <mark@compoundtheory.com>
|
lgtm and a welcome change! |
|
Part of me wants to merge this on the 24th, because then it's been a full year 🤦🏻♂️ (not really, let's get this in soon) mumbles something about really needing some approvers with Unreal knowledge |
|
Build Succeeded 🥳 Build Id: bdf91344-485b-47ed-9615-1cbb291475d7 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
/gcbrun |
|
Build Succeeded 🥳 Build Id: 67aa95be-fe38-4053-86e1-5303e1698a29 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
markmandel
left a comment
There was a problem hiding this comment.
Le'ts get this merged. Finally!
* refactor agones component to subsystem * - add blueprint read&write exposure * - remove unused module dependecies * - changed loading phase to default * removed depency on FTSTickerObjectBase * move tick bind from constructor to init * Update sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h
What type of PR is this?
/kind breaking
What this PR does / Why we need it:
Refactor agones from using ActorComponent to GameInstanceSubsystem:
Removed final keyword, to allow basing of Subsystem and overriding it's behavior.
Added bDisableAutoHealthPing variable to disable auto call to HealthPing() during Initialization
Added blueprint readwrite flag support for HealthRateSeconds, bDisableAutoHealthPing, bDisableAutoConnect to improve blueprint support slightly.
Space&Tabs mix change to just Tabs
Special notes for your reviewer:
That is something we used internally for some time already and I think people can benefit from that change.
This change would break code that was previously dependent on AgonesComponent.
build.log