I am so confused between addressable and AssetBundle, I am pretty much used with AssetBundle but not with Addressable.
After watching videos of Unite I feel that I should go with addressable instead of AssetBundle.
Below are some decision-making steps and why I choose to go with Addressable.
I have developed a custom educational application to help the student in learning and that app has different topics and subjects as per students need, so what I had created a separate scene for a separate topic so they can download the content as per their need and helps me reduce the size of the application.
to achieve above-mentioned point at first I planned to go with AssetBundle, I used it before in 2017.4.0f1 version, but for this application, I am using 2018, so I tried researching and I found out that addressable is the new way for managing and handling assets (I tried watching videos and understanding a bit and I think it is powerful tool and I can use that instead of going with Assetbunlde).
last thing I feel is unity going to deprecate the Asset Bundle, so I think it’s better if I move on with Addressable.
Below are problems I am facing in moving on with Addressable
I feel that package manager documentation is not that clear.
I am hosting my Unity Scene and supporting assets to Azure Blob, I am not able to find how to upload my scene and assets to azure, what I understand is that I can use my custom IHostingService but documentation of IHostingService is not clear (or I am not able to understand), so I have no idea on how I can go forward with IHostingService.
P.S. - I Maybe misunderstand hosting, in that case, please guide me on how I can upload my scene and folders to azure.
I haven’t tried downloading addressable from the server because I am not able to upload it.
Addressables is not the same as Asset Bundles. Addressables should help in the process of building and using your Asset Bundles. One of the very early problems with Unity was that everything that was referenced in a Field of a GameObject would be packed with your player, there is also the possibility of loading your stuff either from Resources or StreamingAssets. The idea behind Addressables should be that you could easily identify what should be packed in your player and what should be sent to be build and served as an Asset Bundle. In other words before you could only have “hard” references to a prefab in your GameObjects and with something like AssetReferences they would allow you to have a “soft” one which meant the asset could be used in the editor, be served locally or remotely base in the type of build you created (development, production, etc…).
I totally agree the current workflow is very confusing and in my humble opinion they over complicated the solution. They seem to be going away from their legacy workflow but the new one doesn’t feel better and it even breaks some interesting functionalities like the asset bundle browser that they released not long ago.
Yes, Addressables is the most confusing, hard to understand, needlessly complicated, and worst documented AND bug ridden part of Unity that I have worked with. (Sorry to devs, but it is true.)
If it is to be so complicated then they could at least provide some really detailed documentation. Instead it feels you have to somehow be able to read their minds in order to understand how to use it.
Eg. I don’t even know where the Asset Bundles are built to and if I were to deploy to production, which files would I need to upload to where. Just basic stuff and there is nothing in the documents that tell. (Maybe the Hosting Services? But that seems just to be for development? Nothing is clear.)
As a matter of fact, i am aware of all the things you have mentioned in your post and i feel the same, but from my perspective - i don’t think it’s very complicated but what i strongly feel is the documentation and examples are not good. and there are no third party tutorial which can help us, my suggestion is let’s not discuss on the problem and find out the solution of the problem together, what say?
Can any one have any idea of how i can host my assets on custom server (ex. - i am using azure blob storage for storing and yes i know about IHostingService but that is not documented well :(, if anyone have any examples for IHostingService then it is appreciable.
Please forward this question to some one from unity who is in addressable team.
@unity_bill can you please take a look at this thread, i am facing problem in understanding of IHostingService from my end can you provide any example of IHostingService?
IHostingService is for creating a hosting service inside the editor while developing.
for production, you upload your bundles wherever you want and addressables will download them using standard HTTP
if you want alternative methods, you need to change the AssetBundleProvider to your custom implementation
I think the documentation needs some new writers. Someone with a fresh set of eyes needs to come in maybe do a complete rewrite of it as it isn’t written in a way that is easy to follow at all.
This is something i am missing, now i got what IHostingService is for, i really appreciate this help. Now a basic question like asset bundle where can i find addressable in Asset folder, so i can upload it in my custom server?
Also, where to configure url to custom server?
And what happens when content update? Which files are changed? Where to upload them?
Is content update the same thing as releasing app update?
Must old asset bundle versions built with previous version of the game that have been released be kept forever? (ie. if you lose them you will be screwed?)
What if I already released the game and completely clear the addressable data folder and release an update?
How would I manage all the versions of the asset bundles? (Or is only the latest one important?)
How exactly do you specify which asset bundles will be included with the game?
What happens if I remove an asset that I no longer need from the build. Will it affect players on previous versions?
Is it possible to specify different servers for different asset bundles?
What about this content catalog or bin file? How does that exactly work?
There are so many details/questions that one would have to understand to actually release a live game using it, and the documentation doesn’t even explain the basics. How could Unity expect devs to use it? Do you think we have mind reading ability?
And NO do not point to hour long talks.
As others have noted UI/UX is very bad. If it was clearer then it could guide user with less need for better documentation. Instead UI/UX is practically undecipherable. Again requiring mindreading abilities to understand what it is meant for.
If any of
Easy to use UI/UX
Easy to use API
Good, Detailed Documentation
Designed to be Simple to Grasp
Not Needlessly Complex
Optimized to be Easy to Use for most common Use Cases
Bug Free
were true, then it would begin to be usable.
And, most common use case is people want to have Asset Bundles on their server somewhere and let the game download them when needed. [Yet no documentation explaining what files needed to be uploaded, how to configure it. The UI/UX is too confusing instead of easily guiding user to this common task.]
Most commonly, they want to download the asset bundles on a loading screen - NOT while the game is playing and THEN during the game playing would probably prefer simple Sync loading of resources like how Resources.Load works and if asset not available then just use error placeholder and log error. [Yet Addressable API forces everything to be async.]
Async part is ok to have / provides flexibility … but most of the time is just needless complexity. Zero gain - rather negative gain as due to needless complexity in Addressables, it results in your game code inheriting the needless complexity.
The easy way is that make each downloadable scene addressable (scene level addressable). Then change the group’s packing mode to PackSeparately results in a bundle per (top-level) entry (in your case a bundle per scene).
After build asset, the bundles can be found in Library/com.unity.addressables/StreamingAssetsCopy/aa/[PLATFORM], copy the folder with file catalog.json to to your server.
Well in the Unite LA talk they explain a lot of the latest stuff, that is not explained in the documentation or in the examples. They even explain why they made some of the featues this complicated… “they are trying to remove hidden magic” :')
The video explains a lot of the stuff I was trying to figure out at the beggining.
Bill also explains some of the roadmap and weather you should use Addressables or not.
@Favo-Yang I must say THANK YOU! the solution you provided helps me understand the addressable better, below are the steps I followed as per your suggestion,
I have three asset bundles
Scene : (with .scene extension)
Scene lighting data : (this is a folder and contains all the lighting data of the scene)
Scene data : (this is a folder and contains all the prefabs, scripts, models, important plugins (if any))
so what I had done is create something like this :
and then create a new Inspect profile with the below data
and I change my group setting to
and then I click on build and I found the folder as you suggested in the previous reply, I had uploaded the folder and catalog.json to server.
NOW upload is done.
NOW it’s time to load the scene from the cloud and I am having confusion here.
I wrote this line to download and load the scene
Addressables.LoadSceneAsync("DoorScene");
Now I had already created an HTTP host and below-attached screenshot of what my hosting service looks like
the good news is my scene is LOADING perfectly fine, but I am afraid that it’s not loading the scene from my server
and here are some question just came in mind if anyone can answer.
Can I delete the addressable after I uploaded it to the server? so I can test that it is really loading from the server or not?
Can I delete the actual scene and folder to do the test?
How can I load the same uploaded content from a server in the new project or another project? by simply writing Addressables.LoadSceneAsync("DoorScene"); will work? and if not then what are the procedure for the same?
I am not able to understand how mentioning the port number in the Hosting screen only do the task for me? I am glad if anyone explains me the hosting thing.
Very much thanks to the community, personally to @Favo-Yang !
I feel that I understand 60% part of the addressable system, I am thinking of creating a good “WELL-WRITTEN” post and an example of Addressable once I understand it completely.
@mekartikshah good to see you got some progress. I’ll explain more about the settings.
In AddressableAssetSettings there’re 5 profile entries.
LocalBuildPath, where the local bundle build to, bundles here will be copied to StreamingAsset folder and ship with app build.
LocalLoadPath, where the local bundle load from runtime.
You shall keep above unchanged.
RemoteBuildPath, where the remote bundle build to, it should be outside the Asset folder, and you’re in charge to upload content here to your server. You shall revert it back to “ServerData/[BuildTarget]”
RemoteLoadPath, where the remote bundle located at, the default value is “http://localhost/[BuildTarget]” to work with embed hosting service in editor for testing. You may want to keep it as default to test in editor first. Then change to your remote server when testing against it.
AssetGroups/GroupName, defines the group behaviour
To make a local group, leaves everything by default.
To make a remote group, change build path to RemoteBuildPath, and change load path to RemoteLoadPath. RemoteBuildPath and RemoteLoadPath are defined in the AddressableAssetSettings.
In your case, you shall create a new group, and config as a remote group.
switching Play Mode Script to “Packed Play Mode”. (so it actually loads from built bundles)
start the hosting service as you did
play the game in editor and start debugging.
To test against remote server
make sure the RemoteLoadPath set to your server address
build the asset
switching Play Mode Script to “Packed Play Mode”. (so it actually loads from built bundles)
sync your RemoteBuildPath to server
visit your server address in browser, make sure it works
play the game in editor and start debugging.
As said, this is the embed hosting service for testing. It starts a http service in editor with a random port. So it has nothing to do with Azure.
I guess you’re running in Fast Mode, so you haven’t testing against bundles, but at least your addressable loading logic is correct.
You can delete anything in your RemoteBuildPath
Yon won’t want to do it.
No. Because addressable are not able to ship script changes. So all your scripts need exist within the app build. However some people ask the feature for other purpose, you may want to search the forum. I just forget the thread name.
Thanks for the word. It’s for other folks as well. We just learn more from each other.
What are the requirements for our remote server? do we need to enable things like directory browsing? what kinds of permissions should there be? I have a remote server setup through go daddy, (web server hosting) and am hosting my bundle and catalog there. I have it configured enough to load individual files from urls, but does unity require something more for this to work? is there any problems with me using this to test assets that are bundled for mobile builds?
sorry for so many questions, but I am so close to getting this working that I am eager to learn it all.
Not many. We just use an Azure blob and I have dumped stuff on an Apache-served directory before.
No.
If you do not want to have to do extra work with providers that use authentication and what not, you should just go by whatever permissions you need for your browser to be able to download the files if you paste the URL in.
Thank you for your fast replies. My build still fails to find the content, and actually acts weird when I build it… like, If I build using my “Local Online” profile, which loads from my own local hosted IIS website, everything works as expected. If I then switch to my “Production Online” profile, which loads from my online website, it too appeared to work fine.
what is odd is if I clear my cache, Build with the Production profile and attempt to load, everything breaks. what appears to happen is if I build from my Local profile, and then switch to my online profile for loading, the whole application will continue to load as if from my local profile.
I will be doing authentication through people’s purchase receipts and the Ids of the products they purchase, at least that is the plan, so I won’t need direct authentication at this time. but this loading issue is baffling. I never got it working outside of Addressable Assets, so this is all new territory to me.
@Favo-Yang I tried deleting the assets, addressable and actual files from asset folder and then I tried to loading, it loads the whole scene but it’s not loading any other supporting folder or lighting data.
When i tried the same thing in a new project by creating a new profile and changing “RemoteLoadPath” to [myserverpath] it gives me the error UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.ResourceManagement.ResourceProviders.SceneInstance], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=DoorScene.
Do you have any idea of how I can load the scene with all the supporting files and lighting data?
Any idea of how I can load my scene and data to a new project from server like we used to do with asset bundle?