Repository navigation
feat: hybrid and NGO spawn counts in editor analytics - #4205
Open
NoelStephensUnity wants to merge 5 commits into
Open
NoelStephensUnity wants to merge 5 commits into
NoelStephensUnity wants to merge 5 commits into
Conversation
NetworkSpawnManager counts local spawns (editor only) and the hybrid ones among them. NetcodeAnalytics reads both when the session stops and adds NgoSpawnCount and HybridSpawnCount to the NGO_NetworkManager event.
HybridSession is true when the session started with hybrid prefabs registered, so a hybrid session that spawned no hybrid instances is still identifiable.
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop-3.x.x #4205 +/- ##
=================================================
- Coverage 76.03% 76.03% -0.01%
=================================================
Files 159 159
Lines 27344 27346 +2
=================================================
+ Hits 20791 20792 +1
- Misses 6553 6554 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This branch has not been deployed
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.
Purpose of this PR
The
NGO_NetworkManagereditor analytics event now reports how many hybrid (NGO + N4E) instances were spawned in each session compared with normal NGO instances, and whether the session ran in hybrid mode.Three fields are added to the event:
NgoSpawnCount: instances without aGhostObjectspawned during the session.HybridSpawnCount: hybrid instances spawned during the session.HybridSession: true when the session started with hybrid prefabs registered, so a hybrid session that spawned no hybrid instances can still be identified.Each
NetworkManagerstart is its own session, so a play mode with several sessions sends one event per session. The counts are taken on the local peer: a host counts every spawn, a client counts the spawns it received, and an object that is despawned and spawned again counts each time. The counters exist in the editor only.The event stays at version 5. The new fields were added to the existing schema as nullable columns, so events from earlier package versions still arrive with them empty.
(Once #4202 lands, a session can no longer report hybrid spawns with
HybridSessionfalse, since those spawns are refused)Jira ticket
None.
Changelog
None: editor analytics only.
Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing done: in-editor host sessions with and without hybrid prefabs, including sessions with no hybrid and no NGO spawns; every event arrived in the analytics backend with the expected values.Automated tests:
Covered by new automated tests:SpawnCountAnalyticsTests.SpawnsAreCountedOnEveryPeer(Host and UnifiedHost)Up-port
Not needed: this targets develop-3.x.x.
Backports
None.