-
Notifications
You must be signed in to change notification settings - Fork 3
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
Serve Amsterdam ZuidOost assets through an Addressable instead of an AssetBundle #400
Open
mvriel
wants to merge
21
commits into
main
Choose a base branch
from
feature/using-addressables
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…uttons to load AssetReferences instead
…ference and clean up old asset bundle stuff
mvriel
commented
Feb 4, 2025
|
||
namespace Netherlands3D.Functionalities.ObjectLibrary | ||
{ | ||
public static class ObjectFactory |
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 have extracted the Object instantiation / spawning code from the ObjectLibraryButton to be more reusable and have clearer separation of concerns
…, see https://github.com/Unity-Technologies/Addressables-Sample and https://github.com/Unity-Technologies/Addressables-Sample/blob/master/.gitignore for reference. I will remove the assets now, and update the gitignore in the next commit so that the content is really gone
… feature build seems to have an issue with that. So, let's disable it. A local build is now good, let's push it
…s a different project setting
…s that it will be stripped; lets try that out
…ve enabled 'embedded materials' in the obj. I hope / expect that this may solve my issue
…on - this may be overkill. But let's see that it works in a feature build
…I hope it will fix prod as well
…nd provide documentation
…fablibrary until the pluginmanifest has become manifest
…reparation of using addressables that need to be created async
…Promise so that I can add addressable support next
…etting the PluginManifest working
…code does not end up in building the addressable because that cannot happen.
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.
Prior to this change, the Amsterdam ZuidOost assets -25mb of material- was always loaded at the start of the application. With this change, the intent is for objects to be loaded when needed, instead of on load. This will improve application startup time, base memory usage and clean up the code base.
I have chosen to put the assets into an embedded package (https://docs.unity3d.com/Manual/upm-embed.html) to show how that could work, and to clearly separate the non-core assets.
This PR also introduces the first steps into a Plugin system where
2.a) The PluginManifest is part of the addressable, but because it is labeled as "manifest" it will be put into a separate asset bundle, which is tiny in size
Improvements can be a loading screen while the layer is being loaded, this will be in a separate PR.
Because loading assets can now be asynchronous - I have changed the prefablibrary to look and feel as if all actions are asynchronous, even local layers. This will provide a uniform interface instead of trying to remember which was async and which is not.
For the reviewer:
The AddressableAssetsData folder and contents is part of Unity's addressables system, there is not much to review there in terms of contents in this PR.