-
Notifications
You must be signed in to change notification settings - Fork 450
feat: Scene Registration Refactoring - New UIX Features #918
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
Closed
Conversation
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
This removes NetworkSpawnManager.PendingSoftSynchObjects and replaces it with NetworkSceneManager.ScenePlacedObjects. The primary difference between the two is that the ScenePlacedObjects is populated immediately after a level is loaded or when being approved and already within the current scene.
Migrating the ScenePlacedObjects dictionary up to the rest of the NetworkkSceneManager's dictionary definitions. Removing the PendingSoftSyncObjects dictionary from NetworkSpawnManager.
Use the ScenePlacedObjects dictionary to generate the client(s) switch scene stream buffer. Refactored PopulateScenePlacedObjects method to not set the IsSceneObject to true and to also check and make sure the NetworkObject instance's NetworkManager reference is the same NetworkManager instance as the NetworkSceneManager's NetworkManager instance in question in order to maintain compatibility with the MultiInstanceHelper class for Mult-Instance unit tests.
Fixed some remaining checks (player prefab) as to whether the rigid body should be kinematic or not to prevent the mega spam. During the revert changes of the NetworkTransform changes to better reflect what is in the develop branch, missed the else if. Fixed a minor issue with the slider in the SceneTransitioning manual test to better visually reflect what the value is as well as handle the scenario if it starts at 0 boxes per second it needed to start the coroutine and if set to zero and the coroutine was running it terminates the coroutine.
This update handles adding or removing the associated scenes marked to auto populate the build settings when a SceneRegistration asset is assigned or deleted to/from the NetworkManager.NetworkConfig.SceneRegistration property. This also handles only adding or removing the SceneRegistrationEntries and AdditiveSceneEntries marked to auto populate the build settings with additional consideration of AdditiveSceneGroups nested within AdditiveSceneGroups. Auto-populating the build settings portion is still a work in progress, but is getting closer to being completed.
After reviewing my first approach, I decided that I needed to do a little refactoring that would provide the ability to have notifications on asset dependencies. Added a new AssetDepedency class that derives from ScriptableObject and then made that the base class for SceneRegistration, SceneRegistrationEntry, and AdditiveSceneGroup. Worked through/manually test the various combinations of adding and removing various scene registration related objects. Still building a reference table to make sure this will cover all scenarios. Still needs further testing.
Minor adjustments and added comments.
Some minor refactoring along and saving the current asset states. Working version, but too complex in a few ways.
Cleaned up some of the duplicate code shared between additive scene entries and scene entries by creating a SceneEntryBase. Include in Build property will now include/exclude a SceneEntry's reference base scene as well as the additive scene group (if assigned). Added some demonstration purposes assets. Cleaned up UI property order for SceneEntries.
Working well, but still **WIP** Ended up adding a custom SceneRegistration editor to handle notifications for when list items are removed or added. Made the SceneEntryBase implement the IAssetDependency interface in order to handle dependencies between AdditiveSceneGroup and SceneEntry. Cleaned up some areas, but have a bunch of clean up to do (separate SceneEntry and SceneEntryBase classes from SceneRegistrationEntry).
…er.cs Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com>
Went through to re-assign scene assets to some of the SceneRegistration assets that were older versions that had lost their entries (the scenes remained in the build settings but this needed to be updated anyway). SceneRegistraitonEditor needed to make sure the entries list was allocated before trying to assign anything. Adding or already having assigned the same SceneAsset that also references the SceneRegistration could cause the primary scene asset (i.e. one that has the NetworkManager instance that references it) do be deleted from the list. This fixes that issue.
This is a mid-way check-point of a new approach that utilizes the multi-scene editing design pattern to determine which additive scenes should be associated with a given SceneEntry.
Some minor debug related changes and placed holder.
LukeStampfli
added a commit
that referenced
this pull request
Jul 5, 2021
…g functionality which was removed with #918
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.
As described in MTT_820, there is a need to improve upon how the user registers scenes with the NetworkManager while also taking into consideration how users will associate additive scenes with a primary (root) scene. This is the second phase of the NetworkSceneManager refactoring and preparation for additive scene loading.
Currently this PR is in draft form for review purposes.
(This PR includes PR-913's changes)