#📦┃addressables
1 messages · Page 6 of 1
so the measurement left area is "in main menu, before gameplay"
right area is "in main menu, after gameplay"
texture memory is leaking, but I have actually less addressable bundles than before
any idea what can cause this?
Maybe this is late but you can use Haruma K's addler
automate the process
It's been super helpful to me
I won't have time to remake the game
all you need to do is add a .BindTo(gameObject) XD
"all you need is" = takes half week to figure out how to use these things
I gave up this task for now, because it took me a whole week to figure out basically nothing
"based on the two profilers, there are unexisting assetbundles referring to some textures (addressable asset profiler doesn't show me those at all, memory profiler still referring to some weird blablah named addressable bundles)
- there are other references as well
like memory profiler tells me that there are gameobjects actively holding those materials inside ParticleSystemRenderers
but I manually cleared those, nullified those materials, called Resources.UnloadUnusedAssets, and still nothing was freed up"
I've run into a problem for which I'm searching for solutions for days now, and I hope you guys know one. I have a LoadableScriptableObject type, and the goal is to run a Load() method on each of them on game startup using addressables. For this, I marked every single one with a LoadableSO tag, and run LoadAssetsAsync to handle the loading, and this works so far. The problems is that these Scriptable Objects are sometimes nested under other scriptable objects, and the nested ones dont load. I need a way to make the nested assets unique addressables, or at least when loading a root object, checking each of its sub object if they match the type as well, but I didnt figure out so far how can you load a sub asset of an addressable.
From this image, I want to call a Load() method on all 4 of the assets individualy.
wouldn't it be easier just to make a hard reference between the parent asset and its subassets? if they all need to be loaded at the same time, that would achieve the same thing
Sadly, no. They are genereated dynamicly and their types are unknown. At the time of writing the code, all we know is that there could be any number of nested scriptable objects under others, which could be loadable scriptable objects or not.
If the sub assets are made in editor you can still serialize references to them all (as ScriptableObject) so this would work
Sub assets don't always work well so perhaps not doing this is also a solution
So, long version:
I work on a Unity framework.
I have an entirely separate system, that makes it so that you can mark scriptable objects with an [AssetExtension(typeof(T))] attribute and it will make it so that any time you crate an instance of T, it automaticaly creates an instance of the class with the attribute nested under it. Furthermore, I have a custom inspector that merges their inspectors into one, so when you inspect the main object, you see all of the nested object's fields as if they were part of the original script. This is visual only, the modified data is still stored in the scriptable object that declares it, and from a scripting view they behave like two entirely different object, it's just there to make the project less cluttered, and the values easier to find by being in a centralized place, so in short, to make the designer's life easier. This is very handy for creating config files for example, where you can install or remove modules and the config fields change accordingly. Because it is made so other packages can 'modify' each other non-invasevely, and because there isn't any code relation between them, I don't know anything about their type, structure, count, and things like that.
@slate timber You may be able to get the sub assets by doing LoadAssetAsync<ScriptableObject[]>() according to this forum post:
https://discussions.unity.com/t/loading-spritesheet-sprites-with-assetreference/713060/6
Thank you, I'll try it out
getting lots of memory overhead from strings referenced by UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.ResourcesLocator , is there any way to reduce that?
Hmm maybe it’s because loading location data and not unloading it
No, still so much data
Anyone know how to preload scenes with Addressables.LoadSceneAsync(..., activateOnLoad: false) without running into the problem (mentioned in the docs) that unloading another scene is blocked now until all scenes are activated?
Like, can I unload with a higher priority and still keep the preloaded scenes not activated?
I think you need to revisit how you do this, to me this is a shit attempt by unity to let you delay scene activation but its not done very well in my opinion.
Yeah, it seems so. I'll see how I can work around it. Thx!
hopefully you can delay initializing components yourself or something similar. Shame we don't get the same control as you get in unreal when spawning in scene content 😦
in general scene control in unity feels so limited to how it could be
still hate how its almost impossible to access scene objects before they get awoken
question: is some duplication as assetbundles fine if it reduces complex dependencies between assets in bundles, thus reducing the size of the preload tables
it's not inherently evil, but of course it increases build/download size and can cause some weird issues due to multiple copies of the same asset being loaded
Hmm yeah that’s worrying, it would increase runtime memory usage too right, because of multiple copies of the same asset loaded
yeah, usually you'd want this only if you knew the two versions wouldn't be loaded at once
for example, bundles for two different levels that share a few assets
thank you
Does anyone know how one would get the asset bundle dependencies of an AssetBundle generated by addressables? AssetDatabase.GetAssetBundleDependencies doesnt seem to work (running it in a BundleRule)
You should be able to see this in the build report. it should state the dependencies for everything.
i forget if its just group or the actual bundles
Thanks, though I would like to do it in a script since I want to experiment with preloading the bundles that have the most bundles depending on them, so generating a list of the bundles that have the most dependents
at runtime this isnt going to fly so id then suggest parsing the data from a build report and then store it somewhere for use
but ofc with addressables the point is to not think about asset bundles anymore
hmm yeah we're just having some issues with loadig times so im hpeing this will help. (And yes that is the plan, storing that text file and including it in the build)
You can add tags to things you want to make sure can be loaded early and do a pre download with that tag
then you can be sure they do not require a download to be used later
same for "loading" but may not be great as you would need to release things not needed
all our addressables are local so this would be purely for load time performance
then maybe tags to load important things early will work but make sure they are released later
Is there a way to control how spearate asset bundles are packed together on disk? Ive heard that loading is faster on hdd if data is closer together
you can control if 2 bundles (all assets and all scenes) are made or one for each label or one for each asset.
how the files are stored on disk is up to the OS and platform
dang, thanks
word of warning to everyone: try to architect your project with addressables in mind from the beginning rather than adding them after
otherwise you run into lots of trouble
@honest halo hmm i I don't see anything in the reference to and reference by section.\
check the group itself
because if the asset bundle its in has a dep, it will need to get that dependency
If you split things into more groups or have groups split in to more asset bundles it will help but identifying the rogue dependency is probably best.
ok i try again
thank you
A tool like this can help find what dependencies an asset has: https://openupm.com/packages/com.silverdale.asset-reference-viewer/
hmmm My HeroDataSO has no dep
Its the group + bundle thats the problem, if an asset in that same group has a dependency to a remote group, then the whole group/bundle does
It sucks but making more smaller groups OR changing the bundle mode to be split by label can help as there will then be more bundles and less chance for a bad dep to affect you
thank you
You can also write some editor code to get an assets dependencies and also check the groups of those dependencies (if addressable)
AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
string assetPath = AssetDatabase.GetAssetPath(asset);
string[] dependencies = AssetDatabase.GetDependencies(assetPath, true);
foreach (var dependency in dependencies)
{
var depEntry = settings.FindAssetEntry(AssetDatabase.AssetPathToGUID(dependency), true);
if (depEntry != null)
{
//Do thing
}
}
On a past game I wrote quite a few things to help me detect bad group dependencies automatically
can you share it with me or suggest me some similar things
if not that's ok thank you anyway
I cant share as its all in work projects but see what you can do with that snippet. You can check the doc page for the settings asset for more info:
https://docs.unity3d.com/Packages/com.unity.addressables@2.6/api/UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.html
e.g. find group, get all entries, loop over them all and collect their dependant groups in a HashSet and Log at end.
Hey hey everyone, does anyone konw what the recommended approach is in regards to addressables generated files and source control?
I was expecting to see some documentation about this on the package website or at least in the Unity manual but I can't seem to find anything.
My gut would say to not include them, but after working with addressables it looks like this might be an issue later on if I don't.
Like the files that define the asset group?
Okay, this is annoying
using UnityEngine;
namespace TRV.ScriptableObjects
{
[CreateAssetMenu(fileName = "PoolConfig", menuName = "Scriptable Objects/PoolConfig")]
public class PoolConfig : ScriptableObject
{
public PoolType poolType;
public GameObject prefab;
public int initialCapacity = 10;
public int maxCapacity = 100;
}
}```
if it is marked as addressable and pushed into CCD then prefab and poolType(Scriptable Object) will be null in build if both are not marked as Addressable?
In editor it works fine but in android build it doesnt work
Not how that works, the asset assigned to prefab will become a dependency for "PoolConfig" and will be included in the asset bundle. Making the deo addressable too lets you control what group that goes in AND prevents duplicates
If something else happens then it's bugged or something else is wrong
Yeah, I was searching like insane and the error is completely unrelated to CCD/Addressables
It's because I have been comparing two SO (PoolTypes) and in build it doesn't work
But thanks for the help
Should they be the same asset these two you compare?
I started to yelling about why Addressables tried to solve various problems into one at the moment...
Yeah, same SO
If they should be the same but are not, make sure the asset is marked as addressable so its not duplicated in multiple asset bundles.
use the analysis tool to find + fix duplicates easier
not sure where to throw this but im trying to use this plugin https://github.com/Radishmouse22/UILineRenderer and i cannot seem to find the unity package ?
anyone know about this
found it here https://www.youtube.com/watch?v=x_CfGJh17Z8
I made a line renderer that works in unity's UI system, since a good one doesn't currently exist.
Download: https://github.com/Radishmouse22/UILineRenderer
you can just download it all and add to your project. How you thought "addressables" was the place to ask this is wild though 😐
🤓
Hi everyone, im getting a problem with build size.
My project using Addressable.
Last build, size is fine (~50mb), but now size increased too large (~100mb). Although i just changed and added some scripts, and i deleted some files unused.
Anyone can help me, pls? 😰
here is my newest build report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 17.3 mb 51.2%
Meshes 655.5 kb 1.9%
Animations 1.5 mb 4.4%
Sounds 1.5 mb 4.5%
Shaders 4.8 mb 14.3%
Other Assets 7.5 mb 22.3%
Levels 0.0 kb 0.0%
File headers 185.9 kb 0.5%
Total User Assets 33.8 mb 100.0%
Complete build size 1.2 gb```
Hello, so I was wondering if unity addressables had an auto group/reference feature, for example I have this scriptable object that references every main thing, it references assets and scriptable object, references prefabs and scenes without having to manually put them in a group?
anything referenced by an asset will be included in its bundle, is that what you mean? the reason to make the other assets addressable too would be if they were referenced from multiple places, to prevent duplication
Thanks, that's exactly what I needed to know
How do y’all manage the addressables organization since they dont keep directory metadata
Did any one using "Addressables for Android". When I uploaded the .aab to play store, It shows the update size smaller. But when I update it on the device it download the entire game again. Any Idea?
Tested with internal test build.
It has been 5 years or more, and Unity hasn't implemented a simple multi-drag functionality for asset references. I even tried creating an editor script to add all of my asset references to a list like with other non addressable assets I have, but it is impossible to do. I guess I will either have to add a whole 1110 assets to my asset reference list one by one or just move away from addressables altogether until some other time.
You could use tags instead but I also don't see why setting the asset ref in editor didn't work, did you set the monobehaviour as dirty or use Undo?
Looks like I figured something out, but I gotta test it to see if it works. If everything goes well, then it should add all asset ref for my items to my list in the editor with a click of a button
Ok so it worked. It is crazy to me that there is no answer to this issue anywhere, even though so many people have asked about it. How I got it to work was that I noticed that when after I created a new asset reference for my Item class, I noticed that the base functions use a Guid. So I figured, if I could get my item Guid, this should solve my problem. I used the AssetDatabase.GetAssetPath to get the path for my asset, then used AssetDatabase.PathToGuid to get the guid from the asset at that path, and then create a new asset reference, gave it the guid, and added it to my asset reference list
you do have to be careful as both methods allow non addressable assets to be used without an exception
Oh, that one is better. Maybe a check to see if it is a valid addressable asset would help to stop non addressable assets from being added
(using this to get the settings object: https://docs.unity3d.com/Packages/com.unity.addressables@2.6/api/UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject.Settings.html)
I don't know what it is about VisualEffect Graph assets in Unity, but I had to open up the editor and manually open the VisualEffect Graph UI panel to peek at its graph before Unity would import it fully and produce a non-garbage Addressable when I asked it to build one from my headless commandline script
Anyone else have grief with VFX assets and Addressables?
When they work, they work, but I've always had more problems with them than any other asset. They seem very temperamental.
Mostly because you almost always have to rebuild them anytime the package upgrades, but also for reasons like this
Hey, guys! Which Asset Management approach should I use? Do I really have to learn Addressables Asset System or maybe Asset Bundles or Direct References or anything else? What do you recommend?
Am I using direct references?
I think yes because I have never used the other approaches
Addressables should probably be used over manually using asset bundles, its much easier to manage.
In projects I work on, everything uses addressables (scene loading, other asset loading)
Is easier when everything does due to the flaws of asset bundles
I'm trying to get a build with localization and unity stores them as addressables.
I've tried a bunch of things but I'm not sure how I'm supposed to do this.
I've run the Build -> New Build -> Default Build Script
But I don't think it's properly exporting these tables
Any advice would be appreciated
group count + asset count seems to match though 🤔 If you check explore does it state those assets are in?
After loading an asset, if multiple objects point to that handle of the loaded asset, will they all be released at once when you use Addressables.Release(handle), or do I have to release the objects one at a time like through a for loop to clear them out at once?
dependencies are handled automatically, if A depends on B + C, when all instances of A are released and B + C are not needed by anything else, they are released too.
You just have to worry about the assets you specifically load
I managed to get it working by reimporting the tables again to get their default groupings.
I guess the non-default groupings need to be imported or loaded explicitly somehow, and i'm not doing that
Ok one last question. When you create a new object from an object that is from a scriptableobject, you can make changes to the new object without it affecting the actual scriptable object itself. Now, if that scriptableobject is an addressable, you load it into memory, create a new object from the handle, and make changes to that new object, will it also affect the result from the handle?
If you have a scriptable object instance loaded from addressables then you make a copy, that copy ofc does not mutate the original.
However if you then release the original, assets may be unloaded that the copy now needs.
Ah ok
I have been messing around and doing some testing and I pretty much got the hang of a lot of stuff
But there is one problem I have. I use scriptable objects to hold data on my in-game items, and whenever I use direct references to an item scriptable object and make changes, it doesn't affect the scriptable object itself. Which is good and useless for when you have references all over with some having modified stats and others having gems, etc. But when testing how addressables work with my scriptable objects items, it modifies the scriptableobject directly, which isn't something I want. I am wondering if there is a way to work around this
Whatever its doing is based on it all being the same object instance or not. If it "appears" as if changes go away its because unity unloaded then re loaded the asset later, meaning changes were "lost".
Either way you should just make a new instance if you want to modify its data safely
Yea after doing a lot of searching, instantiating a copy is the best way to deal with this. Then unload its instance when I am done with it
If it references things like textures or audio you need to not release the original when the copies are in use still but yes a copy is the best solution.
If you need to modify it, it may be better to have another object to do this role instead.
<@&502884371011731486> ^ scam
Anyone having problems with CCD download right now?
It does download but then it stuck at 99.2%
So I saw the load path thing in my addressables group settings and I was wondering if doing something like {UnityEngine.Application.persitentDataPath}/Mods would work
Yes that will but using something such as streaming assets path would be better?
https://docs.unity3d.com/Packages/com.unity.addressables@2.6/manual/ContentPackingAndLoadingSchema.html#build-and-load-paths
I will see what could work better 👀, i basically want to make downloading and uninstalling mods very easy for both PC and quest users.
well for android it will be difficult as persistent data path + streaming assets are not user accessible (without root)
for pc either path works the same and is easy to access
Any idea what the highlighted test is?
Appeared suddenly and it just contains an empty test
using NUnit.Framework;
namespace AddressableAssets.DocExampleCode
{
// Exists to so that the files in this folder can exist in Tests
internal class TestStub
{
// A Test behaves as an ordinary method
[Test]
public void RequiredTest()
{
// Use the Assert class to test conditions
}
}
}
Is it safe to remove?
Doesn't seem like any class has a reference to this, at least none that VS is warning me about
From the README inside the directory (DocExampleCode), it looks like the whole folder can be deleted
in the documentation. They are included in this format so that the
code is compiled and checked before every release. The code is not
created for the purpose of stand-alone use and is not part of the
supported, public API of the Addressables package. In most cases,
you must make changes before the example code can be used in a project.```
I would keep it to be safe
I’m working on a system that serves 3D content to a Unity app at runtime, and I’m trying to understand the best format for remote delivery. Specifically, I’m looking at AssetBundles, Prefabs, and UnityPackages, and wondering which of these (if any) Unity can import dynamically during runtime. From what I gather, AssetBundles seem to be the standard approach for streaming content into a live app, but I’m not sure if Prefabs or UnityPackages offer any similar runtime capabilities or unique advantages. Would appreciate any guidance on which format is best suited for this kind of on-demand loading architecture.
asset bundles are the only way to load unity assets at runtime from an external location. addressables uses them too but handles their loading and management for you.
If you need to just load model files perhaps the gltf package would be useful? it can import + export GLB/GLTF files at runtime
https://docs.unity3d.com/Packages/com.unity.cloud.gltfast@6.13/manual/index.html
Thank you @honest halo !
Hi everyone, I've been working on a project involving procedural generation. I've started moving the "world gen" code part of this project to an external package that could hopefully be reused.
The issue thats not popped up is that the original code used Addressables to access the assets during runtime, this means that now that I am setting up the Samples~ directory with examples of how to use the package I cannot reference anything directly as addressables are project exclusive.
I was wondering, is their a correct way of dealing with this? For example having package specific addressables that can be imported along with the package or will I just need to use gameobject references?
Hey, I'm having a problem on Meta Quest / Android with Addressables and split application binary. This generates the .obb file with my Addressables, but when I use AssetReference to load a scene that I have as Addressable, it throws Null Ref. It can't find the AssetReference. However if I put a label on it and load via label string, it does correctly find the scene and it loads. What do I need to do so I can still use AssetReferences?
is the asset actually addressable? if an asset assigned in an asset ref stops being addressable it wont be cleared out so may work fine in editor still.
I've found this to be actually a problem with scriptable objects rather than Addressables, sorry. I am passing some data using scriptable objects - a level to load in this example, which contains an AssetReference to the level scene. And for some reason it's null in runtime on Quest but works fine in Editor
that's why the label worked, because I hardcoded it, and did not get it from the scriptable object
How is the scriptable object loaded? Should still work as all it does is hold the address/guid and loads the asset like normal
I have a singleton dont destroy on load object with game setup that holds
public LocationSo SelectedLocation
{
get => selectedLocation;
set => selectedLocation = value;
}
it is being set in the menu (first scene that loads)
{
_gameSetup.SelectedLocation = locationSo;
}```
Then I load a level scene (single), which has its own initialization script and gets the game setup in Start
``` private async void Start()
{
_gameSetup = GameData.Instance.GetGameSetup();
await SpawnEnvironmentAsync();
}```
And the SpawnEnvironment is
``` private async UniTask SpawnEnvironmentAsync()
{
var selectedEnvironment = _gameSetup.SelectedLocation;
if (_gameSetup == null)
{
Debug.LogError("GameSetup is null. Please check your game data initialization.");
return;
}
if (_gameSetup.SelectedLocation == null)
{
Debug.LogError("Selected environment is null. Please check your game setup.");
return;
}
var handle = Addressables.LoadSceneAsync(_gameSetup.SelectedLocation, LoadSceneMode.Additive, false);
await handle.ToUniTask();
if (handle.Status == AsyncOperationStatus.Succeeded)
{
await handle.Result.ActivateAsync().ToUniTask();
}
}```
which throws null at second check for SelectedLocation
On Quest
Editor is fine
And the location scriptable is assigned as a serialized field in the menu scene to the location button
so it just gets passed in onClick
you can await the load handle directly btw and it will return the asset/scene handle too
e.g. var asset = await Addressables.LoadAssetAsync("foobar");
but nothing here seems wrong here. The asset reference must be bad somehow.
What does checking RuntimeKeyIsValid() return?
https://docs.unity3d.com/Packages/com.unity.addressables@2.6/api/UnityEngine.AddressableAssets.AssetReference.RuntimeKeyIsValid.html#UnityEngine_AddressableAssets_AssetReference_RuntimeKeyIsValid
Actually you should be using this to load the scene:
https://docs.unity3d.com/Packages/com.unity.addressables@2.6/api/UnityEngine.AddressableAssets.AssetReference.LoadSceneAsync.html#UnityEngine_AddressableAssets_AssetReference_LoadSceneAsync_UnityEngine_SceneManagement_LoadSceneMode_System_Boolean_System_Int32_
anyone know if its possible to make an asset bundle for an png? its not working for me no matter what i do. im just getting a bunch of null rectangles in my assetbundle file.
the process is the same for any asset and if using addressables put it in its own group if you want it separate
okay so turns out the AssetReference is all good, scene loading works allright, it's just that the scriptable object I'm using to pass the location data has... no data, after I switch the scene. Which could be happening if some script in the scene B which is Addressable, also has a reference to the scriptable, and it gets created a new, and is empty?
If the asset was loaded only by a scene load and then it's unloaded then the asset may be unloaded too.
You should load the scriptable object yourself explicitly so it won't be released too early.
Though a managed class instance will not magically loose data due to this (e.g. string or int fields)
Additionally, if scene A and B both reference it it should work just fine but don't expect changes made to the asset to be kept between scenes
As it could be unloaded then loaded again as a new instance
okay so the scriptable is on a "GameCore" object (which is addressable), assigned as a serialized field. The Game Core is also marked as don't destroy on load, and is loaded in a Menu scene. The menu scene gets unloaded after I switch to next scene where I want to use the data. The Game Core persists because it's in the dont destroy scene. Would the data assigned to scriptable in Menu not persist in this case?
the Game Core is loaded in Menu, but then is taken outside of it technically, so unloading Menu will somehow clear it?
You should load the scriptable object yourself explicitly so it won't be released too early.
So I should have the SO marked as Addressable and load it independently of the GameCore object which uses it and then it would keep the data between scenes?
But this wouldn't work anyway, it's no different if I load the SO as a separate Addressable since if I will load it in Menu scene, it will also get unloaded during scene change. So it would be best to keep the SO in its own scene?
Correct because all addressables knows is that scriptable object was a dependency for that scene, and as the scene was unloaded it can now unload that dependency
If you loaded the SO via LoadAssetAsync() and never released it then it would be fine and great
The documentation explains this concept of dependencies.
If you load scene "Foo" and it depends on asset "bar", addressables also loads "bar".
When you release scene "Foo" it checks if we can also release "bar" because its user count 0
okay, but I moved the bar to dont destroy on load scene
doesnt matter
Addressables loaded some assets, it will unload those same assets later
If you load the asset yourself with its address you avoid this problem because its then YOUR job to release it
Please re read the documentation as this concept of dependencies and asset loading/unloading is explained by unity
I'm just porting over a project to using addressables, I added some prefabs to a group, ran the build script, and it works great in editor.
When I build to iOS though, it gives me this error which makes absolutely no sense. It's saying the key is expecting a gameobject, but its actually a gameobject, so it can't be assigned to a gameobject.....????
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Asset found for Key=zipperBoxingGlove with Type=UnityEngine.GameObject. Key exists as Type=UnityEngine.GameObject, which is not assignable from the requested Type=UnityEngine.GameObject
maybe one of the most unhelpful logs I've seen in a while lol...
Its telling you no asset with the key you gave exists or its not a prefab (GameObject)
so there may be a configuration issue, is it set in the addressable settings to build the content automatically with a build?
yeah they are prefabs, its working fine in editor. they do appear to be in my default group, and I see that bundle being made
well that is what that error means. did you change the local load path for the default group by accident?
not that I can tell
and i do see the bundle in the built xcode project
the log says it found the key, but that the key type of GameObject was incorrect for assigning to a GameObject
which is.....interesting
LOGGING - [Error] UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Asset found for Key=zipperBoxingGlove with Type=UnityEngine.GameObject. Key exists as Type=UnityEngine.GameObject, which is not assignable from the requested Type=UnityEngine.GameObject
right there its saying it does see that the key exists, just a type incompatability that is completely bogus
my usage of Addressables seems like the most basic lol
Unity 6.1.5
I have one call to LoadAssyAsync in my script, and just a handful of prefabs I'm trying to load from the default group
editor the call gives no errors of course, and the error on device is just driving me mad
Can't imagine a non-engineer trying to utilize this 
yes il2cpp as is required for iOS
@honest halo
out of desparation, trying to disable engine code stripping to see if that makes a difference
id try doing a clean build too, delete any old build files
but I'm about half an hour away from just making my own addressables alternative. hate black boxes
well the src is readable and if it happens in editor you can even debug it
its only on device
I'll try cleaning my library and doing a full project reimport, then build
its slightly making me feel better that I don't see this issue being reported all over the place, but then also, what am I doing wrong
It looks like some strange bug either potentially with il2cpp compilation as it makes no sense for the actual type to not be assignable to itself
Hello, I am trying to setup addressables for our mobile game but I am having some strange bugs with it so I'm wondering if the way I am using it is incorrect.
We want to be able to download the addressables and catalog from S3 in any of our builds. (Assuming same platform) I have turned on "Only update catalogs manually" and during the game initialization I call UpdateCatalogs() and pass the URL to the catalog. Addressables.InitializeAsync().WaitForCompletion(); is called before any of this as well.
var catalogs = new string[] { catalogURL };
Addressables.UpdateCatalogs(autoCleanBundleCache: true, catalogs, autoReleaseHandle: true);
I've also tried using Addressables.LoadContentCatalogAsync() but the documentation says that's only for more than 1 catalog?
I've attached my addressable group settings as well as my addressable settings.
When we build, all load and build paths are set to remote. The com.unity.addressables folder in the library is cleared before the build. Anything in ServerData is also cleared.
In the build we see missing assets but 99% of the assets/prefabs are loading fine.
I'm thinking I am maybe doing something out of the norm.
Oh, and CRC is disabled because we want to be able to use addressables accross multiple builds and it was preventing us from doing so. So maybe the problem is long those lines?
by default when addressables is initialized it will try to download the latest catalog which should be uploaded along with your remote bundles.
Its done then because it has to be updated before anything is loaded with addressables
(this is because its not safe to change/load new catalog data when things have already been loaded)
you should probably change it back so the catalog is updated during addressables init
Isn't that the point of "Only update catalogs manually" though?
Nothing should be loaded related to addressables at the point we init or update catalogs.
then why not let it download the latest for you?
its needed so addressables knows if a bundle has changed and needs to be re downloaded
its all in the catalog
Hmm. Well because the URL for the catalog can change.
then have the url be a static var and have it be runtime resolved
I can try that
or have the path be something that makes sense at build time such as bucket/version/platform
What I do:
docs explain the differences of {} and []
Do I set the load path directly to the catalog or to the parent directory of the catalog?
bucket.s3.eu-west-2.amazonaws.com/000004/iOS/catalog.json
```vs
bucket.s3.eu-west-2.amazonaws.com/000004/iOS/
its the directory its all in
ok
you can see on mine it inputs the path automatically but has a helper property for runtime to ensure the path is lower case
I think that did help thanks
@honest halo So the bug with the game randomly breaking seems to be due to me disabling CRC. With that enabled I cannot use the same addressables for multiple builds anymore.
I am required to do a lot more work to make sure every build has it's own addressables build. Not to mention the amount of storage required will increase substantially. We make like 20 builds a day.
Do you know of a better way to make it so mutliple builds can use the same addressables without disabling CRC?
Like maybe I have to cache the addressable library data for each git branch on the build machine and make sure to use the correct one when building?
I could try content updates I suppose as well. Though that will require more work as well as I wouldn't want git branches to use the same content update path.
Found a different way to do it.
Great, you should only need to disable CRC checking for local bundles if the catalog is built by another project copy later and uploaded
hello, i am a beginner so maybe it is an stupid question but i don't know how to make it. I am trying to make a small rpg game with narrative dialogue system like arknights and other 2d LN game. Then i met a problem, usually, i just add animator on the sprite with ink file tags system to make the dialogue but as I moved to addressable, I need to make the animation myself. So the Question is :
- Can I use animation of unity to make the sprite move ?
- Should I use inks file tag + self function.
- Or both ideas is bad ?
Also , about the syntax of label and group. Is it a good ideas using syntax
group:
- Character_name
- SharedObject
mixed with
Label : - [Character unique Id]
- [Character facial expression]
- [Character unique id outfit]

is your question how a label in an ink file can be used to load something with addressables and if that can be an animation? the 2d animation package may help so you can animate and easily load an animation with an address?
https://docs.unity3d.com/Packages/com.unity.2d.animation@13.0/manual/SpriteSwapIntro.html
not exactly, what i want is if I can load a sprite from de adressable then applying an animation on it 
but thx you, i find Sprite Resolver as I am using Sprite Renderer before, you saved me so much time 
You could also load a unity animation clip or your own way to do sprite animation but the 2d animation stuff should be better suited.
you cannot modify an animator controller at runtime so it would kinda suck to use

Do you mean by 2d animation stuff = Sprite Library Assets and Animation Clips
And using psd for sprite ?
I believed 2d animation had something to do sprite animation easier but looks like thats not the case. Meaning if its done with animation clips in an animator you probably dont need to load anything (as you would just change animation in the animator).
any a sprite can be many formats outside of unity, once imported its not important anymore
hey so right now i am having a problem with building my addressables, im getting a failed to to compile player scripts and i get a error on line 27, i can't see any problems on line 27 but im guessing it's in my pallet window but idk, i attatched the error, my pallet editor and my pallet window script and here is my repo if you want to help https://github.com/cheesy-games-dev/AnalogSDK/blob/main/AnalogSDK/Scripts/Editor/PalletEditor.cs
Hey 🙂
Just curious, I want to download a single scene. I don't want to load it (open it) just download it so it's stored locally. When calling Addressables.DownloadDependenciesAsync(SceneKey) I get an error:
OperationException : GroupOperation failed because one of its dependencies failed
I am testing with an empty scene. I have done some research and can't find any viable solutions. Is there a way around this?
Perhaps you failed to upload another bundle that is a dependency hence the operation failing
you can make addressables download any assets inc scenes
you cant "load" a scene asset as thats not a thing at runtime so yea with scenes you begin loading it or nothing
*pre download
pre load is vague in this context
yeah predownload
I have uploaded a new CCD build 😅
Just trying to call DonwloadDependenciesAsync using my scene key to pre-download it so it's stored locally for when the user wants to travel to it. Reading your previous messages, I assume this isn't possible?
It's possible for sure but the error implies a dependency could not be found. Check the build report for what dependencies the group has.
Got it sorted, thank you 🙂
New question regarding an issue, I am attempting to back addressables serpeatly using CCD, although when I build to CCD, the addressables aren't uploaded 😅
Anyone have any idea around this? I found a forum from 2 years ago where a few devs experienced the same issue, just curious if it has been fixed
good morning, I want to use Addressables in a cutscene—well, I already used them in several—but I noticed in the build report that the characters I use in the cutscenes are duplicated in size. For example, npc.fbx appears twice in the build. Should I make npc.fbx an Addressable and have the cutscene look for it in the Resources folder before it starts? But isn’t it complicated to assign npc.fbx with its animations in the Timeline and then remove it afterward? Or am I misunderstanding something? I’ve looked for tutorials on this, but I only find basic Addressables videos.
You contradicted yourself, it can't be addressable and be in resources 🤔
The whole thing needs to be in addressables instead to avoid duplication (scene + timeline + model)
i dont understand, right now is not in resources folder my npc.fbx, and my 2 cutscenes are both addressable but because i got instanced in the timeline the same fbx i think is duplicated right?
sorry for my english
The addressable build report tells you when assets are duplicated in multiple groups. The solution to that is to mark the asset as addressable so it knows where it should live.
oh! i forgot this! thanks so much let me check if works
2022+ has the better report window that shows this information easily
hmm i have unity 6, but i can make an empty project with 2022 to check that
unity 6 is a newer version to 2022 so no need
it goes 2022, 2023, 6
thank so much
and i just noticed this new package, if i wont use play asset delivery is not necessary right?
Correct
What I’ve found is that it’s not enough to just mark the shared object in both cutscenes as Addressable—I also need to place it in a separate group to avoid it appearing duplicated in the build report. I’m not sure if I’m doing it right. For example, “arms…” with its material and texture—I’ve moved it to its own group, as you can see in the screenshot. Only this way I can prevent it from showing up duplicated in the Addressables report.
Its caused by asset dependencies, read this for more info: https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/editor/tools/AnalyzeTool.html#check-duplicate-bundle-dependencies
and how to avoid duplicated shaders? i cannot make them addressable are the basic from urp
you can make them addressable
if you tell it to fix the rule it should shove them all into a group for you
Hey 🙂
I am fixing addressables for one project. I want to have bundles included in build, but updated from remote.
My build path is to Streaming assets Assets/StreamingAssets/aa/[BuildTarget]
and my remote path is [CloudRootPath]Hockey/Release I can not make it work like this. Any idea why ? I use remote catalog.
When doing a Content Update build how can I tell what bundles are new? The docs say they will have a new name but I feel like there should be a built in way to get a list of all the changed bundles to upload to our cdn
If the hash is in the filename then you know that way
Otherwise I dont think you can tell without checking checksums yourself
What? So I am supposed to keep a db of the hashes and check against that?
Would be easier to compare creation date of the file with the jenkins job start time
if they are all stored in the same folder and have the hash in their filename then you can upload them all and not worry
I don’t want to upload them all.that takes 3 mins
Then you probably need your own solution to find what has changed
Is it correct to assume that assets between assetbundles are referenced with GUIDs/FileIds?
If thats the case, is it safe to assume that if I build assetbundles within the same project - these references will always stay valid
Example, I have folders Game and Update1 build in the first batch
Then I build folders Game, Update1 and Update2 in a second batch
If I will be loading bundles like so:
Game bundle (taken from the first batch)
Update1 bundle (taken from the first batch)
Update2 bundle (taken from the second batch)
Will all assets references still stay valid between an old bundle and a new bundle that uses assets from the old bundle?
They were build within the same project with the exact same folders
Just in different batches ( different BuildPipeline.BuildAssetBundles calls )
I need to be able to additively upload content to the game with updates, and I want to only ship that additional content that was built with a second batch (Update2). I know that some games using Unity is doing this somehow, but none of this is documented anywhere.
TL;DR Can newly build assetbundles within the same project reference old assetbundles in terms of asset references from old to new, so that you could publish new assetbundles without republishing any old assetbundles
I'm late to this, but back in the day we made a video about SOs and in passing we mention exactly this duplication issue that can happen with Addressables: https://youtu.be/WLDgtRNK2VE?si=tSGSmcA8P4x8XzUj
(sharing just for fun)
In this second devlog, we look at how we employed ScriptableObjects to create a flexible and powerful game architecture for "Chop Chop", the first Unity Open Project.
🔗 Get the demo used in this video on the Github branch:
https://github.com/UnityTechnologies/open-project-1/tree/devlogs/2-scriptable-objects
(compatible with Unity 2020.2b and...
Hey! I tried to integrate the addressable system with my scriptable objects and load them on awake, it does work, but I have to rename every SO to "Perk" by hand, so I'm looking for a better way.
rename them after loaded? or before
what does it help with when you rename them?
You can assign tags to load many assets at once. Addresses must be unique so you can't be renaming them all to be "Perk".
You can also auto simplify addresses in the groups menu r click menu.
Hey everyone. I've got a problem. I have multiple asset types, inherited from the class ParentType. I mark all of them with the same set of Labes. Then I do this:
var operation = Addessables.LoadAssetsAsync<ParentType>(Labels, Addressables.MergeMode.Intersection);
But operation.Result contains only null values. It contains the correct number of them, it designates them with correct classes, but the vaues themselves are null.
I've tried to instead use LoadAssetsAsync with specific type instead of a parent and it works fine. Am I missing something? I think this worked before. No?
I think you just used the wrong merge mode, the given type should work if assignable to the assets
Ok. I fixed it by changing generic type I used for ParentType to ScriptableObject. Before, it was just UnityEngine.Object
Bumping my question about assetbundles
should be guid because asset bundles existed before addressables
Got it, so my approach that I described below that should work?
Probably fine yea but seems like needless work as you surely will need to update old assets requiring changes to older bundles
thanks so much i will check righht now
Updates to the old bundles won't be necessary. I was using this additive update analogy to setup an easier scenario to understand, since there are games that do exactly what I described for their additive updates model (example: Source Engine 1 games)
I am working on something entirely different that would just use the same mechanism - modding SDK
Thanks for the feedback
Hello channel, I am having some issues with the addressables system. I am currently using it for visionOS and for some reason, the memory keeps piling up using this simple script
private void Start()
{
StartCoroutine(AutoLoadAndUnloadToTest());
}
IEnumerator AutoLoadAndUnloadToTest()
{
LoadAssetReference();
yield return new WaitForSeconds(4);
UnloadAssetReference();
yield return new WaitForSeconds(4);
StartCoroutine(AutoLoadAndUnloadToTest());
}
private void LoadAssetReference()
{
if (assetReference != null)
{
asyncOperationHandle = Addressables.LoadAssetAsync<GameObject>(assetReference);
asyncOperationHandle.Completed += OnAssetLoaded;
}
}
private void UnloadAssetReference()
{
if (asyncOperationHandle.IsValid())
{
Addressables.Release(asyncOperationHandle);
}
}
If using AssetReference you are meant to call the functions on that instance to load it:
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/api/UnityEngine.AddressableAssets.AssetReference.LoadAssetAsync.html
Thanks for your reply. Can you elaborate more on this? Not quite sure, whats wrong on my script
well in your example you may be using the asset reference as a key which is just wrong
But isnt that how its meant to be? Using the AssetReference from addressables namespace to reference the asset in the group?
if you use an AssetReference object then you load its held asset from that instance
AssetReference myAssetRef;
//...
Sprite asset = await myAssetRef.LoadAssetAsync<Sprite>();
otherwise you can load an asset with its address via:
Addressables.LoadAssetAsync<GameObject>("MyCoolAddress");
you are trying to do something weird and wrong
Oh, so you mean, the assetreference will not be converted to its address by passing it?
no so do what I just showed above
Because it is actually loading it and showing it and also unloading it
Okay, Im on it trying your suggestion , thanks a lot
then unity must have handling for this but its not the intended solution
read the documentation if you dont trust me 😆
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/LoadingAssetReferences.html
Haha no no, I trust you, was just wondering, why it worked with all the addressable calls still 😄
seems like I mixed up address loading with the actual reference part 😄 Lets see, how xcode tracks the memory now 🙂
use the unity memory profiler instead
I do, but firing a snapshot every now an then is semi convenient and not always the best representation of the actual device. I am using this for larger amounts, this is just a quick test to get the issue fixed 🙂
Still piling up:
releasing the handle is the correct way. Btw you can use the profiler and track current handle counts for loaded addressables
(normal profiler)
yeh, when its unloaded in editor, the addressable profiler also shows no entry, but still, memory is piling up for no reason. I am confused 😄
all good there from unitys logs at least
Lets up to the latest 2.7.3 version, maybe there is a fix for something
Also, everytime unloading, this is being fired in xcode:
Oh my, has 1 polyspatial ref... somehow I am scared, it is indeed a visionos bug
You can profile on a dev build as long as you have the build report (to allow the addressable part to work)
but anyway if you use the memory profiler and take 2 snapshots and compare you can tell what actually changed with more detail
So, I connected the profiler and I can see, that addressables are being loaded and unloaded (at least the view says so), but on everyload, it increases memory
So thats why you use the memory profiler to find what changed over time. You can try explicitly calling GC to see if it helps but you should not look at external memory profilers only because unity will grow the space for the managed heap but will rarely decrease it.
The unity memory profiler will actually tell you whats in use and whats un used space.
Seems like something is piling up in untracked memory
Then may be some native lib used by your app
But it happens only when loading and unloading the addressable. Nothing else is happening. Thats why I assume, its some unity package causing this issue or some visionOS bug.
VisionOS is just android (right?) but unity should track addressable loading correctly. Double check what this loaded asset is potentially doing and follow the doc pages on how to handle/debug memory leaks. Best advice I can offer
visionOS is apple
Thanks for your insights! I will try to dig deeper into the profiler and hopefully find the issue or an update of some kind. Will also get in touch with unity support and apple support I guess, to give them an example project
Oh right mb I got confused with oculus and you mentioned xcode 😂
Apple probably isn't going to help unless you can demonstrate one of their libraries has a leak
Yeh, I got some connections to get in contact, so fingers crossed, they got time to investigate or at least point me somewhere.
when i try to build i get this
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)
SBP ErrorException
UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Addressable content build failure (duration : 0:00:00.01)
UnityEditor.GenericMenu:CatchMenu (object,string[],int)```
Hi, is it ok to ask about AssetBundles here?
I am having an issue where our bundling project exports some assetBundles with Universal Render Pipeline/Lit shader, but this is stripped from our app project at build.
I can't set it to always include this built in shader because Unity screams at me about too many variants, and there has to be a way without indlucing a dummy scene that includes dummy objects. No?
If stripped from your build it's because nothing in it uses it. Adding it to always include is a bad idea as the total variants will be crazy.
The shader should be in an asset bundle so what's the actual problem?
URP/Lit is a built-in shader, that could be why it's not shipping with the bundle
i also can't include built-in shaders in a shader-variant collection
It's not built in it's from a package
right, i still can't include it in an SVC though
it is quite normal to exclude assets from a project that utilizes AssetBundles/Addressables though, no?
because the whole idea is you fetch the bundles remotely, they aren't included with the build
Same with addressables but requires you to correctly organise assets and dependencies
I see, so I am assuming the problem is that for URP lit, it isn't shipping with my bundle, and my build won't include the exact variant i need without forcing it into my build somehow with a dummy scene or dummy object?
How do people get around this? Have an uber scene where they just dump variants and make sure users can never access this scene?
I'd happily correctly organise assets and dependencies, but what does that mean exactly? Are there articles or guides I can refer to?
It should be included in your bundle which confuses me. If you try adding urp lit to the same bundle does that help?
Addressables seems to manage this correctly and I've not had issues except with an older 2022 version that had a bug
Oof no it's not
(i have to, it's a company thing, tied to all the SaaS plugins and satellite companies etc)
It should work though I used addressables in 2021 and bundles as early as 2019
apparently "AssetBundles can’t ship new compiled variants, only the shader reference."
I presume the shader itself needs to be added and then the variants needed are built. You can access package contents if you have them unhidden in the project window
I use addressables and usually add common shades to the default group to avoid duplication
yeah, but I can't add Lit to AlwaysInclude section under Graphics, nor can I add it to a ShaderVariantGroup, so not sure what I'm meant to do with it
problem is not finding it in the packages folder, problem is what to do with it from there
or, what is the default group you're meaning?
no no add the shader file asset to an asset bundle
in addressables you can just mark it as addressable/add it to a group of your choice
You need to press the eye button thing to make it show all packages under the Packages \/ section
(project window)
Ah no, I already see all the packages, just Lit shader can't be dragged into stuff, SVC or AlwaysInclude, Unity won't let me
and I can't force-include it with the bundle because the interface to mark it with a bundle name won't show for package assets
I can duplicate it out of packages, and THAT I can assign a bundle name to
that wont help. guess addressables solved that issue for us
is it really not possible to just assign the asset to a bundle in the inspector?
no, Unity hides the bundle-name menu from the preview box for package assets
Addressables do seem to be the evolution of AssetBundles, so that we are still using bundles seems to be one thing riding against me here, the other being I'm in Unity 2021.
Still I thought there should be a straightforward way
Perhaps in code it can be done but seems a bit much to make this work. Pretty sure I have automated asset bundle setup that way before
Im lucky this was just for a feature test, I don't actually need the shader included at all, just annoying it was coming up pink.
In our company's main app we have URP shaders appearing fine, nobody I ask seems to know why though 😛
but what I've been doing is in a bundle project I setup from scratch for isolated testing, so this URP Lit confusion from me has not been a mandatory solve, just something I'm curious about
Hmm well I'd always suggest trying to use addressables instead if you can but does mean you have to load via that to get the most benefit
For a different project maybe, our company is hundreds of people and I am nowhere near as far up the ladder as I'd need to be to influence decisions there
plus it's been a few years, the way the app works at this stage is just how it works
I solved the actual problem I was trying to solve though, which was including Unity Visual Scripting in the app project without stripping anything during build. Seeing as we bundle to cloud from a separate project so it never sees any of our graphs and on its own doesn't know what not to strip
I feel like I understand less but sounds like it's okay so let's leave it there 🙂
I'm having a issue where I'm unable to instantiate a prefab using addressable in additive scene, but it works perfectly if that scene is the only one loaded .
It works even if i instantiate it once in main scene and then again in additive scene but it doesnt work if it instantiate only in additive scene .
Are you using InstantiateAsync() or loading the prefab asset? I dont see any reason why this would act this way
no
_agentInstance = Instantiate(_agentInstance, _agentParent);
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
internal class LoadAddress : MonoBehaviour
{
public AssetReference assetReference;
private AsyncOperationHandle<GameObject> _opHandle;
private IEnumerator Start()
{
if (assetReference == null || !assetReference.RuntimeKeyIsValid())
{
Debug.LogError("[LoadAddress] AssetReference is null or invalid.");
yield break;
}
_opHandle = assetReference.LoadAssetAsync<GameObject>();
yield return _opHandle;
if (_opHandle.Status == AsyncOperationStatus.Succeeded)
{
GameObject obj = _opHandle.Result;
Instantiate(obj, transform);
}
else
{
Debug.LogError("[LoadAddress] Failed to load asset: " + assetReference.RuntimeKey);
}
}
private void OnDestroy()
{
if (_opHandle.IsValid())
{
Addressables.Release(_opHandle);
}
}
}
even this only works in first scene not additive scene
works fine on editor
Yea i dont see anything wrong here
i was wondering if it is possible to convert AsyncOperationHandle to AsyncOperation?
Why? You can await them with UniTask if that helps
I know you asked this 4 years ago, but did you solve? 😄
Same issue, only on iOS addressables build though. Have no clue what to do, the error doesn't tell anything useful.
What unity version? You can get unhelpful generic errors for a few things, including when you have multiple entries in groups for 1 asset.
Yes I did solve it. How? Not a fucking clue 🙂
6000.0.55f1
Don't have multiple entries for 1 asset. My error is iOS exclusive by the way, so I think the configuration of addressables should be good.
if you build content in editor for iOS do you get any other information or just that generic error?
let me give you the full log (but it's very short, almost like that person has)
`
Exception has been thrown by the target of an invocation.
UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/GenericMenu.cs:154)
Addressable content build failure (duration : 0:00:00)
UnityEditor.GenericMenu:CatchMenu (object,string[],int) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/GenericMenu.cs:154)
`
When I had this happen before was during a merge in git so it just took checking what the merged did and removing the funny group entries
hmm yea nothing useful at all 😐
I changed so much, that I don't know what could cause it 😄
I'm migrating from unity 2023 to unity 6, had to change a lot just to make the player build work 😄
Will try to figure something out
So the last git commit is very different 😄
try disabling some groups from being included in build to narrow down the cause
Tbh this issue REALLY NEEDS to be fixed
Hello Unity devs who work on addressables please improve these shit error messages thanks 👋
Addressables could be soo much better if it didnt need to use asset bundles (which have many flaws)
I found the problem 😄
Because I updated Firebase, there was a new .dll file.
My MacOS didn't trust it and put it into some category of unknown developers, basically like the file could contain malware.
I whitelisted it in OS security settings and all is good now
I still don't know why build for android worked though, but at least all works now
Thanks apple. Glad it's fixed
So i resolved the problem i had but basically it was something to do with the loadingSceneAsync of mirror networking but I now use a variable that uses the asyncperationHandle instead of asyncoperation
So question. I have a scene I am loading in, but not activating, and then I quit playmode before it is loaded in. However I am seeing error logs from my components in that scene, specifically from OnEnabled. Does Unity activate the scene befor unloading it?
i just downloaded my friends unity file and i kept getting errors like these. Im really a beginner but im doing it for school (ill learn a lot if you help me 🙂
the last 2 are the source of the problems i think
i mean the yellows ones i think i can fix those but the red problems i really dont know
i can still download the file again
but it will have the same problems
wrong channel for generic project troubleshooting
where is the channel?\
ty
#1416831106803826850 if anyone knows anything about this please answer there 😄
Hi anyone here knows why the image in the "Scene" panel is not the same as the image in the "Game" panel
I've been stuck on this for an hour
- Not really related to addressables
- Its using a particle material which i presume already has a texture assigned and this may not be compatible with ugui
you should be using ugui shaders only

Hi
I got a problem, how the runtimekey work ? With an assetreference ? When I define it in a SO and use it value with runtimekey , it give me the meta of unity, not the address i defined in the adress
When using asset reference, it holds the key inside and you can load the assets via the functions on asset reference.
Runtime key is not guaranteed to be there because it's optional for them to be included by a group.
So if you use asset reference then just load the asset correctly

the problem isn't loading the problem but how i manage the all ressource
the preload use the label so I get the address with the IRessource
but when other need to ask a resource, it give the assetguid
Yea because the guid is always valid to load an asset
You should not use asset reference if you need to get the runtime key, it's there to let you ref and load some addressable with ease
What you say sounds like you are just abusing it
oh i wanted to use the guid as key to search an already loaded ressource
but the preload i use the primarykey that i get with Addressables.LoadResourceLocationsAsync
!code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
public async Task LoadAssetLabel<T>(string label) where T : UnityEngine.Object
{
// Get Location
var locHandle = Addressables.LoadResourceLocationsAsync(label, typeof(T));
await locHandle.Task;
if (locHandle.Status != AsyncOperationStatus.Succeeded)
{
CustomLogger.LogError($"Failed to get locations for label {label}");
return;
}
foreach (var location in locHandle.Result)
{
if (!IsAssetLoaded(location.PrimaryKey))
{
await PersonalLoadAsset<T>(location.PrimaryKey);
}
}
Addressables.Release(locHandle);
}
is there better ways loading this ? other than using the primarykey
I am confused. A label works well to load multiple assets yes
Not great though to load one at a time by awaiting each. Ideally you load them all using addressables or load and await all them as tasks via UniTask
A resource location is not an asset reference so I don't get what you actually had issue with
@fathom compass
haha i just saw the UniTask in the unity talk
the problem is I keep the key as reference in a dict
private readonly Dictionary<string, AsyncOperationHandle> _loadedAssets = new();
for already loaded object so during the game I don't have to load every again
but the problem is I mixed the guid (unity) and the address we set in the inspector
You can keep the actual object and not the op handle btw
But there isn't much benefit in loading an asset and keeping it loaded longer than needed.
Then you miss out on auto unloading
Just load and release via addressables everywhere
I made this system for that and prevent memory overload but my friend tell me as it is only the beginning of the projet, i can just load everything
If you load things and leave them loaded in then it uses MORE memory
Addressables tracks users so when user counts goes to 0 it unloads stuff
ahh
You can use the profiler to even check this stuff

If you build addressables to have an updated build report and then use the profiler it will show the current users of assets
This helps you track when you forget to release stuff
Because you WANT to so things can be unloaded
The docs explain this all
It's sometimes required for us to load stuff ahead of time and keep it loaded (if used a lot) but for other stuff you should load and release via addressables to get the most benefit
Otherwise textures and other large assets build up in memory
yeah i know it, but for a small projet it is not necessary (what my friend said) so I just changed it into keeping a stuff loading that all
but fine, thx for that I just swapped and write my address if i can't use assetreference
Well this problem demonstrates why it's not a good idea to do what you are
You can just reference the asset directly if a direct dependency is okay
Your previous code is correct to load assets that have a label
you said I don't have to wait
like i can remove the await here ?
foreach (var location in locHandle.Result)
{
if (!IsAssetLoaded(location.PrimaryKey))
{
await PersonalLoadAsset<T>(location.PrimaryKey);
```?
oh I succeed
yay
you would put the returned task/operation object into a list and await them all at once using something like UniTask.WhenAll()
I will change it thx
UniTask does make this easier because it has many good extensions for addressables
But the concept is what matters, its better to start many loads at once and await them all completing.
oh before i am using task but when I saw unitask in unity talk (1hour ago) i swapped into it haha
yea unitask and awaitable are better suited to unity. UniTask implements many things that Task has so its a nicer replacement
Hey everyone. I am kind of newbie to Addressables. So i have few questions. I want to make Asset bundles using Addressables and then i want to publish those asset bundles to Google Play Asset Delivery & iOS Store. Can i do that. I Don't want to put it on Unity Server or any other paid server services.
There is a special package for asset delivery but I have no idea if the ios app store offers something similar
https://docs.unity3d.com/Packages/com.unity.addressables.android@1.0/manual/index.html
Otherwise it would be hosting it yourself
we dont discuss modding in this server per #📖┃code-of-conduct
I am confused about why an asset is staying loaded in memory, the asset has been released, has 0 handles, and the asset load mode is “Requested Assets And Dependencies”. Even after calling unloadunusedassets it stays loaded
I don’t think anything has this asset as a dependency either, it’s just a ui texture
If its a spritesheet then another sprite that is on this texture may be in use still?
Are you using the profiler to track asset users?
I don’t think it’s on a sprite sheet no…
Yes using the addressables extension of the profiler
well with addressables we dont need to use unload unused from resources (may not even work) so it must be required still
you can try to use the memory profiler to find why
Oh wait what I think I just fixed it… by setting the background texture that used to have the texture to null then using unloadunusedassets
Weird I thought releasing the texture and calling unloadunusedassets would have been enough to unload it but does keeping a texture in a visual element backgroundImage keep it in memory?
addressables just tracks users and dependencies so as long as things get released it will unload when able
Hi
Well thanks for your help
Maybe visualelement backgroundImage keeps addressables handles alive?
no, you miss understand
It doesnt care about that. If you load a texture via addressables directly or its loaded as a dependency, that is tracked.
When its user count internally goes back to 0, it can unload the texture
so as long as things get released when no longer used things get unloaded correctly
I do understand that, but it’s just really weird because the only changes I made to the code were to set the backgroundImage to null and only after making that change did the texture stop showing up in the memory profile after calling Unloadunusedassets
Okay maybe I understand actually, unloadunusedassets wasn’t considering that texture before because it was referenced by a visual element
yea that looks at current users in scenes and some other places to figure out if something is used.
addressables does not
but you have essentially bypassed solving it correctly which may have adverse results
Thank You I will try that
Hello, I have marked my scene as an addressable and I'm starting my game water's shader is being stripped (idk if that's the right word but water is pink)
it cant be stripped in editor so perhaps the shader cannot even compile successfully
No I'm using the addressable's simulate groups feature
It works fine in editor if I play normally
were bundles built for the correct platform?
I think so
If the shader was added to the group there is a chance that all variants were stripped if no users could be detected
is the shader used by a material in this scene already or do you spawn things at runtime?
The object is in scene already but I'm not sure if it's being respawned at runtime (the water system is from an external package)
Gaia to be specific
If gaia has materials it uses you can try adding those to a group too
And it looks like the grass and other shaders are working fine
Only water is missing
Or use a shader variant collection to ensure the required variant is kept https://docs.unity3d.com/6000.2/Documentation/Manual/shader-variant-collections.html
Ive never used gaia so does me no good
Add em, re build and test again
you can check your editor logs to see whats happening with shader variant stripping
Hmm ok
Basically even if a shader is going to be included, if no uses of a variant can be found, its stripped.
Why? shaders can have a few variants to many thousands so we must not build variants we dont need to keep build times reasonable
Yoooo,
Does this Unity 6.3b feature mean all web requests on Windows can now use HTTP/2 features (and therefore download lots of remote bundles without opening a single HTTP/1 connection per download)??
Windows: Enabled HTTP/2 functionality on Windows, including optimal HTTP/2 settings.
(Well not just Windows, but all desktop platforms and Android and a couple more niche ones [Kepler and QNX])
I think libcurl is used on windows too so I have no idea
Depends on support in curl id say
Hello, so I added the water variant to the graphic settings, as well as created the shader variants for it, it's still pink after the build
Editor logs
Windows: %LOCALAPPDATA%\Unity\Editor\Editor.log
MacOS: ~/Library/Logs/Unity/Editor.log
Linux: ~/.config/unity3d/Editor.log
Unity Hub
Windows: %UserProfile%\AppData\Roaming\UnityHub\logs
Mac: ~/Library/Application support/UnityHub/logs
Linux: ~/.config/UnityHub/logs
- Marked my scenes as addressables
- added shader in the graphic settings
- saved as shader variants
- built the game
Ok one sec
dont use graphics settings always include as that wont affect asset bundles
Oh that was because this guy was also having same issue
Just followed the screenshot
addressables and asset bundles work differently
thats why you need to use a shader variant collection and include THAT in an addressable group
or a material already set up correctly for the shader
Why? asset bundles can only reference things in other bundles (critical flaw imo)
I need to mark my shader variants as addressable?
*shader variant collection
I'm not using asset bundle btw
or a material using the shader that is setup correctly
Just addressables
addressables uses asset bundles so you technically are
Ohh and also what am I supposed to search there? I looked up the name of my shader and it was showing as "compiling water shader"
I know for full game builds it will list all shaders and state how many variants it plans to compile in steps
Well in editor log it did show all the water shaders as "compiling" and "compilation finished"
It looks like this:
Compiling shader "Shader Graphs/glTF-pbrMetallicRoughness" pass "Universal Forward" (vp)
Full variant space: 754974720
After settings filtering: 49152
After built-in stripping: 768
After scriptable stripping: 256
Processed in 0.01 seconds
starting compilation...
finished in 21.05 seconds. Local cache hits 0 (0.00s CPU time), remote cache hits 0 (0.00s CPU time), compiled 256 variants (166.95s CPU time), skipped 0 variants
Prepared data for serialisation in 0.01s
anyway this is to check if any variants were included, its possible some are but not the ones needed by you
It does show something like this but compiled variants count shows 0, although skipped ones also shows 0
Showing my variant collection asset
Then if its 0 you know that shader is not included AT ALL
Don't know if it's set up properly or not, one sec
what variants exist in a shader is unique to it so having a material exactly configured that you mark as addressable is easier.
you add the revent shader in the asset
or as i said, have a correctly configured material for this water shader marked as addressable (so unity will build the shader variant for this guaranteed)
hmm ok
Hmm so I think I know what's happening , i analysed the scene and it's dependency in addressable window, and it was not showing the water shader in one of the dependencies in it, so I guess I need to load it manually?
We went over this already, that is why this is happening...
Gaia may be using the shader only In code so there is no direct dependency.
That is why the above stuff needs to be done
Yea sorry I know I'm bit slow here 
I did mark the used materials as addressables, but it still doesn't load automatically when scene loads
So maybe I need to load them manually
Ooo or wait would adding a disabled gameobject in the scene that uses the same material, that should work right?
It should be marked as one of the dependencies
Yea that would make the scene depend on the shader AND the variants used in it
Perhaps you can check what Gaia is even doing to make/load this material anyway
Ideally I would love to, but boss is on my ass and needs the build by the evening so not possible to study the code right now
Have to make do with work arounds for now
Just search for the shader name in the codebase
Understanding what a shader variant is and why unused ones are stripped will help with this and future issues
Yeah you're right, as soon as the it's working that's the first thing I'll do
When you see how many variants some shaders have then you understand. E.g. urp lit has like 10 million + or something crazy
Jesus christ

It's because of how when a new keyword is added you need variants for every possible combination so it grows very quickly
https://docs.unity3d.com/6000.2/Documentation/Manual/shader-variants.html
Hence stripping is done to keep what's needed only
Yay congratulations
CONGRATULATIONS 🎊
Im just confused why any shader i write myself is fine, but why built in shader has such trouble.
I understand about variants, but i thought that variant would just be shipped with the addressable or bundle
Same as any other shader the app hasn't encountered before
I gave up trying to support URP/lit in my test project. It's just a forbidden shader now lol
Your own shader probably has 1 variant if you arent using keywords. The provided standard/urp/hdrp shaders have many as they do many things.
You just have to make sure the materials with the correct settings are included with addressables to avoid missing shader problems later.
If you make materials in code only then thats when problems arise and you need additional steps to solve the problem.
I absolutely did exactly as you just said and still got the pink missing-shader on the other end, hence I gave up
I mean, it's not really optional, if you export an assetbundle, it takes materials and shader with it. There's not really an option to exclude those things, so I can't be exporting assetbundles incorrectly. And outside of always-include and shader-variant collections (both of which don't work with URP Lit), I see no other ways to include variants of URP Lit in the build.
Am not making any materials in code
There has to be some very special thing people do with their app build to make URP Lit work with AssetBundles
I am sortof wondering if Addressables aren't just superior in this regard, or possibly because I'm using Unity 2021
always include doesnt work for addressables because asset bundles cannot reference anything that isnt in another bundle or its self.
Urp works just fine, the only time renderer pipelines had an issue was a bug with shader stripping ages ago in some older 2022 version which has been fixed for ages.
You should either upgrade to the latest 2021 version avaliable OR go to 2022 or unity 6
the latest version usable without other licenses
ah so there was a stripping bug a long time ago. That could be why. We are not on the latest 2021 version and I don't really have control over that
ty anyways
If its causing issues like this then seems like a valid reason to update to the latest 2021 version you can
tip about shaders and addressables/asset bundles:
I build lots of bundles that are not manually placed in a scene. Meaning, I build them to be dynamically added to the scene at runtime and have a constant growing library of new ones I am adding over time.
Since Unity relies on scene settings and realtime lights, etc. to determine what shader variants to use, that means I have to first programmatically spawn a sphere for each one of my materials, place them in a scene that has all of my lighting settings, and then move a camera through that scene and spin it around as it moves so that gathers all the shader variants it sees. I do this at editor time while in play mode.
If you have many scenes that your bundles could possibly appear in that all have different lighting settings, then you would need to do it for those scenes too potentially (if they are showing up as pink in those scenes).
Then I have a shader variant collection that is not missing anything and can build proper shaders without missing any keyword combinations.
that is crazy and I don't think is required at all 😆
it is, but technically doing every material probably isn't necessary, but when you have over 2,000+ props that use 800+ materials it's easier to just add them all and assume some of them are using shader features that are edge cases (as sometimes a keyword might be toggled on or off with a checkbox or something).
if you don't do this, Unity doesn't know your shader needs a feature the scene you are trying to spawn it in wants
how could it? the addressables I am building aren't in the scene yet, after all.
(I should mention I am loading the addressables from an external catalog at runtime, they aren't being built with the game or anything like that)
You add the material and or prefab to an addressable group so unity knows it's required
You are overthinking this
It's not dumb, if a prefab depends on a material, and this depends on a shader variant it will be included
i'm not talking about anyone else's previous issue specifically
if you just build a prefab without it being in any scene in Unity, and that scene requires specific shader keywords, the addressable build will not include them because it doesn't know it needs to
You are not understanding addressables then
i think you are not understanding addressables
Scene build list and resources are the two ways to have assets be included in a build
For addressables its if an asset is marked as addressable
The two systems do not mix because asset bundles cannot ref things in the build, ONLY in that same bundle or other bundles.
we're saying the same thing, but you're saying that my prefab (which is not inside of any scene) will know what shader keywords to include
and I am saying it will not
I know from experience
you can get lucky and there will be no problem, but you also can get unlucky. it really depends on how complex your keyword combinations get.
Light related stripping is related to scenes but you can tell unity to keep both to solve the issue
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/BuildingShaders.html
i tried this and it did not work
but I acknowledge the documentation does say that
I can't say why it didn't work, just that it did not (for me)
the only thing that did work was creating this massive shader variant collection and telling Addressables to reference it during the build
I do acknowledge that it can be super annoying at times and tbh I think its all down to the massive flaws that asset bundles have .
Yes the shader variant asset is a reliable way to also ensure variants are included.
(I am also doing Entity Graphics rendering, which has a lot of special keywords)
I'm not exactly sure which combinations were missing for me for so long
also I hate the UI for shader variant collections
Ah I have not used entity graphics with it but I can imagine its worse
I'm not certain entity graphics is to blame, I think I was running into this before switching to it as well
i'm convinced it was lighting data being stripped, as you suggested with your link
but for anyone who is going nuts with pink shaders and their addressables, the nuclear option is this message I am replying to
gather all the variants yourself and it should work then, at least it did for me
I don't know how many people use Addressables like I do, though
there's so many different ways to make and use them
I believe using GPU Resident Drawer uses the same or similar keywords as Entity Graphics, btw, for people who use that
(it's quite good, highly recommend GPU Resident Drawer if you can use it)
realtime and baked light will have their own variants so it should contribute
unlit is simpler as we do not have lights to consider
yeah I assume unlit is immune to these problems
but I'm not certain
you were right to say that just including materials and shaders in an addressable build does bring along a lot of the right keyword combinations, just not necessarily all of them if you are someone who still runs into issues of pink shaders
I usually had the before mentioned settings changed as well as a light in a scene already so perhaps that was enough
I keep getting the same error for loading my addressables during a cloud build:
[Error] OperationException : CheckCatalogsOperation failed with the following errors:
RemoteProviderException : TextDataProvider : unable to load from url :
"My Bucket URL"
UnityWebRequest result : ProtocolError : HTTP/1.1 400 Bad Request
This error doesn't happen on a regular build, only on a cloud build. And I have no idea why.
Looks like you never input a real URL in your profiles for remote loading.
It shows the URL was "My Bucket URL"
Which is very wrong and a placeholder
No There is a URL there, I just removed it since i thought potentially it could be sensitive info idk
Its pointing to my bucket URL
It works fine on a regular build. Its just on a cloud build where it doesnt work
ah well that wasn't clear
I can only presume some authorisation is required for this request,~~ Im not familiar what CheckCatalogsOperation even does (is this to upload it or get it?)~~
Im more confused, why is this happening during a build
Sorry, It happens in my loading screen from my cloud build, CheckCatalogsOperation supposedly checks for updates. I have a similar project where I've succesfully managed a cloud build and im trying to compare the two to see why one works and one doesnt. The only difference i found is that this was UNCHECKED on the working project, But CHECKED on the unworking project. Which makes no sense to me since they both are using CCD. And the working project Ive tested with other people downloading the cloud build and it works fine, Even when I make updates it works find for them. For some reason the unworking project is causing issues and I'm unsure why.
So It could be to do with authorisation to be honest, but I'm not sure what to do about it. I did notice the unworking project is prompting me to a security risk on windows, and the working project doesnt do this. It could however be due to the inclusion of sockets/webrequests in the unworking project but again im not sure
I presume that is the windows firewall popup and is for sockets.
To my knowledge unity ccd should not need any special headers to download content (you can test by accessing the url in a browser)
Are you using the special CCD paths in your profile? https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/ccd-configure.html
No I'm using the automatic path from the CCD package
Hmm I have no idea why it would suddenly change when using cloud build (unless it is altering some settings before building)
Ive only worked with s3 with addressables myself
It sometimes also happens on a regular build, but not always
But if i do a fresh CCD build then build the client it works fine
I wonder if the files are just missing but id expect 404 then
Im getting a 404
Oh no sorry its just a 400 all round
Is there a way to refresh addressables Like refresh the package from scratch. Can i just remove the package and put it back in?
I think this is not practical in an enterprise. Some of this advice works fine when you're an indie with complete control over the project and pipeline.
but very hard to have a scene that contains every possible variant when your studio is remote/distributed
btw, you describe how in your case bundles are added dynamically, forgive me i am learning about this stuff, but I thought this is normal for assetBundles/addressables, that their purpose is for pipelines where the assets aren't present in the build
i can't imagine a scene that has every possible variant of a URP Lit material lol
more often than not though, with addressables, I thought one of the points is that the core app project can be completely oblivious to the assets it might one day load
Well things have to be addressable to be loadable via the system, a prefabs dependencies are included anyway so the only point of adding a material explicitly is if you do want to load that or ensure certain variants are "in use"
As I have found, this is only really possible when shader has a limited number of variants
well that doesnt matter, we only care about variants we want to use
it's just not always knowable by those who are creating the bundles for the app
nor the maintainers of the app
Most normal use will be fine (e.g. someone makes some prefab and makes it addressable)
I have a possibly dumb question. What does normal use for addressables/assetBundles look like? I've only worked for 2 companies that use them so far, and in both cases it has been a decentralized workflow where production lines produce 3D assets for small, generic experiences. Viewing content in AR for promotional purposes, or viewing collectible NFTs.
How else are they used? Are people using assetbundles/addressables for online games similar to like FIFA, CoD, Fortnite etc?
just, from my experience so far, the people producing asset bundles are MILES apart from the people who maintain the app/build and barely have passages available to communicate their requirements to each other
which is what I have begun to think addressables were for, if I was to make an app that already had content in the build, it sounds to me like it defeats the decentralized quality that assetbundles bring to the table
I used it for all asset loading tasks. Originally it was because you can easily have remotely hosted content with addressables.
Its easy to make something addressable and its simpler to configure an address to some asset in some configuration.
So lends itself well to online games?
no, its useful for local asset loading but also having remotly hosted content that you want to be able to update at anytime or just have the user download later
or you mean even mostly offline singleplayer games can benefit too by perhaps only loading content needed for where the player is up to
like no need to load volcano assets for the app if the player is on the underwater level
erm no
keep build-size down
its when build size is an issue yes (common with mobile games)
right so you might update tank-skins for a tactics game at any point in the future, and you'd like to do so without players needing to grab a full app update
well most good platforms like steam do partial updates so its not always better but yea you can alter content in remote bundles without needing a new game build
ok, just thinking how i might apply these to more centralized projects. I have an indie game that could make use of it
Asset bundles are very old, and addressables are about...seven-ish years old?
Asset bundles were originally for keeping mobile app store download sizes down, yes.
They were only able to be built using scripts for years and years.
Addressables eventually shows up on the scene and gives it settings and a UI and such.
I think the most "normal" use of addressables is creating one big bundle/catalog with everything your game has in it when you first launch.
And then later, creating one big bundle/catalog for each DLC or content patch you release that only contains those assets and nothing from the original big bundle.
I see in a later post you talk about communication problems. And I agree. If you have a big organization with teams making lots of new scenes with new lighting configurations and not telling anyone this would be a bear to keep up with.
But, a lot of it could be automated from a continuous integration build tool (github actions, Jenkins, etc.) and how you set your project up.
"oh a new scene was committed. Time to run the shader variant gathering script and rebuild the shader variant collection if it has new keyword combination entries we have never seen before"
As an example.
You should make use of groups where it makes sense (especially when you have remote groups)
ty for explaining all that. Though to show my ignorance, even though apps always start with this initial download the first time you open them, I never understood making the initial content a download from within the app.
If the goal is to make the app size smaller, isn't that completely negated by the fact the app has to download and cache assets when it first loads anyway? All it does it make the app look smaller on the app store, in practice it's still a big app.
The point is that you can defer this till later, the user may never encounter this content or may want to use it very soon.
Its up to you to judge and potentially warn the user about a possible download (what I have done in the past)
yes, the point is to "get the customer in the door and into the lobby" ASAP where they are more likely to stick around
also, early app store days may have had strict app size requirements, unsure. And mobile internet really sucked back then.
I've never released anything on the app store myself, so don't know all the requirements
but iOS basically dictated how it all worked since most paying customers were there
Does someone answer a couple of questions about CCD for me?
Does it need to create a new bucket for each device? I.e. android, windows, IOS?
If so, do I then need to make a fresh build to CCD for each device?
If so so, Is there a way to automate this process when I do a regular build, or only via cloud build?
@broken wolf No separate buckets needed per device. One bucket works for all platforms.
No fresh builds per device. Build once, all platforms use the same CCD content.
Automation options:
Unity Cloud Build (easiest)
CCD CLI in CI/CD pipelines
Custom editor scripts
Build once -> upload to CCD -> all devices can access.
So how come when I switch to android platform and build to CCD, it automatically creates a new bucket, it still has the same project ID but it's under android, and the other bucket is standalone windows.
Also when I try and load the data, if I didn't build to CCD from the Android version, I get an error 400 bad request, or sometimes error 404.
@next hedge Like this
Unity creates platform-specific buckets automatically even though you don't need to.
Error 400/404 happens because:
Android can only see the android bucket
Windows can only see the windows bucket
If you only build for one platform, others get errors
How can i unify them?
Build Addressables for each target platform, or use CCD management to copy between platform buckets.
"or use CCD management to copy between platform buckets." Yea this part, how do i go about doing this.
Web Dashboard:
Go to CCD → Find bucket → "Promote" to other platforms
CLI:
ccd management copy-bucket --source WINDOWS_BUCKET --dest ANDROID_BUCKET
API:
ManagementSdk.PromoteBucketAsync(sourceId, destId);
Dashboard = easiest.
Hi guys, I need some help, I'm struggling to have remote addressables up and running 🙁
I configured a remote group, generated the .hash, .bin and .bundle files, uploaded to my server, downloaded it (calling the url manually) but I cannot see my asset changing.
What I'm doing:
- I have a Ferrari model (just an example) and it's marked as an addressable.
- Then I go to Addressables Groups -> Build -> New Build -> Default build script.
- It generates the catalog_0.0.1.bin, catalog_0.0.1.hash, and some *.bundle files.
- I send all of them to my API server and they are available on the internet.
- I generate an Android Build, install the .apk on my smartphone.
- I open up the game and I can see the Ferrari in the game, cool.
- Go to Unity, replace the Ferrari by a Porsche (keep the same address and name, I only replace the file using Windows Explorer).
- Then I go to Addressables Groups -> Build -> Update a Previous Build.
- Grab the new catalog_0.0.1.bin, catalog_0.0.1.hash, and some *.bundle files and replace all of them in my API server.
- Open the game and I still see the Ferrari and not the Porsche 🙁
Why is this happening? Any clue?
If you need more info, let me know. I've also tried million different stuff, e.g., bumping the version from 0.0.1 to 0.0.2, changing the bundle mode to pack separately, clearing the build cache.
I'm using the Addressables version 2.7.4
Thank you!
I also tried this code below, it always goes to the [BootstrapManager] No catalog updates found., even though if I open the .hash file the hash value is different from the previous .hash file.
private IEnumerator InitializeAddressablesAsync()
{
Debug.Log("[BootstrapManager] Initializing Addressables...");
var initHandle = Addressables.InitializeAsync();
yield return initHandle;
Debug.Log("[BootstrapManager] Checking for catalog updates.");
var updateHandle = Addressables.CheckForCatalogUpdates(false);
yield return updateHandle;
if (updateHandle.Status == AsyncOperationStatus.Succeeded && updateHandle.Result != null && updateHandle.Result.Count > 0)
{
Debug.Log($"[BootstrapManager] Found {updateHandle.Result.Count} catalog(s) to update...");
var updateCatalogs = Addressables.UpdateCatalogs(updateHandle.Result);
yield return updateCatalogs;
Debug.Log("[BootstrapManager] Catalogs updated successfully!");
}
else
{
Debug.Log("[BootstrapManager] No catalog updates found.");
}
Addressables.Release(updateHandle);
}
It's probably that your game was not able to detect a new catalog. If you are using something like cloudfront then this needs invalidation
Hi rob, thanks for your reply 🙂
It's an asp.net API, it's fully custom, I've created it.
And I added some config to not cache it
Okay but all it needs to do is serve files so any web server will do
Did you restart the game to see if it downloaded the new catalog then?
Yes, I killed the process closing completely the game and opened it up again, many times
And you uploaded the catalog and catalog hash files with the bundles?
I've just download the hash in my API, this is the content 3676da828dd4900227b786a4ddec3bfd.
I changed the model in Unity again, clicked on Update previous build and now it generated this hash 272e6664f04cb40f5dc07f99cf895216
I can send this to the server and nothing is recognized on my app
yes, these are the files
now it's using timestamp because I removed the hardcoded 0.0.1 from addressable settings
The version has to be the same
So if it changed from what was in the build has it won't work
it has the same, I generated a new .apk to test with timestamp (I'm already desperate, trying to fix it for 4 days already)
But I can do it one more time, I'm gonna generate a new apk using 0.0.2 then
Access the hash file from a browser to verify what is being served is the latest
sure thing, one sec
it's serving the latest one
I'm gonna generate a new apk using the 0.0.2 name, it's more readable
Yea do that, then change something and re build + upload as v 0.0.2
I've just built the addressables for the first time using this settings (screenshot)
Addressables Group -> Build -> New Build -> Default Build Script
Generating the apk now
And the current .hash file
I didn't upload the hash, bin and bundles to the server on purpose to show that's trying to retrieve them from there.
I've just uploaded the files to the server (without changing anything yet) and these are the android logs now.
looks correct then
I've just replaced the files, what should I do now, "new build" or "Update previous build"?
can do "update previous" for this
New hash and the files
Replace everything in my server, right?
Still no updates found and the game is using the old model 😕
I'm gonna download the .hash from the server to check the content
Left: local one generated by Unity (my computer)
Right: downloaded from the server
🫠
Well currently it should be updating the catalog on addressables init so your log probably isnt going to help you
and it will init addressables anyway when first used so keep that in mind
ohh, I see. I was trying to implement a bootstrapper to download everything needed on the startup, to avoid downloading stuff when you're playing.
But I got stuck before, I cannot even update a single asset 🫠
Avoid downloading on fly, you see?
only the essential stuff, model, prefabs, textures used in the gameplay itself
You can do that but your provided code does not do this
not yet, I was trying to fix this issue I'm facing first
the provided code was an attempt to find where is the issue
okay well tbh im out of ideas now. Are you changing an addressable asset and trying to see this change in a build?
yes, I'm changing a .fbx
No problem, and thank you a million for your time and support, I really appreciate it 😄
you can test this all in editor too if you change the mode to "use existing bundles"
would require building addressable content for windows instead of android
also do double check you dont have Android and android or something else weird with casing
I can give it a shot, most likely tomorrow, but I'll let you know anyways
Hmm, I'm using Android case in Unity and in my server as well
My server
Unity
the web server file structure is what I mean here
It's Android with capitalized A
And the addressable profile
cool. remember most linux filesystems are case sensitive (i presume your web host is linux) so its worth thinking about
I'll double check, thanks for the tip 😉
I'm already having bad dreams with Addressables lol 😅
4 days struggling with this
I gotta go now, thanks a lot again @honest halo
I'll test your suggestion on Windows + Unity Editor tomorrow morning and give you a heads-up. Have a great rest of your day.
Hi @honest halo
Just to give you a heads-up, I quit Addressables and created a custom solution using only AssetBundles.
Thank you man!
Well that's one way to go about it but hope that works out okay.
I went the other way, I first did a custom system with asset bundles and in a later project used addressables instead.
Both use asset bundles anyway so they share the same problems too
I've just tested it here and it's working for my use case.
Yep, addressables is a layer on top of asset bundles, but my guess is that, might have a bug to recognize updated bundles or something like that.
I've found some people complaining about the same issue I reported and no solution
It's a critical feature so if you are very sure you should report it or open a tech support ticket if you have such a license
I've created a question on the Unity Forum, no replies yet
a post that I found
Found other posts as well, but no proper answer
Strange, it worked for me when I last used it. But I was aware of catching issues from cloudfront
I'm using the same server to serve the bundles and I kinda replicated the Addressables logic on my side (having a local manifest and server manifest file, comparing differences and hashes, and so on and so forth) and it works
So it's not a caching issue on my server side
it seems to be some logic issue in Addressables system
Odd but well it's either open a bug report or do nothing
Can someone explain what exactly the catalog.bin file is? Im trying to work with adressables to make a game with a bunch of DLC content, so I changed the path of the addressable group for each DLC but the catalog.bin still generated only once and in its old location. What exactly does it do?
the catalog holds all the information for where to find assets (their group and the bundle file)
there should only be one so thats normal
https://docs.unity3d.com/Packages/com.unity.addressables@2.6/manual/build-content-catalogs.html
so its what tells unity what prefab/scene/whatever has what name?
when you want to load something with an address/guid it uses it to know where the asset is
Otherwise it wont know what asset bundle an asset is in (and what other bundles have its dependencies)
@honest halo morning mate!
I solved my problem with Addressables, I think it was a misunderstanding on my part about how it works.
I had a prefab marked as addressable, e.g.:
- Car prefab: network object, network rigidbody, network animator, ...
- Visual model (.fbx): animator, mesh, armature, rigs
- UI: player name
My visual model was also marked as an addressable and I was replacing the .fbx and thought it was enough, but it is not! The solution is that, I keep the .fbx model as an addressable but now, in runtime, I have a script to instantiate the model as a child of the root object, this solved my problem. The addressable system cannot detect the changes in child objects (that's what I understood from this problem).
By the way, now I no longer need to update my own AssetBundle solution, which takes time 😛
Just a heads-up for you, since you helped me a lot.
If an addressable prefab depends on a model then changing the model asset or modifying the prefab works fine. I'm not sure what you mean by "child object", do you mean game object?
yes, I had a root gameobject containing the network components
a child game object which was the model
another child (UI text)
Now I add the model as a child at runtime.
If this prefab had a mesh renderer on a child gameobject then this should have worked just fine
I suspect something else was wrong but you arent able to explain this very well so lets leave it at that
Most likely, since you said you already had something like that working on your end. I wanted to understand, but I couldn't find any explanation, so yes, I'll leave as it is.
So, I got a show stopper bug thats completely breaking my team's ability to make our next release target. For some reason, when we build our linux server, our TarGz process is running into errors trying to process the local Addressable catalog (the one in StreamingAssets/aa). Specifically, I get a DirectoryNotFoundException: Could not find a part of the path "C:\Runner\temp\ANON\build\src\ANON\Builds\Client\LinuxServer\ANONBRANCH\LinuxServer\Server_Data\StreamingAssets\aa\Content\23afe60b606c705a9db12493ccf223c8_monoscripts_ce376555600b0674605d7e863583e51d.bundle" error and the targz that is built is corrupt. Like, proper corrupt. However, when I check the runner, these files and directories exist and are valid.
The TarGZ process is part of a PostBuild action, with a priority of 99999 (Should execute last)
Im completely stumped. Nothing I do seems to fix it, and we need to deliver a dev version Sunday. If anyone has any ideas, I will be eternally greatful. Till them Im going to keep trying more and more outlandish ideas to fix it.
Update: I think it may be caused by the actual Unity.SharpZipLib.GZip library running into max path issues
As the files exist on the disk and are not corrupt. Its only the zip step itself that fails
You could cheat and invoke tar as a process? I am puzzled why these bundles are in StreamingAssets as that is an odd choice
Does anyone know why there would be so much memory used by these addressables classes? There are a fewthousand bundles in the game but there are millions of these
Probably because there is 1.5 million of each? Do you have anywhere that somehow keeps resource locations?
I am keeping a dictionary for caching but there are only a few thousand entries in that... they are holding AssetReferences and AsyncOperationHandles however
caching what? if you load something then no need to cache things needlessly
you can release with the object ref itself so you dont have to keep the async op
Really you can release with just the plain Unity object?
oh, lookling at the source code Unity just uses a cache from object to AsyncOperationHandle...
Yea. Ideally you always load from addressables, use the assets and release when you are done with it
loading once and never releasing just wastes the ability for addressables to unload things from memory for us
yeah ,the cache is used to keep track and release when done with the handle, however I am confused about why loading a few thousand handles creates more than a million objects... something to do with dependencies maybe?
well after you have used resource locations then let them get GCd
I do remove them from the dictionary so hopefully they are GC'd after that
hopefully you can investigate here and see why they are still alive
usually you only need resource locations to avoid lookup work to load a large set of things later
e.g. get resource locations for tag, check potential download size, pre download/load now.
Thank you, I will continue to investigate
hahahaaa this account is a scam account
get this fool out of here.............
i need all unity mods to converge on this account immediately
@lone lynx Please don't spam the channel with off-topic. If you have something to report use modmail with evidence attached.
my bad
Is there a way to like link addressables between different projects? I would like too be able have it so project A can have an asset reference to an addressable that was created in project b.
If you load some other projects catalog at runtime then you can just use the guid/address to load something as normal @sturdy gust
I believe this is simply due to complex dependencies rather than any kind of memory leak. These all get loaded when I simple load ~1000 of a certain kind of assetreference
So I think I need to simplify the dependencies of these prefabs
Has anybody tried to load APV data from AssetBundles?
I have tried following this last part of the tutorial here -> https://docs.unity3d.com/Manual/urp/probevolumes-streaming.html
And have successfully disabled streaming assets
But it still seems to just silently drop any tries at loading them, even when I know that an AssetBundle containing them is definitely loaded up
When loading scenes async you do need to do LightProbes.TetrahedralizeAsync(); but not sure if thats relevent here
is there a way to build assets in addressables as different files like this (these are scriptable objects for example)
use multiple addressable groups or change the settings on a group to use more than 1 bundle (can be made to use a bundle per tag or one per asset)
but really this is the point of groups so do that
Hi, I am new to addressable and i am trying to store videoclips.
I cant seem to understand why the asset bundles fail to download on build.
What is your remote URL?
unity cdn
Looks like Invalid URI Invalid port specified.
That i already know. I dont understand why its occuring.
hi, anyone upgrade to Unity6 and suddenly the addressables builds are placing all assets into a single folder? In 2022, It would make one folder per group when I had multiple 'pack seperately' assets in that group, now I have one gigantic folder full of hundreds of files and can't seem to find anything on google or in the settings to make it behave like it did in 2022
I don't remember this happening in 2022 myself but does it matter?
If you have a group with "pack seperately" it will create a folder abd put all files in the folder for you. For sure it matters, I have 400 files so dumping in one root folder is horrible
Hmm I only used pack together and by tag and it didn't do this folder behaviour.
If you have unique bundle names I guess it can be a painful to clean out old ones?
Do I have to explicitly mark assets as Addressable and organize them in a group if I use AssetReference for each asset?
Rn I'm only marking the folder that contains them, but they don't seem to be marked. I guess I can still access them as depencies of the folder key, but I'm not sure which way is more efficient.
I’m planning to spawn each prefab randomly, so I likely don’t have to keep a reference of them all the time
They are addressable because you made the folder above explicitly addressable
The asset reference inspector will show if the ref is invalid or not. If its valid there it should work fine
Yeah, the references are valid. But I'm still confused as to why they are not marked as well. What are the differences?
It's because they are not explicitly set as addressable. They have an address and are included in a group however.
You can tick it and then alter the address if you want but it's not required
Hm, then I guess I will go with this. Thanks
Hi, switching from "Use Asset Database" to "Use Existing Build" makes my grass turn into black&white and all over the place. I demonstrate it shortly in this video: https://www.youtube.com/watch?v=Rb6jmgjJHVE It's a ShaderGraph shader, and the black and white is still "swaying". I tried too many things to list, none of it helped.
Switching from "Use Asset Database" to "Use Existing Build" makes my grass turn from normal to black and white and all over the screen.
Is it safe to Destroy() an instance then release its asset reference in OnDestroy()?
Should be but you don't need (and probably shouldn't) to destroy the asset, addressables will when all users release.
The instance in question is actually a child in another addressable instance. When I ReleaseInstance() the parent, it destroys the child instances as well. But I think the child references are still there and probably won't decrease the reference count properly.
If the child has an address it should work the same to my knowledge (unless you are talking about sprites in a spritesheet)
They are game object prefabs. Does that mean I still have to release the children individually?
Did you add sub assets to this prefab?
Maybe this is how its meant to work with sub assets and thus shows its a bad idea to do what you are doing
No, but that would likely be a future case
I wouldnt do this then
I believe prefabs do not handle this well, I remember freya mentioning it once 🤔
Aight, I will keep digging
I'm not sure how to look at this. The assets are loaded normally but there are no numbers.
the profiler requires a recent addressables content build (with build reports enabled)
Hello, after loaded scene with function Addressables.LoadSceneAsync(sceneKey, LoadSceneMode.Single, true, settings.loadPriority) then we have to use Addressables.UnloadSceneAsync(sceneKey, UnloadSceneOptions.UnloadAllEmbeddedSceneObjects); to unload and release handle/asset bundle, or just load empty scene then it will automatically unload and release handle/asset bundle?
Keep the returned SceneInstance and unload the scene with this
the doc page for it has an example https://docs.unity3d.com/Packages/com.unity.addressables@2.7/api/UnityEngine.AddressableAssets.Addressables.UnloadSceneAsync.html
Okay, so I have to use Addressables.UnloadSceneAsync
Another question, does it have any functions to unload all assets which loaded from asset bundle which can skip handle/usage count?
No, that isnt how addressables should be used
unity is tracking dependencies and bundles and handing that for you
I see, but it is really hard to make groups to make it unload asset bundle properly
use more groups
change the bundle mode for the group to pack per asset or by label
Would it have any disadvantage if it pack to many asset bundles?
I think pack each mesh to each asset bundles is not sounds good.
Or does it have any function to get count of references by assets GUID?
Dont think so because I dont see a reason they would expose this information
because if you just "want to release it X times" then you are not using addressables properly
the point is you load and release so unloading happens dynamically when needed
Not sure that game objects which instantiated by addressable will decrease ref count when destroyed?
no you have to ReleaseInstance() which is dumb
so often easier to just load the prefab so you can just release that when you close/exit the scene
Okay, what if I do like this
- I have a class which store all handles to prefabs (I plan to load asset as prefab, not instantiating by addressable's functions)
- It have to instantiate object by those prefabs
Then I can just release the handle to prefab or do I have to destroy all instantiated objects before releasing?
If you load the prefab 1 time, you just need to release it 1 time
If you release the prefab before all the instantiated objects are destroyed you could encounter issues such as textures vanishing
Okay, so this should work for me
AsyncOperationHandle prefabAHandle;
public GameObject InstantiatePrefabA()
{
// Instantiate prefab A
GameObject prefabA = prefabAHandle.Result as GameObject;
GameObject instanceA = GameObject.Instantiate(prefabA);
return instanceA;
}
public void UnloadPrefabA()
{
// Release the handle when done
Addressables.Release(prefabAHandle);
}
So just be smart and have code to release stuff you load at the correct time
Thank you
Hello, Today I have questions again, loaded asset bundles will use a lots of RAM if there is no assets loaded from those bundles or not?
iirc depending on factors like your compression settings, unity will sometimes need to load the bundles fully into memory rather than reading from the disk on the fly
Where I can read about non recursive dependency calculation, I try to find it in manual, I am using com.unity.addressables@1.28
You can use the build report to see what dependences an addressable asset or group has. Useful to determine what groups (and therefore bundles) a group needs loaded too.
Build report is better in unity 2022+
Thank you, now I try to pack my assets into smaller bundles from:
- CharacterGroup
--- Character001.fbx
--- Character001.png
--- Character001.prefab
--- Character002.fbx
--- Character002.png
--- Character002.prefab
--- Character002.fbx
--- Character002.png
--- Character002.prefab
to
- Character001Group
--- Character001.fbx
--- Character001.png
--- Character001.prefab
- Character002Group
--- Character002.fbx
--- Character002.png
--- Character002.prefab
- Character003Group
--- Character003.fbx
--- Character003.png
--- Character003.prefab
Hope it will help for asset bundle unloading
I actually don't know how it loading catalog, I want to know if I can change catalog URL at runtime or not.
I noticed that monoscript always included in Default Local Group and I can change the group to remote.
Okay, found this one, https://docs.unity3d.com/Packages/com.unity.addressables@1.28/manual/TransformInternalId.html, will try it later
You should be able to have runtime variables in the remote path too, check the docs on profile path configuration
- This page (https://docs.unity3d.com/Packages/com.unity.addressables@1.28/manual/ProfileVariables.html) ?, so I can have my static class with specific remote URL, then when I can make changes to the URL, before or after initialize or anytime?
- I also can find
AddressablesRuntimeProperties.SetPropertyValuenot sure I can use it likes
AddressablesRuntimeProperties.SetPropertyValue("Reload.LoadPath", "https://www.mygame101.com/assets");
And when that I can call the function, before or after initialize or anytime?
I found in document says about Addressable Report The count of assets pulled into the build by an Addressable asset is an important property in this view (https://docs.unity3d.com/Packages/com.unity.addressables@1.27/manual/AddressablesReportSummaryTab.html), but I don't know where to find those asset files
Newer versions and unity 2022+ has a gui for the reports
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/addressables-report-window.html
Can't find The question mark icon yet, do I have to expand asset bundles to find it? or change view by to Assets to find it
Ahh, they are assets with italic name
Now I tries to reduce memory usage, now remapper, reserve and untrack->private are pretty high, I found in here https://discussions.unity.com/t/insanely-high-memory-usage-from-remapper/950730 that the folder in group might increase remapper memory usage, so i will try to change them, then, how about reserve and untrack, how can I reduce memory usage, can asset bundle unloading reduce them?
In regard to my previous question in #💻┃code-beginner message, I did some research and currently reading that Destroy() does not unload the prefab reference from memory. I also notice a higher difference in memory resident compared to using AssetReference
So given that the dependencies in my SO are not addressables, I create them with Instantiate, do they get unload if I unload my Theme?
As long as you Release() assets you loaded and use ReleaseInstance() when we instantiate via addressables then if expect things to be unloaded when possible.
Asset reference is just a wrapper for an address/guid so these act the same as the above mentioned scenarios
You shouldn't need to Destroy anything and when correct releasing is implemented it should all act good. I have observed good behaviour on a game that would load many assets and release many
Remember that if you load the prefab via addressables then instantiate as normal then addressables just needs the prefab releasing once
I'm just trying to understand what causes the difference in performance between 2 methods. Consider this an experiment.
In both cases, the Theme is load through LoadAssetAsync() when the game starts. For the prefab assets within:
AssetReference: Asynchronously loaded and release likeTheme. Less memory allocated at runtime.- Direct reference: Since this is not supported by Addressable, I manually
Instantiate()andDestroy()when not needed. According to some discussions in the community, non-addressable prefabs are not unloaded even if they are destroyed. So my guess is that the extra memory resident is caused by those 'leftover' prefabs. That includes texture, mesh, ... data. Correct me if I'm wrong.
All that lead me to the question above.
I'm not 100% myself but I would think once the actual addressable with the dependency on the prefab is released then the problem is solved. I will see if the documentation mentions anything special about this.
In my mind it shouldn't matter if the addressable depends on a texture or if it's a prefab -> texture
Prehaps they are implicitly marked as Addressables at runtime and fall under the same AssetBundle as their "parent" addressable's
If only I could verify this in the Profiler but I can't find a way to make it work
Dependencies that are automatically pulled into a bundle can be duplicated (meaning it can appear in multiple bundles)
If marked as addressable it solves this problem but doesn't change the behaviour when something is loaded because it's depended on
I see no information that states that a prefab works differently to other asset types
Yeah, I have to note that duplication issue. It's getting clearer now. Thanks
The addressable build report will tell you all duplicates and how many so it's easy to fix the major ones
Thanks, I totally missed that
Should I store every assets into addressable group or just put prefabs then let's addressable manage it?
I try to reduce RAM usage, now I don't know why Remapper is using high RAM
Okay, as I try Remapper RAM usage can be reduced by not put assets into any groups
what do you mean by remapper?
PersistentManager.Remapper in Memory Profiler
Aha i see. I have never experienced issues with it, probably due to careful group design and assignment and usually using 1 bundle per group
Not sure that I should ask about terrain collider here, I want to know when load scene additively from addressable asset, with terrain collider or use mesh collider with exported mesh which one will load faster
Did you ever try to put all assets that being used in your project to addressable groups? <-- this way cause higher PersistentManager.Remapper RAM usage
Or you just put assets which were planned to load by addressable asset system then gradually add duplicate assets to shared groups
In the game that had the most assets we used addressables for everything. The game had 10+ "environments" with their own groups and id did quite a bit of memory profiling but that was mostly focused on ensuring gpu memory usage was good.
and all games after this addressables was used for everything (all scenes and loadable assets were in addressables)
If i make animations first with sprites then put the folder with all the sprites into a sprite atlas then make that addressable then can i just have one script that loads and unloads I tested this but i didn't have to make a script to load and unload it played the animation like it didn't need to be loaded in
Hi, Im having issues with addressables in a webgl build crashing after a few game cycles due to memory access out of bounds. Im using addressables 1.19.19 because its risky to change the editor version for this project.
-
Each level scene is bundled in their own addressable group, and Im only using Addressable.LoadSceneAsync in the project (some prefabs are instantiated by objects in the scene, but not through addressables).
-
When loading a new level, i made sure to release any unused scene AsyncOperationHandles, call Resources.UnloadUnusedAssets, and call GC.Collect. The current scene will always be unloaded by a lightweight loading scene before loading the next scene from remote.
-
from what I assume to be the webgl heap memory in task manager, the memory keeps on increasing whenever I perform a load level process, until it exceeds the maximum allowed by the browser and crash. I have not found if its possible to clear the memory manually.
Thank you for reading all these, please help me understand addressables better 😭🙏
Web GL is special in that it cannot perform garbage collection "mid frame" because execution cannot be halted to perform the GC. Therefore unity has to wait till till certain points to perform a GC so its quite possible for too much allocation on a frame to cause an out of memory error.
Use the profiler and make sure you have an up to date addressables report so you can ensure you are releasing everything correctly and see also if you can stagger or split up some loading over many frames to allow for GC to occur.
This page explains more in the 🗑️ Garbage Collection section https://docs.unity3d.com/6000.0/Documentation/Manual/webgl-memory.html#garbagecollection
Thanks ill look into that and give it a try 👍
How do I implement encryption in Addressables?
My game stores 1920x1080 screenshots as level hints. There are about 91 such images. They are referenced directly as textures in a scriptable object which that is referenced at the start of the game. I don't know enough about unity's image system to know if all of them are loaded into memory instantly. I'm considering converting this into addressables.
I don't get a lag when I open it but I don't know it cause issues in low VRAM devices. Would addressable conversion be worth the hassle?
whether it's worth the hassle is subjective and depends how much you need to save memory, but from what you described those images are most likely getting loaded during the splash screen and staying in memory indefinitely
Also because these are not POW2 they will be larger in VRAM than desired
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/build-shared-assetbundles.html
in the docs it says to enable or disable the monoscript assetbundle, change the monoscript bundle naming prefix
but it’s already set to the default project name hash, whatever that means
is it essentially always enabled
this part really confuses me
does it duplicate mono metas in the bundles with prefabs that have mono components by default or not?
I keep getting errors with monoscripts bundles.
I have tried building the addressables again, clearing cache, deleting the .bin file but nothing seems to work.
Been trying so much i made a android game and added the addressables build files into the firebase host and its working fine in the editor but still there's problem running in my android saying its invalid key and much more errors.
Hello,
I'm starting to use addressables but there is something I don't understand.
The doc says "If a scene is Addressable, you can use Addressable assets in the scene just like any other assets. You can place prefabs and other assets in the scene, and assign assets to component properties. If you use an asset that isn't Addressable, that asset becomes an implicit dependency of the scene and the build system packs it in the same AssetBundle as the scene when you make a content build. Addressable assets are packed into their own AssetBundles according to the group they're in."
But if a prefab in my scene is addressable when I'll load the scene it loads this prefab not as the real addressable for this object.
Basically in my scene I have a prefab (which is an addressable) and an object with a script that does assetReference.LoadAssetAsync<GameObject>() for the same prefab.
If I delete the bundle file for this object it puts an error for the assetReference.LoadAssetAsync<GameObject>() (which is normal) but it is still loading the object placed in the scene which is supposed to be in the deleted addressable group file.
I'm obligated to do assetReference.LoadAssetAsync<GameObject>() for all the objects in a scene ?
It can't find the assets at the configured path so it's failing with 404
Make sure the web server can serve the files
The game was working fine and I did some changes: did clean build with new addressables. The monoscript addressables are pointing to last build hashes. Every other addressable is fine. Only the monoscript is causing problems. I think .bin or other catalog is still referring old oned
All of my 100 addressable groups are downloading and working fine. Monoscripts are broken.
I'm just telling you what the error means, it's pretty clear what http code 404 means
Yeah, I know that. They are not found because they don’t exist. Monoscrip bundles are build with new hashes but catalog wont update. That is my problem.
The catalogue should update. Try deleting Libary/com.unity Addressables and try ahain
Make sure browser caching prevents it serving an old version
That worked! Thank you!
Dunno what was a problem tho
It caches weird shit so I often delete that folder before builds
Hi, I hope someone can help me.
Is it possible to get number of files in the specific folder by addressables ? I have a folder called Level as addressables key/path and there are bunch of JSON files there (They are not marked as an addressable). I already load them by addressable but I want to know the total number of those JSON files too.
is your scene addressable? if you have a prefab included directly in the scene, it becomes a dependency for the scene's bundle, whereas an AssetReference doesn't create a dependency and only loads the required bundle when you use LoadAssetAsync. so if you delete the bundle, and your scene is loaded via addressables, you should get a depedency error (the scene can't load because the prefab is missing), but if the scene is not addressable, it'll load fine because by putting the prefab directly in a build scene, you're creating a duplicate



