-
Notifications
You must be signed in to change notification settings - Fork 459
feat: Add ability to send instantiation data to a prefab handler #3497
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
Conversation
…efabInstanceHandler.Instantiate() documentation
1) Moved the payload deserialization into the AddSceneObject, for deferred instantiation compatibility 2) Changed the new interface to be a direct single extended implementation, instead a complement of the handler 3) Some renames to better match what the feature does for developers
- Added `INetworkPrefabInstanceHandlerWithData`, a variant of `INetworkPrefabInstanceHandler` that supports synchronizing custom data prior to the `Instantiate()` method call. (#3430)
Updates the description of the method that retrieves instantiation data for a NetworkObject.
Prevents instantiation data synchronization failures from propagating, ensuring that exceptions thrown during synchronization are caught and logged, and that resources are properly released. This change improves the robustness of the instantiation process.
Improves prefab handler lookup performance by introducing a dedicated dictionary for handlers with instantiation data. This allows for faster injection of instantiation data into NetworkObjects.
…antiation data length
…/com.unity.netcode.gameobjects into feat/sync-instantiation-data
I just saw your new changes, and it feels super clean now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one area I have some questions about...otherwise everything else looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we moved this into its own file.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With changes discussed during paired session, everything else looks good to me!
…/com.unity.netcode.gameobjects into feat/sync-instantiation-data
…ty-Technologies/com.unity.netcode.gameobjects into feat/sync-instantiation-data
Documentation for #3497 ## Changelog - Added: Documentation for the Network prefab handler. - Fixed: Updated the Object spawning documentation page to be DA compatible. ## Documentation - Includes documentation for previously-undocumented public API entry points. - Includes edits to existing public API documentation. ## Testing & QA [//]: # ( This section is REQUIRED and should describe how the changes were tested and how should they be tested when Playtesting for the release. It can range from "edge case covered by unit tests" to "manual testing required and new sample was added". Expectation is that PR creator does some manual testing and provides a summary of it here.) ### Functional Testing [//]: # (If checked, List manual tests that have been performed.) _Manual testing :_ - [ ] `Manual testing done` _Automated tests:_ - [ ] `Covered by existing automated tests` - [ ] `Covered by new automated tests` _Does the change require QA team to:_ - [ ] `Review automated tests`? - [ ] `Execute manual tests`? If any boxes above are checked, please add QA as a PR reviewer. ## Backport This is 2.x only documentation update and doesn't need a backport. --------- Co-authored-by: Noel Stephens <[email protected]> Co-authored-by: Amy Reeve <[email protected]> Co-authored-by: Michał Chrobot <[email protected]>
Continues the work from @Extrys in #3430.
Changelog
INetworkPrefabInstanceHandler
to its own file.Testing and Documentation
Backport
This is a new feature so no backport is needed