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

feat: Added "OnServerStopped" event [MPDSE-10] #2420

Merged
merged 9 commits into from
Mar 14, 2023

Conversation

RikuTheFuffs
Copy link
Contributor

This PR addresses this feature request , allowing users to write code that is executed when a server stops (I.E: for sending post-game analytics in a dedicated game server instance)

Changelog

  • Added: "OnServerStopped" event that will trigger only on the server (or host player) to notify that the server is no longer active.

Testing and Documentation

  • Includes integration tests.
  • Includes new public API documentation.

… server (or host player) to notify that the server is no longer active.

[CI] Added tests for OnServerStopped
@RikuTheFuffs RikuTheFuffs requested a review from a team as a code owner February 22, 2023 16:22
@RikuTheFuffs RikuTheFuffs changed the title Added "OnServerStopped" event [MPDSE-10] feat: Added "OnServerStopped" event [MPDSE-10] Feb 22, 2023
@RikuTheFuffs
Copy link
Contributor Author

RikuTheFuffs commented Feb 23, 2023

Note about the tests I added:
I'd love to test also the case in which we connect only as a client, which will cause the event to not be fired, is there any way I can test that, or are we bound to test only in host/server mode?

…trigger only on the client (or host player) to notify that the client just started or is no longer active

* test

Added a more robust/wider range of tests, that covers the Started/Stopped events for client, server and hosts
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me pending the minor XML API adjustments.
👍

@unity-cla-assistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Paolo Abela seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@RikuTheFuffs RikuTheFuffs merged commit 2da54f0 into develop Mar 14, 2023
@RikuTheFuffs RikuTheFuffs deleted the feature/OnServerStopped branch March 14, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants