-
Notifications
You must be signed in to change notification settings - Fork 11
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
Remove assets from Renderer's build #175
Comments
Awesome!
I'd like to suggest having only one pipeline. The associated operative costs of:
May be mitigated by assuming the cost of building the assets and deploying them on every build. The only downside is that during many versions, the assets may be exactly the same, not being able to cache them. For that purpose, we can later on create rules for the CDN like:
Optimizing bandwidth and cache-hit at the cost of one hop/redirect |
My idea behind having a parallel job (within the same pipeline) is based on the assumption that we will reduce building time, since the assets can be packed in parallel. In any case this decision is all yours, my knowledge of opeative costs of CI is super shallow and current build times are acceptable. |
We should evaluate the risks and costs of sticking with good ol' Asset Bundle or introduce |
Oh ok, I didn't understood that correctly. As long as it is part of the same build pipeline we are ok, I was trying to prevent an independent pipeline that does not produce a single publishable artifact |
Let me rephrase it, so it's more clear!
@mikhail-dcl I have no experience with Addressables, we could do a quick spike to evaluate the costs. How would it work with ABs? prefabs with references to textures or scripts referencing audios will get them automatically once the bundle is loaded or do we need some integration stuff there? For what I've heard from Addressable they automagically solve this. |
@AjimenezDCL I have no further comments, I think this is OK to be converted into a PR |
As soon as we agree on addressables vs ABs Ill do it, thanks! |
I have never used |
I would suggest going with Addressables, they have a bit of learning curve, that is true, but it also solves a lot of problems dealing with underlying ABs. Addressable would also quickly solve the problem of moving assets away from Resources folder. Our setup would be quite straightforward, so I don't think we would need to expand a lot on Addressables code for custom providers, which is the most time-consuming effort, because of the lack of documentation. |
Also according to Unity, Building
|
I would go with Addressables, worst case scenario we fallback to ABs if we encounter issues |
We can have both systems running in Harmony. What adressables were made to fix are the complex systems that you had to build around AssetBundles (what we have right now) to load certain assets, now you need less code and systems to achieve that. So we will end up with:
I completely agree with this change. |
layout: adr
adr: 175
title: Remove assets from Renderer's build
date: 2023-01-16
status: Idea
type: ADR
spdx-license: CC0-1.0
authors:
Abstract
This document describes an approach on how to make the reference's client lightweight by streaming the currently embedded assets.
Glossary
Problem
Every nice UI, sound effect, particle or material we add to the renderer increases its size. This directly impact loading times or caching since the client's size will go above the max allowed for it. The idea is to pack textures and audio files and stream them in runtime.
Solution
Pack the Assets
Similar to what we are doing with scene assets, we can pack everything into one or multiple (to always be under the cache size limit) asset packs to be consumed by the client. This solution should be part of a different system than the one used for scene assets; therefore we can evaluate using an alternative like Addressables for consuming the assets.
Regardless of the bundling approach, a CI job (within the same pipeline) can be developed as a part of the building process. It would take the assets, pack them and upload them to the server.
Retrocompatibility and Versioning
Currently the renderer is a self-contained experience; to run any renderer you just need a compatible kernel and catalyst; it should be the same for the assets packs.
Getting your compatible Asset Pack
A handful of solutions can be implemented to ensure that a version of the Renderer consumes its asset packs counterpart. All of them would require versioning the packs so the client can distinguish them by name/endpoint/path. At building time a manifest with this information can be placed in StreamingAssets to be consulted in runtime.
Open Questions:
The text was updated successfully, but these errors were encountered: