unity-renderer
unity-renderer copied to clipboard
spike: move scene loading logic from kernel to unity-renderer
Currently kernel desiced when to load specific scene, with moving the responsibility to unity we could have more control to adjust the loading logic to fit a specific platform and scale when performance is dropped.
Acceptance criteria
- [x] RFC with proposal created
- [x] Task breakdown created
@dalkia could you please estimate this task of the start of the sprint?
• Feature-Flag o A feature flag will be created to have both systems coexisting during some time. Depending on the state of the flag, a plugin will be instantiated and the messages from LoadingBridge will be ignored. o Since all loading is controlled from LoadingBridge, ignoring the messages should be enough to stop using that path. It’s not necessary to destroy current components for the plugin to work. o In kernel side, new messages will be added, and this won’t be incompatible with the current flow.
• TELEPORTING - RENDERER o Replace Loading Bridge, LoadingHUDController and LoadingFeedbackController. Combine them all intro a LoadingScreen plugin. o The LoadingScreen plugin will show the loading screen before initiating a teleport with the kernel. Once it started, it’s going to listen to the state of sceneController to update its own messages, load percentage, and visibility. o Delete unnecessary data stores. For CommonScriptableObjects, isLoadingHUDOpen. For DataStore.HUDs.loadingHUD: fadeIn, fadeout, visible. o Move tips control to renderer. Tips will only be shown on first load. o Move message setter to renderer. o Add /goto chat message analysis in Renderer. We need to know that a teleport is going to be triggered before we trigger it, as we need to show the loading screen first. o Suscribe the CameraController state to listen to the LoadingScreen plugin state. o If teleport destination is already loaded, trigger the teleport without showing the loading screen.
• TELEPORTING – KERNEL o All teleport logic will be removed from Kernel. We would not rely anymore on the isLoadingScreenVisible() method in kernel to update the state of the LoadingScreen.
• SIGN UP FLOW – KERNEL o Add a message that determines if the Avatar Creation is necessary. Show the avatar creation flow or move directly to Teleport Home according to the necessity. o Avatar a successful sign up, teleport Home.
• SIGN IN FLOW – RENDERER o The loading screen should start on by default, and act accordingly to the first kernel message. The loading screen should listen to the state of AvatarCreation and T&C change. Once complete, it should call for a teleport to home position, which would follow the same flow as teleportation.
Taks breakdown created under Epic Loading Screen ADR-101
Also, task order can be consulted in this notion page