feat: prepare ability to bundle additional assets in avatar#798
Draft
hai-vr wants to merge 1 commit intoBasisVR:developerfrom
Draft
feat: prepare ability to bundle additional assets in avatar#798hai-vr wants to merge 1 commit intoBasisVR:developerfrom
hai-vr wants to merge 1 commit intoBasisVR:developerfrom
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
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.
Summary
Some users often create avatars that have GameObjects or Components turned OFF by default, only to be turned ON later during a session using a toggle; some days it may not even become ON. This raises the question, should assets contained inside those GameObjects or Components be loaded later, rather than loaded at the same time as the avatar?
This PR lays some preliminary work to figure out if this question is worth pursuing. This adds the ability to append additional assets to BasisAvatar bundles, and exposes a method for consumers to load them.
A new field in BasisAvatar can now define additional assets to be added to the avatar during the build:
A method is also provided to load it. No consumer of that method is provided in this PR, but it has been tested using the following code:
Demonstration on an uploaded .BEE file (the HVR Late Loading component is for demonstration purposes, and is not part of this PR):
SpNTwpbpnn.mp4
Required checks
All boxes below must be ticked before this PR can merge. If a check is genuinely N/A, tick it anyway and explain under Notes.
TransformAccessArrayor are otherwise batched. I have not added per-frametransform.position/transform.rotation/transform.localPositioncalls inside loops.Resources.Load, no direct asset references that pull large content into memory on scene load.GetComponent/AddComponentwhere avoidable — Where unavoidable, the result is cached on a field. None of these calls run insideUpdate,LateUpdate,FixedUpdate, jobs, or other per-frame code paths.BasisEventDriver— Any new per-frame work hooks intoBasisEventDriverrather than adding standaloneUpdate/LateUpdate/FixedUpdatecallbacks on a MonoBehaviour.Testing details
Tick the platforms you actually tested on. Leave the rest unticked — these are informational and do not block merge.
Input / control mode coverage:
Where applicable, confirm these flows still work after your changes:
Notes