| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| out NativeArray<NetworkPipelineStageId> reliableSequencedPipelineStages) | ||
| { | ||
| #if MULTIPLAYER_TOOLS_1_0_0_PRE_7 | ||
| driver.RegisterPipelineStage(new NetworkMetricsPipelineStage()); |
There was a problem hiding this comment.
Would it make more sense for driver.RegisterPipelineStage to be defined with a conditional attribute?
[Conditional("MULTIPLAYER_TOOLS_1_0_0_PRE_7")]
void RegisterPipelineStage(NetworkMetricsPipelineStage pipelineStage)
Sorry, something went wrong.
There was a problem hiding this comment.
It would make sense. I don't know if it would make more sense. What are the advantages you see to using the Conditional attribute here?
Sorry, something went wrong.
There was a problem hiding this comment.
Means you don't need the ifdef around the callsite, the function itself will be compiled out if the thing defined doesn't exist. Kind of means "knowledge doesn't leak" in that the information that this function can't be called unless this other thing is defined won't leak to the outer scope.
Not at all a blocker though, just a thought
Sorry, something went wrong.
There was a problem hiding this comment.
I understand the argument for the Conditional attribute in the general case, but in this specific scenario this is not a function that I can just slap the attribute on. It's a call to a function from UTP. The function will be present no matter what in the build. To be able to use the Conditional attribute I'd have to hoist that single line of code into its own function, and I'm not sure of the value of doing that.
Sorry, something went wrong.
There was a problem hiding this comment.
I love a simplification!
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
* fix: Improved OnValueChanged door example (#3959) * update Updating the door example to provide a more recommended way of using OnValueChanged. * style removing trailing spaces. * Update networkvariable.md Fixes to the example script * Update networkvariable.md Did another pass over this script with some improvements. * style removing trailing whitespace * Apply suggestions from code review Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> --------- Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> * ci: Update of CI dependencies and test fixes (#3970) * corrected Android issue * Updated dependencies * Updated XRAY_PROFILE param to account for latest checks --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> * fix: UniversalRpcTests failing when using IL2CPP backend (#3973) fix Fixing the issue with `UniversalRpcTests` failing on IL2CPP release builds using the "Method Name" stack trace information setting. * feat: Make custom driver construction smoother (#3980) * feat: Make custom driver construction smoother * Add PR number to CHANGELOG entries * Update package version * chore: Change codeowners for UTP (#3982) * chore: Add obsolete warnings to unused or invalid methods (#3987) * chore: Add obsolete warnings to unused or invalid methods * Update CHANGELOG * dotnet-fix * remove duplication of GetRootParentTransform * Remove unrelated change * Leave the public modifiers in place * Update xml doc * chore: Updated aspects of Netcode package in anticipation of v2.12.0 release (#3998) * chore: Replace IsSceneObject with InScenePlaced bool (#4000) * chore: Replace IsSceneObject with InScenePlaced bool * Add XML doc * Update small files * Fix findobjects complaints * Fix tests * Turn off logs * ignore invalid scenes on the scene manager * fix: Add more detailed logging around RPC messages (#3994) * fix: Add more detailed logging around RPC messages * refactor: Logging update (#4002) Update RigidbodyContactEventManager to use new logging system * fix: reset static fields for Fast Enter Play Mode (#3956) * fix: reset static fields for Fast Enter Play Mode support - Added ResetStaticsOnLoad where possible - Applied [AutoStaticsCleanup] to generic classes when applicable - Promoted immutable statics to readonly or const - Added OnDisable to deregister event subscriptions - chore: disable domain reload and remove treat warnings as errors in test project settings - test: add NetworkManager singleton reset test for Fast Enter Play Mode * fix: add missing message type registrations in MessageDelivery * chore: cleanup - Remove unused m_ParentedChildren field and related loops in NetworkTransform - Remove unused m_DespawnedInSceneObjects field in SceneEventData - Replace static quaternion scratch buffer in QuaternionCompressor with local variables - Consolidate LogSerializationOrder and EnableSerializationLogs into LogConfiguration - Update summary comments * docs: update CHANGELOG --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> * fix: end TransportConnect profiler marker on early returns in ConnectEventHandler (#4005) BeginSample was called at the top of ConnectEventHandler but two early return paths (duplicate server transport ID and duplicate client connect event) exited without calling EndSample, causing the 'Missing Profiler.EndSample' error surfaced by the MultipleConnectMessagesNoop playmode tests. * refactor: NetworkAnimator cleanup and code quality improvements (#4001) refactor: cleanup and code quality improvements in NetworkAnimator - Add readonly to fields where applicable - Narrow internal fields and methods to private where applicable - Fix naming casing (TransitionStateinfo, m_DestinationStateToTransitioninfo, field prefixes) - Replace ContainsKey + Add/index lookups with TryAdd/TryGetValue - Remove unused variables and dead code - Improve XML summaries and comment clarity --------- Co-authored-by: Emma <emma.mcmillan@unity3d.com> * chore: replace DEVELOPMENT_BUILD || UNITY_EDITOR with DEBUG (#4006) * update Replacing DEVELOPMENT_BUILD || UNITY_EDITOR with DEBUG. Replacing niche DEVELOPMENT_BUILD uses with DEBUG. * update Removing extra files that didn't need to be included in this PR. * update Adding changelog entry * update Missed the codegen assembly. * update Upgrading our CI ubuntu image to: `package-ci/ubuntu-22.04:v4.86.0`. * Revert "update" This reverts commit 2b010d8. * update bumping ubuntu to use b1.large (segmentation fault was due to running out of memory). * Revert "update" This reverts commit bd1f004. * Reapply "update" This reverts commit 6a434bf. * update Switching PR triggers to use trunk as opposed to the pinned trunk. * Revert "update" This reverts commit 5ce1ef4. * update Moving pinned trunk up a bit. * update Fixing minor merge issues. * update Missed one DEVELOPMENT_BUILD || UNITY_EDITOR usage. --------- Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> Co-authored-by: Michał Chrobot <124174716+michalChrobot@users.noreply.github.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> Co-authored-by: Simon Lemay <simon.lemay@unity3d.com> Co-authored-by: Netcode team bot <svc-netcode-sdk@unity3d.com> Co-authored-by: Noellie Vélez <noellie.velez@unity3d.com> Co-authored-by: mnachury-unity <120488254+mnachury-unity@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Purpose of this PR
Currently if you're using a custom driver constructor, you have to remember to register the metrics pipeline stage when the multiplayer tools package is installed. That can be a bit inconvenient since that pipeline stage is only defined when the tools package is installed, and also because it's not very intuitive that this needs doing.
This PR address that by:
(The second change actually completely alleviates the need for the first, but I went ahead with both anyway just to make things easier on users no matter what API they're using to get the default pipeline configurations.)
Jira ticket
N/A
Changelog
Documentation
Testing & QA
Functional Testing
Manual testing :
Automated tests:
Does the change require QA team to:
Backports
N/A