Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unreal] Refactor agones component to subsystem #4033

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GloryOfNight
Copy link
Contributor

@GloryOfNight GloryOfNight commented Nov 11, 2024

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug
/kind cleanup

/kind documentation

/kind feature

/kind hotfix
/kind release

What this PR does / Why we need it:

  • Refactor agones from using ActorComponent to GameInstanceSubsystem:

    • Subsystem is more suitable for agones. Subsystem exists from GameInstance initialization and will proceed to exist during all server lifetime.
    • Subsystem not being part of actor, which is part of the world, would not be destroyed during level change.
    • Subsystem owns its own timer manager, which also would not be affected by world.
    • Subsystem would be created only for server builds by default. That behavior easily changeable since its just virtual func. ShouldCreateSubsystem().
  • Removed final keyword, to allow basing of Subsystem and overriding behavior.

  • Added bDisableAutoHealthPing to disable auto call to HealthPing() during init

  • Added blueprint readonly flag support for HealthRateSeconds, bDisableAutoHealthPing, bDisableAutoConnect so controlling subsystem calls from BPs would be easier.

  • Added static Get() of subsystem, so it would be easily obtained from anywhere you have a context object.

  • 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.

@github-actions github-actions bot added kind/breaking Breaking change size/M labels Nov 11, 2024
@agones-bot
Copy link
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.45.0-dev-0d0c4d4

@GloryOfNight GloryOfNight marked this pull request as ready for review November 11, 2024 15:19
@agones-bot
Copy link
Collaborator

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.

@GloryOfNight GloryOfNight marked this pull request as draft November 12, 2024 12:03
@gongmax
Copy link
Collaborator

gongmax commented Nov 13, 2024

/gcbrun

@agones-bot
Copy link
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.45.0-dev-b87eaef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants