#📦┃addressables

1 messages · Page 3 of 1

lunar shard
#

Do catalogs have a lot of redundant information in them? Absolutely, I wish I could make them much slimmer, but I am not worried about that right now.

I am just looking to find out more about why Addressables would internally wait for "get the catalogs for bush, bench, etc." operations to complete before letting "load a tree asset from a successfully loaded tree catalog" to even start.

hoary rampart
#

the catalog is just a json file so what players need to download when it gets updated is minimal, so I'm not really sure if this system is worth keeping a bunch of catalogs for. I don't think unity expects you to use them that way at least

#

might be why you're running into this issue

turbid zephyr
#

I believe that the async operations in addressables are made to queue up while A: the addressables system is initializating or B: a catalog is being updated.

atomic void
#

Does anybody has a suggestion for my case? I mean, if the data remains valid most of the time (around 70%), maybe there's a way to make it always be valid, despite the Addressables.Relesase() call

#

My last attempt was to use a struct to hold the data I need, it didn't worked either

#

My next attempt will be to actually save the textures I need in disk and read it back when required. I believe this one should work, even though it's a improvisation

lunar shard
lunar shard
atomic void
# lunar shard Thing is, gabrimo, you should not need to call Release on your LoadAsset.Result ...

Hmm, my system is a tool which generates textures procedurally. Meaning I have a pool with hundreds of them which are sorted and loaded according to certain parameters. Once they are combined, a showcase model receive the final texture which is then saved by the user according to his will.

As it is now, the addressable data is loaded each time the user clicks on "Generate", the thing is, I'm struggling to find a good place to actually release the data. If I try to release the data after I load and set my variables, that eventual null issue happens and if I don't release it at all, the RAM usage goes up on each time textures are loaded. I can't find anything between this two approaches that actually works.

#

this is my first time using Addressables though, so it's pretty possible I'm just doing something wrong, I'll post one of the classes where I'm loading data, maybe this will help you to help me better

#

I'll keep implementing the textures saving solution as a plan B...

lunar shard
#

OK, so you have a pool of 100s of textures that I assume come in through either a single catalog or multiple catalogs (or you are using AssetReferences, which is not a workflow I ever use because I only use Addressables with remote catalogs)

Anyway, you load your texture library into memory using LoadAsset.

Now that you have your textures in memory, you have some code that combines them into a new texture.

This new texture is not an Addressable, it's simply a brand new texture you created in memory from the color information of your Addressable textures.

This texture gets applied to some preview asset and you allow the user to export it (to PNG or whatever I assume) if they want to.

I would think you would never unload your library of source textures, but would instead discard the generated texture when you are done with it.

I of course don't know how you generate this new texture from your library of textures, but in my mind this generated texture problem seems independent from your library of source textures.

turbid zephyr
#

Yeah, seems like it's independent from your library of source textures. But what do you do with the exported PNG? Is is reproducable by following an algorithm you're saving somewhere?

lunar shard
#

I only call LoadContentCatalogAsync

atomic void
# lunar shard OK, so you have a pool of 100s of textures that I assume come in through either ...

they're categorized in multiple addressables groups (not sure if it's analogous to catalogs in this conversation) and are loaded depending on the set of parameters defined previously (I'm using tags to specify which group should be loaded). The files are organized within my Assets folder.

The final texture is controlled by a render texture linked to a camera pointed to a set of quads, which represent my layers. Once the user decides to export, this render texture is converted into a regular png texture and saved on his system.

Yeah, once the generation is finished, the render texture content is set to a 3D object in scene so the user can preview the result.

Considering my current approach, where a camera keeps rendering the set of quads constantly, it's not an issue involving the final texture itself, which is only generated on demand. It's the specific texture(s) that gets null and affect the whole composition. When the problem happens, the affected layer(s) get completely white and if I check it's material's texture it says "None".

#

also, I'm loading 5 categories of textures and the problem only affects 2 of them

#

the biggest 2

#

it's funny cause it works most of the time, giving me hope that maybe there's a simple solution

#

maybe I'll try to wait .1 seconds or something before release the data

#

the texture solution worked more or less cause the null texture cause me other problems, even if only gets null for a little moment

atomic void
lunar shard
#

Actually this one is the most representative of what is going on. I wasn't updating my UI correctly.

An almost transparent white square means an operation is running but is at 0% complete. As it gets closer to 100%, it approaches full green using Color.lerp

You'll see the catalog jobs start on the same frame, and as they complete they each start a LoadAssetAsync operation.

But, none of these LoadAssetAsync operations do anything until the LoadContentCatalogAsync operations are complete.

At this point, I just believe the way Addressables handles AsyncOperations is by putting them all in a massive Queue and processing them one at a time.
Whatever came in first gets processed first.

#

The reason many of the LoadAssets operations on the right look like they are running in parallel is because they share assets. You can still see the LoadAsset operations are being processed in a serial/linear manner, it's just sometimes an earlier LoadAsset operation satisfies loading a dependency for a later LoadAsset operation.

gleaming whale
#

So we have an annoying problem. Almost two of them. We want to stream most of our materials from a server using addressable. Lets say we have 1000. Now in an ideal World we want to have it so each material has its own catalogue and its own bundle. So if we want to change 10 of them we don't need to Build the entire thing and can split them up in lots of small scenes.

We managed to make it work by creating one group for a material building it for each platform and uploading it to our server. After that we delete the group and move on to the next. The main issue here is the buildInShaderBundle. If we give each there own we get the "can't be loaded because another AssetBundle with the same files is already loaded" error the moment we want to load a second one. If we try to use one for each materials start to become pink/broken.

Now my first question would be is their a clean solution for loading materials from more than one catalogue? We cant be the first ones doing this. And secondly if there is any clean way to handle the BuildInShaders. Like somehow build one that contains all shaders we have? Any help would be appreciated!

#

For a little context our best solution so far would be to upload them without the shader and manage shaders inside our app
EDIT: nevermind. If we do this he does not add the texture to the addressable. I should not test this with diffrent shades of grey notlikethis

teal mortar
#

you may or may not need to do the same thing with MonoScriptBundleNaming to get it to work

dire siren
#

Hello o/, im using addressables to handle my assets delivery.
and im trying to check which bundles are currently in memory in my device.
Unity provides an api AssetBundle.GetAllLoadedAssetBundles that retrieves all in-memory bundles.
However, the name the this api returns is different from the bundles exported after a build.
Name of a random bundle file at my computer levelx__ba031b4d686669ae270f298bc6a22d0e.bundle
Name of a random bundle provided by unity api 186e5c19b1a336d7e15c18249e3e405f.bundle_f0454537e05f48f3d3d45b6f19dc8a4e
None of the hashes in the bundle name provided by unity api maps to any of my bundle files.
In catalog theres no hash bound to the bundle as well.
How can I map the bundle name provided by unity api to a addresable group?

gleaming whale
teal mortar
slate timber
#

Can we cancel an AsyncOperationHandle while its loading?
Maybe calling release() before can stop it?
I searched it but i see they said "Not possible right now" at 2022. I dont know if its possible right now.

#

I see this question is asked so many times. Maybe i should send a feature request to them

tender gate
#

Hello everybody, I have a bundle that I want to make smaller. It is a 3D model with its textures, scripts, etc. The textures themselves were 62MB, and the uncompressed bundle was around 70MB. I reduced the textures size to 20MB but the bundle is still 70MB no matter what I do with the textures.

The addressable report says the .fbx file is 54MB, I can’t find a way to reduce it. Guys, any idea on how to reduce the bundle size?

neon pilot
#

do you use in console open editor log after make a build and check everything right?

#

i wonder how to avoid duplicate assets in my addressables

#

im using addressables for cinemachine, the question is, i make a longer cinematic as an addressable, but there are some actors also used in other cinematic, so the character prefab is duplicated, should i use the actor also to be an addressable gameobject? if so... how to replace it on the timeline and get position, animation, etc... i think there should be a better way to do it

hoary rampart
dire siren
#

Do we have any equivalent of AssetDatabase.GetAssetBundleDependencies but for Addressables Groups?

neon pilot
neon pilot
#

Also searching video tutorial nothing found

teal mortar
# neon pilot Hmmm I cannot see how to get two different prefabs as addressable and using same...

if i understand correctly you don't need to change how your timeline is set up (i don't use timelines though), you can still have a hard reference to the asset - making it addressable means the addressables bundle it's in becomes a dependency of the one with the reference, which will also be loaded and can be shared between multiple other bundles that reference it, rather than being duplicated in each one

neon pilot
teal mortar
slate timber
#

i need help

mental orchid
#

Hi, I'd like to ask how to load asset after downloading them using DownloadDependenciesAsync? I got the message "Unable to load dependent bundle from location [path]" after trying load asset using LoadAssetAsync after downloading the asset bundle successfully.

#

I had to restart the game after the download the assets to make it work correctly.

tender cradle
#

Hello. The documentation says "Once you load a catalog, you can't unload it". This is absurd.
Is there anyone here who managed to unload a loaded catalog (or all catalogs) in some way?

warped quiver
peak cosmos
#

Any Idea why AssetReference..ctor() is being called also not only once but twice... I used LoadAssetAsync and saved result, I am Instantiating from that that result here, doing it from OpHandle.Result wields same result. Using InstantiateAsync results in the same thing plus ton of GC allocations.

peak cosmos
#

wth Unity?

teal mortar
peak cosmos
teal mortar
#

i'm sure it's some harmless bookkeeping for the inspectors or something like that, just another reason to never trust the profiler in editor 😛

spice hawk
#

is there a way of checking if the addressables have changed? Like the old "scripts only" build used to say that it couldn't build if the addressables had been modified and requires a rebuild. I thought Addressables.CheckForCatalogUpdates might have covered it but it appears not

quick hare
#

hi. I had a basic question that despite following the docs, I can't quite do it.
How can I build the game (windows) with addressables?
here's what I'm doing:

  1. set the addressable to not build on player build.
  2. clean all builds (from toolbar of groups window)
  3. create new default build (I get the success log)
  4. do a normal player build from Build Settings window

but then in the built executable, the addressables don't work... what step can I have possibly missed here?

(images are in order of the steps I've described. from top left to bottom right like English comic books order)

quick hare
#

more context on the exact error I'm receiving. it's an internal call (stacktrace doesn't go back to any of our scripts) and it's trying to load some assetbundles from remote address that doesn't exists.
here's the error message in text format. replaced remote address with REMOTE_ADDRESS and game name with GAME_NAME:

RemoteProviderException : Unable to load asset bundle from : https://REMOTE_ADDRESS/GAME_NAME/Addressables/StandaloneWindows64/localcards_assets_all_4ec4d01af0b9bca0441adaf51955b18b.bundle
UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
ResponseCode : 404, Method : GET
url : https://REMOTE_ADDRESS/GAME_NAME/Addressables/StandaloneWindows64/localcards_assets_all_4ec4d01af0b9bca0441adaf51955b18b.bundle
#

In Short

Unity gives an internal call to fetch an assetbundle from our remote, but it doesn't exist and results in 404. this only happens in build (not in Editor)

dreamy trout
quick hare
dreamy trout
#

I think the editor uses the local bundles in playmode. I haven't tried, but maybe you can edit the path that's used in the editor to use the remote assets without having to build it.

#

However, you'll still need to upload the bundles yourself/automate the process

next cairn
#

Do addressables need different keys when it's the same asset but built for different platforms? I'm trying to test some assets and they work fine on the first platform I tested on (Windows), but not the second (Android).

sudden mesa
#

Hello, I can't build addressable since I updated to latest Unity version

#

Addressable content build failure

#

I just get this error when I click on New build > Default Build script

#

The Addressable analyze says there are no issues with my addressables and it was working fine before

#

This bug occured after I updated to Addressable 1.21.18

sudden mesa
#

Ok, the update completely destroyed all my content packing & Loading settings in all my addressable asset group

#

Here is one new group I just created, the content packing and loading apepars correctly

#

And here is one after the update which was working fine before, the content packing and loading block completely disappeared.... This is great... I have to repack all my assets...

#

Ok luckily, re-adding the content packing and loading schema on the existing groups seems to fix the issue and kept the previous settings.

#

But then there was an error about a group not being allowed to have a bundled and player asset group schema at the same time. I deleted all player schemas since it appeared to have no relation to how i want my bundles and now the addressables are building at least... Hope it will not crash...

sudden mesa
#

OK, seemed to work. I still wonder how all these data got lost...

crystal nova
#

hello! does anyone here know what addressable group profile settings should i use if i want to host my addressables to a remote server and then store it to the local storage of my android device after i download it?

ps these addressables are video files

verbal harness
#

Is there a way for addressables to be steam update friendly... So if people ALREADY have the addressable download, they don't download again... This is important as games get hundreds of GB large.

#

STEAM/VALVE

fervent sinew
#

isn't the case that steam only updates the files which were changed?

quick hare
#

error: LoadPath for group LocalCards is set to the dynamic-lookup version of StreamingAssets, but BuildPath is not. These paths must both use the dynamic-lookup, or both not use it.
any idea why? when I create a new group with the exact same settings, it works fine. but this one failes

next cairn
#

Does Addressables.LoadContentCatalogAsync() accept URLs for the file path, or do you have to use a system file path?
EDIT: tested myself, turns out it does, hooray

warped quiver
#

hey ResourceManager.ExceptionHandler this is deprecated ?

#

unity says does not contain definition

#

why this channel is like useless ? there is no answer for all questions ?

#

if you dont answer the question close this channel

tender hornet
#

hi everyone , how to update only one asset bundle if their is any minor change in specific scene from addressable window? Usually first i delete current asset bundle entire folder then recreate all assets again

teal mortar
tender hornet
#

there is option of update a previous build

teal mortar
tender hornet
#

but i doesnt worked when i tried it

teal mortar
#

i think that's intended for building an update in the scenario where you have a remote catalog and bundles to be updated on the server, no idea if it actually saves time rebuilding any assets or not

quick hare
#

in your screenshot, localBuildPath is different than mine

#

thanks. this should lead me towards the right direction. reverting profiles to their default

teal mortar
#

yeah, unless you're doing something custom, addressables normally builds into the library folder and those bundles are copied to streamingassets when you build the player, it doens't build directly into the streamingassets folder

next cairn
#

When you build addressables, the project generates two 'catalog' files, one '.json' and one '.hash'. Since the former is what's used to retrieve extra catalogs, what's the latter used for?

warped quiver
#

private void Awake()
{
if (Instance == null)
Instance = this;

    Addressables.InitializeAsync().WaitForCompletion();
    UnityEngine.ResourceManagement.ResourceManager.ExceptionHandler = CustomExceptionHandler;
    DontDestroyOnLoad(gameObject);
}
#

my Custom exception handler is not workig

#

i am assigning as you cann see but it is not working why?

dire siren
#

Hello community, im having a pretty weird problem
For context, in our project we are separating the addressables into two groups:
Embedded, for assets that goes inside app binary and Remote, for assets that should be downloaded remotely.
We are currently using addressables 1.21.15 and we are aiming to run our ftue without downloading any additional asset. And this works perfectly as long as I dont try to download remote assets in background.
So basically, if I run the game without calling Addressables.DownloadDependenciesAsync("remote"); all ftue works fine.
Otherwise, at the moment I try to load some audio from "embedded" using AudioReferences, i got thousands of System.Exception: Unable to load dependent bundle from location .....
Can somehow Addressables.DownloadDependenciesAsync block loading operations?
In addressables 1.21.14 it works fine.

compact spoke
#

I'm running into an issue trying to download a bundle from an S3 bucket with Addressables.LoadAssetAsync()

I keep getting
Invalid URI: Invalid port specified
And a group operation error caused by the invalid Uri error.

Using Addressables.WebrequestOverride I can log the uri/url being used to the console and don't see anything wrong (invalid characters, mismatch to bucket, etc)

Is there a way to specify the port used by the addressables system for it's web requests?

I've found a few people with the same issue but no resolutions. There's a more detailed stack trace in this forum post: https://forum.unity.com/threads/groupopereation-failed-invalid-uri.1293570/

lucid mulch
#
 #0 0x7d0a5cb838 (libunity.so) GetStacktrace(int) 0x44
 #1 0x7d0aad206c (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x240
 #2 0x7d0a13b078 (libunity.so) DebugLogHandler::Internal_Log(LogType, LogOption, core::basic_string<char, core::StringStorageDefault<char> >, Object*) 0x9c
 #3 0x7d0a13af64 (libunity.so) DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*) 0x15c
 #4 0x7d04beec34 (libil2cpp.so) ? 0x0
 #5 0x7d06847a3c (libil2cpp.so) ? 0x0
 #6 0x7d048dad00 (libil2cpp.so) ? 0x0
 #7 0x7d048dab74 (libil2cpp.so) ? 0x0
 #8 0x7d0a4af2ac (libunity.so) scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) 0xa4
 #9 0x7d0a4c05d4 (libunity.so) ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) 0x9c
 #10 0x7d0a4d0058 (libunity.so) MonoBehaviour::CallUpdateMethod(int) 0x108
 #11 0x7d0a27fb24 (libunity.so) void BaseBehaviourManager::CommonUpdate<BehaviourManager>() 0xd8
 #12 0x7d0a27fa38 (libunity.so) BehaviourManager::Update() 0x20
 #13 0x7d0a34ba98 (libunity.so) ? 0x0
 #14 0x7d0a34c698 (libunity.so) ExecutePlayerLoop(NativePlayerLoopSystem*) 0x5c
 #15 0x7d0a34c6d8 (libunity.so) ExecutePlayerLoop(NativePlayerLoopSystem*) 0x9c
 #16 0x7d0a34c978 (libunity.so) PlayerLoop() 0x138
 #17 0x7d0a555e18 (libunity.so) UnityPlayerLoop() 0x338
 #18 0x7d0a5887f8 (libunity.so) nativeRender(_JNIEnv*, _jobject*) 0x48
 #19 0x7d92261754 (libart.so) art_quick_generic_jni_trampoline 0x94
 #20 0x7d9200a2b0 (libart.so) nterp_helper 0xfb0
 #21 0x7d92009334 (libart.so) nterp_helper 0x34
 #22 0x7d9200b074 (libart.so) nterp_helper 0x1d74
 #23 0x9c658d4c (memfd:jit-cache (deleted)) ? 0x0
#

i need your help guys, i've built addressable for android but my device showed me this error when i tried to pre download package. I've no idea to figure out this error atwhatcost \

warped quiver
#

Can not catch addressables download errors

#

i am getting 404 error this is fine but ResourceManager.ExceptionHandler is not working

fleet cape
#

is there any benefit to use addressables for single mode scene loading? like Addressables.LoadSceneAsync vs SceneManager.LoadScene

warped quiver
#

hey any idea about that ?

#

i can not resolve after update addressables

warped quiver
#

for anyone troubles with this new addressable package update just release your downloaddependiciesasync operation handle like that :
if (asyncOperationHandle.IsValid())
{
Addressables.Release(asyncOperationHandle);
}
this is works

dreamy trout
#

Hey. I'm trying to understand a certain behaviour [maybe issue?].

  • I have Quests and Tasks (ScriptableObjects).
  • A Quest is a Main Asset, and it has many Sub-Assets (Tasks)
  • Neither Quests or Tasks are marked as Addressables.
  • They are in a folder, marked as addressable, which is labeled with a "Markables" label. (see image).
  • The Quest receives the label, while the Tasks do not (ok so far)

Here's the issue: When loading the assets with the Markables label, the QUESTS are loaded twice into the results of the handle.

Here's the code streamlined:

public class Quest : MarkableSO
{
  public List<QuestTask> tasks;
}

public class QuestTask : MarkableSO {  }

public class QuestDatabase : MonoBehaviour
{
  private IEnumerator Start()
  {
    questsLoadHandle = Addressables.LoadAssetsAsync<MarkableSO>("Markables", null);
    yield return questsLoadHandle;
    //Performing a foreach on this prints Quest assets twice.
    Debug.Log(questsLoadHandle.Result.Count);

    //LoadAssetsAsync<MarkableSO> returns Quests AND Tasks, but Quests are added TWICE (bad)
    //LoadAssetsAsync<Quests> returns only Quests (expected)
    //LoadAssetsAsync<Tasks> returns only Quests (why?)
  }
}
#

The objects without Labels here are Tasks.

#

Maybe also of note, they are being packed together by label (so the entire folder gets packed as one bundle)

warped quiver
#

Unity Web request failed to load from cache. The cached AssetBundle will be cleared from the cache and re-downloaded. Retrying...

i am using Remote addressables when i delete documents from remote this error is thrown. this is okay but i can not catch this error any way.
i am using ResourceManager.ExceptionHandler. its not working

viral orchid
#

I have a problem. I load Addressables that contain static lightmapped objects. BUT after I loaded the assetbundle, I want to move these objects to a different place in the scene. The problem is that under StandaloneWindows64, the mesh doesn't move, even though I changed the position of the transform.

#

This problem didn't happen in WebGL (neither the WebGL build nor the Editor with WebGL as target platform).

viral orchid
#

Seems I found it. I need to disable "Static Batching" in the project that generates the lightmapped objects.

lunar geyser
#

so i have a webgl build template that i’d like to be able to copy, and swap out the external endpoint it loads a 3d asset from. if i go add asset bundles, the bundle would have to be built in unity anyway so addressables would be the way to go for this?

fleet anvil
#

Would you guys recommend using adressables solely to avoid using Resources.Load()?

green pawn
#

Hello! Quick question: is addressables & asset bundles good for persistant audio download? Audios that will be avaliable for every1 every time, for lets say an audio focused game? Since there is a lot of audio previews and etc, I'm still unsure if it would be best to use addressables or a storage bucket

viral orchid
#

I have a problem with Adressables in WebGL. On lightmapped objects the texture isn't loading. The object is just rendering dark gray.

humble nest
#

Hey guys, I've added 300 MB of addressables to my app. And now for some reason it's taking a while to load the first scene. That scene doesn't use any of the addressables at all, only a later scene does. Any fixes for this?

#

i.e startup takes too long

teal mortar
#

what does the profiler show? is it spending a long time in Addressables.Initialize?

viral orchid
#

On WebGL, shaders are not correctly read from my Addressable bundle. When I load the Addressable, and iterate over all renderers and materials in that addressable, alls shaders are called "Universal Render Pipeline/Lit", even though they should be custom ShaderGraph shaders.

#

It works in Editor, but not in the build.

tender hornet
#

Hi everyone
'Assets/Flamingo/Scenes/FlamingoMenu/Menu_Flamingoo.unity' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
To add a scene to the build settings use the menu File->Build Settings...
getting this error while trying to load scene from via asset bundles

tardy orbit
#

Hi guys, Scriptable Build Pipeline problem here. I found that any Monobehaviour serialization change(like adding a public field) will cause ALL assetbundles cache miss during build

#

the reason for cache miss is asset's ScriptType dependencies' hash are changed

#

I think it is a SBP bug, anyone has knowledge of the problem?

cold crow
#

Can Addressables load a ScriptableObject and the GameObject inside it? assetReference1.LoadAssetAsync<HandGear>().Completed += OnHandGearLoaded; , HandGear being a scriptableObject, but it always fails. LoadAssetAsync<GameObject> works fine but Im trying to manage inventory systems, and its not feasible to manage 100s of prefabs without properties

keen thorn
#

Hi! Is it true that you can't download a certain prefab without downloading the whole group first? It turns out that before installing a prefab, you have to download the whole addressee group.

keen thorn
mellow root
#

Help: I use two projects, one for building addressables only. I want to create a shader collection to precompile shaders on mobile, but these shaders are only in the addressable project. Has anyone here faced this scenario?

sterile badge
#

Anyone have any idea what is responsible for setting/triggering the update of "Ccd Managed Data" in the Debug inspector view of AddressableAssetSettings object? This is not changing when I switch active profiles, do builds (of either addressables or the entire game), clear cache, update builds, etc. and it's causing my production build to be stuck connecting to the testing environment. More details on the taill end of this thread: https://forum.unity.com/threads/addressables-profile-does-not-recognize-installed-ccd-management-package.1426458/#post-9433688

opaque sandal
#

Hey guys, I'm new at using Addressable? I see there is a 2.0.3 version? but .0.3 make me think that is not stable. Should I start using v2 or switch back to use 1.2.18?

teal mortar
#

if you're worried about packages being stable, you'd probably be better off sticking with 2022 LTS anyway

warm void
#

hey everyone: I'm having a weird issue. We're transitioning to Addressables in our game and there's an Android specific problem where a prefab included as a reference in an Addressable asset is randomly null in the Android build despite having an assigned value and working properly on the Editor and on other platform's builds. Other Addressables that are variants of the same prefab and also have that same field with a prefab assigned do get the field properly assigned in the Android build, so the specificity makes it even more confusing and points towards a build issue with Addressables. Has there been anyone with this issue? Unity version is 2021.3.28f1

warm void
pastel grove
#

Hiiii, I need HEEELP

#

every time I load terrain with a lot of grass textures through addressables,
main thread freezes for 0.2 seconds

chilly lava
#

Hi! Is it possible to build a IOS Addressable Unity build from a windows pc? Or it works only on a MacOS PC? Thanks

sudden mesa
#

Hello, is there an advantage to load local assets bundles with UnityWebRequest in the addressable asset group?

bronze cosmos
chilly lava
icy marlin
#

I have one doubt about addressables. I want to ship a game with local addressable that I can change later via remote upload. But in addressable group settings load path can be only local or remote

teal mortar
sudden mesa
#

Hello, I'm having some issue with addressables not being able to pack

#

Build Task BuildLayoutGenerationTask failed with exception: The variable m_GroupAssets of AddressableAssetSettings doesn't exist anymore. You probably need to reassign the m_GroupAssets variable of the 'AddressableAssetSettings' script in the inspector.

#

This is the error I get when trying to build groups with the default script

#

I do not see any m_group variable in the asset settings window, everything seems to be filled properly. I know there were so bug when updating addressable version a few weeks ago which might explain the problem now but I'm not sure how to fix things now...

#

Moreover, when I start Unity, I get this error:

#

Unable to import newly created asset : Assets/Misc/AddressableAssetsData/AssetGroups/Schemas/Built In Data_PlayerDataGroupSchema.asset

#

Which is strange because from what I found online, PlayerDataGroupSchema should only be used when "Resources and Built in Scenes" is selected in schema, which is currently NOT present in my schema at the moment.

#

I checked all of them, none have any resources and built in scene schema

#

But I still end up with a playerdatagroupschema even though I don't want it.

#

So in the end, it appears my whole project addressables is f*cked up. Is it possible to completely reset addressable? I would have to repack everything I guess but I don't really see any other options :x

sudden mesa
#

Ok checking more about my issue, I found this in build int data asset group. I do have a content packing & loading + a resources and built in scenes schemas both in the same group which shouldn't be possible if I understood properly. Problem is, the cog to remove a schema is not present so I can't remove schemas on the built in group...

sudden mesa
#

Ok, in the end, I had to delete everything related to addressables, remove the package, restart unity, reinstall package and redo the addressable groups again. I guess something got messed up between unity version update or the addressable package update so starting from scratch should fix the issue. So far it seems to be ok.

neon pilot
#

why when i load an addressable scene additive the occlusion is not loaded ?

undone hound
#

If I delete the Library folder, does that break the link to the built and published adressables?

compact spoke
#

Has anyone run into a cert verify error trying to load remote assets from an aws bucket? It was working on my project for a while and now every attempt to download addressables assets fails due to the certificate name not matching the expected CN

#

I'm not sure what could have changed to cause this

frigid stag
undone hound
mossy folio
#

I have a project that is on mac and pc. I am doing "dlc" using the addressable system. Do I need to build separate addressable "bundles" for each platform or are they reusable between platforms?

mossy latch
swift birch
#

When I use the "Use Existing Build" play mode script, I cannot hear any music or sound effects. I have a single AudioMixer, and it is in an Addressables group. All scenes are in Addressables, and the initial scene is loaded through Addressables with a separate (non-Addressable) initializer scene. The initializer scene has no reference to the audio mixer. Does anyone know how to fix this?
Edit: The problem seems to be that setting the master volume does not have any audible effect. The audio mixer is built into Addressables with -80db volume, and is expected to be set higher in code. If I build with the volume at 0db, I can hear music/sfx. I've verified that the audio mixer I am changing and the audio mixer the audio clip uses have the same instance ID. But changing the volume does nothing.

This works correctly in a standalone build, and it works correctly in the "Use Asset Database" and "Simulate Groups" play mode scripts. It just doesn't work in "Use Existing Build" in the editor. Clean Addressables build doesn't fix it.

Unity 2022.3.13f1
Addressables 1.21.19

dark granite
#

So I'm using Adressables and developing for Android and actually not pully anything from remote, because my device doesnt have connection. I kind of struggle with the right settings for android. Can anybody suggest a good settings or some experience what is best for the performance?

dark granite
#

Is it possible that when I set an gameobject that gets loaded as an adressable becomes null when I call gameobject.setActive(false) ?

compact spoke
#

I'm running into an issue where I make a change to the remote load path url of an addressables profile and my builds continue to use the previous load path. Source control shows that I changed the addressables asset settings with the new remote load path. Even after saving, saving project, rebuilding addressables, and closing /reopening unity new builds aren't using the load path set in the active profile

spice plaza
#

Does anyone know if the "Use Asset Bundle Cache" on the Addressable Group settings have any impact for Local bundles?
I have a local bundle that is expected to change with every release, I'm not sure if local bundles get cache somewhere else at all, so my first intuition was to disable caching completely for this group. However I don't know if it could have any impact on loading times or something else. Any recommendations?

haughty cloak
spice plaza
#

Out of curiosity, what does your settings looks like for your local bundles @haughty cloak ?

haughty cloak
#

I have a question. Could static batching make scene bundles builds non deterministic? Meaning in every build static batching would combine meshes differently. Did anybody test that?

spice plaza
remote lantern
#

While implementing Addressables, I found that I can't rig asset reference using the inspector anymore, so I'm looking into Zenject.

Has anyone used Zenject with Addressables yet? Any pointers?

wintry karma
#

I have converted my scriptable object assets to addressable assets. In those scriptable objects, there are some fields. One of them is a prefab. Should I convert these prefabs to addressable assets as well or not?
SO Asset (addressable)
Prefab

I load SOs using Addressable apis and get prefabs, it is OK.

dark granite
#

Hallo, I have an issue with adressables that although I just have one group in my build i get two bundles.

spice plaza
spice plaza
# dark granite Hallo, I have an issue with adressables that although I just have one group in m...

Two thing to keep in mind.
First: what's your group settings "Bundle Mode" set to? Is it set to "Pack Together"? Otherwise they can end up packed into different bundles, group does not necessarily mean bundle, a group is an editor only visualization on how you organize your assets. Please note na a group doesn't have an 'Address', so you are never loading a group
Second: are those 2 bundles from 1 build? Note that your bundles are going to stay there unless you clean the cache yourself

dark granite
#

Yes i have it set to pack together

#

Yeah it is from one build

#

I mean i cleaned the cache in the adressables window but that doesnt seem to change anything. Do i need to delete it out of my library folder?

spice plaza
#

I'm assuming it's a local group by the name, so if you use this menu it should clear it out for you. Try cleaning everything and rebuilding to see what you end up with

dark granite
#

yeah i tried that but doenst really help sadly. Come out with again two bundles

#

The report is also saying that i only have one bundles

#

*one bundle

#

So I renamed my defaultgroup and you can see that there is another old default gruop in my build

spice plaza
#

I still believe that's an old bundle, can you check the creation date on it? Is it really being re-created on each build after you delete it?

dark granite
#

Also updated to a newer adressables package version. But that didnt change anything

spice plaza
#

If you just started setting up addressables, feel free to manually delete that bundle, it's not related to your current content

dark granite
#

The problem is the bundle doesnt exist as a group in my project but it gets included in the build

#

When I then build, I get the bundle with the current group name and the defaultlocalgroup_assets bundel

dark granite
#

Alright deleting the library folder and restarting solved that problem :/

spice plaza
#

If I have a local bundle and disable the "Include in Build" checkbox on the group settings, does the bundle still end up on streaming assets during a player build?
I'm building on UCB and don't necessarily need these local bundles on my addressables content build, would this be safe to uncheck it or would it also exclude the assets from the player?

heady notch
#

Is there a possibility to change addressables content on the server without having access to unity project and addressables_content_state.bin file? I don't want to update app on google store.
I only need to change serialized field on remote game object, but if I manually change the file in text editor content hash will also be changed and it will not work.

hoary rampart
compact spoke
#

I'm running into the same issue as this forum post and was wondering if anyone has a fix for catalogs not updating to look for the correct asset bundles. There isn't a definite solution apart from not using addressables

https://forum.unity.com/threads/addressables-bundle-hash-changes-on-different-machines.1000331/

#

I'm getting inconsistent results on different devices running the same build. Some are able to locate bundles correctly and others are looking for bundles with different hashes from previous builds

drowsy holly
#

if i do Addressables.LoadAssetAsync<GameObject>, then instantiate the asset on complete, does it automatically gets unloaded when i change scene or i need to do it manually

teal mortar
drowsy holly
teal mortar
#

AFAIK yes it tracks the instance in the scene instead of the prefab in memory then, if you want to be sure when something unloads check it out in the addressables event window

drowsy holly
#

ty

tender hornet
#

getting these errors : ?

  • not always
  • scene could not load when it happens
  • happening in only one scene
    does anyone have any idea why is it happening
tender hornet
#

Hi

hoary rampart
tender hornet
#

iam sorry , i dont know who is the person of authority here

#

i posted this message last night , but no one responded , its urgent

real venture
#

Best place for urgent support is to submit a real support ticket. The community spaces like discord and the forums are best-effort

lethal tundra
#

Hi. I am trying to preload localization tables, but this tab doesnt exist in my project

cloud aurora
compact bane
#

!code

robust elbowBOT
wind tundra
#

Hello, iam trying to use addressables to load my levels.

This is what I came up so far but how do i know how many levels i have without loading each level?
What would be good solution?

Just to explain my idea is to have for example 5 levels and at later date add 5 more and main menu where you select the level, it automatically shows 10 levels to choose

fast bay
#

Is it possible to pack whole scene as addressable then load it just as level at runtime? It must be external file, I want to my player be able to make customs levels in unity (I know that scripts are must the same as in build) and then download it and play. Game is based on Netcode for GameObjects

noble carbon
#

Is there a way to get all Remote Addressables Content Size in Addressables? Like when I build Addressables, I can see "Total size of all bundles" in Addressables Report inspector in Unity.

gentle nova
#

hey ive been trying to create big 2d worlds

#

but performance has been an issue

#

i spawn simple sprite objects but many of them randomly based on a grid method on a square

#

ive been wondering how i would go about doing this in a more performant way like only enabling the ones close to the player but that seems to not help with performance

faint geyser
#

Hello, we're experiencing some issues with Localization & Addressables. When building to Android, the game says that can't find any Localization. On Editor it works with no problems!

plain terrace
#

I just discovered that if an asset is referenced in a scene, and is also Addressable, you wind up with two copies of the asset

#

I'm using ScriptableObjects for a setting system. Each setting is an asset, and the current value of the setting is stored in a non-serialized field on the setting.

#

This was working great in the editor, but I just found out that it's completely hosed in a build, since I have two different copies of the same asset.

#

I was originally just using Resources, but that was annoying becauase I had to keep all of my assets in a single folder (so that I could do a single Resources.LoadAll<Setting> to fetch them)

#

I'm not sure what to do here.

plain terrace
#

But since there are two copies of the asset, the instances I get from Addressables.LoadAssetsAsync have nothing to do with the instances that are referenced everywhere else in the project.

#

I can just get rid of addressables entirely here -- I already have references to every setting through a "setting catalog" that's loaded from Resources -- but there are other places where I won't necessarily have that

#

It looks like I could make my scenes Addressable, so that things in them reference the same objects that I'm getting from LoadAssetsAsync

#

but this is a pretty small thing (just a way to find things like setting and stats objects), so I'm not sure I want to wholly convert to addressables here..

#

I do think I understand Addressables a lot better after running into this brick wall, though :p

plain terrace
#

Doing this without Addressables requires something similar -- you can't just ask for a list of valid scene names

plain terrace
noble carbon
# noble carbon Is there a way to get all Remote Addressables Content Size in Addressables? Like...

Hello there friends, If you wonder how to get all Remote Addressables Download Size, I made a post in Unity Forum:
https://forum.unity.com/threads/how-to-get-catalog-update-download-size.1527076/#post-9533122

fading totem
#

Is there a good way of ensuring all assets are built properly. I literally had so many situations where I have to play the game again and again to ensure that some sprite is not missing. Then I have to clear and rebuild it again. I have 1k+ sprites in the game I need some better way for this ;/

real basin
#

Hi has anyone using CCD encountered this error?
Just asking if I'm doing something wrong or have some settings setup badly or if it's just a bug in the CCD package.
It happens when I try to select Cloud Content Delivery as the Remote in addressable profile.

Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) (at <761cf2a144514d2291a678c334d49e9b>:0)
Unity.Services.Ccd.Management.Http.ResponseHandler.TryDeserializeResponse[T] (Unity.Services.Ccd.Management.Http.HttpClientResponse response) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Http/ResponseHandler.cs:55)
Rethrow as ResponseDeserializationException: JSON integer 2200142865 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 1011.
Unity.Services.Ccd.Management.Http.ResponseHandler.TryDeserializeResponse[T] (Unity.Services.Ccd.Management.Http.HttpClientResponse response) (at ./Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Http/ResponseHandler.cs:59)

I think it happens because the ContentSize in CcdRelease.cs is Int32 and should probably be long so it can handle releases bigger than 2GB.
It is pretty limiting because this happens in most of our projects and just because it can't parse the "file size" it will fail displaying the CCD remote environments at all.

rancid portal
#

Is there a way to quickly and cleanly transfer and force all formerly not AssetReference fields become that type or a type derived from them by using the already serialized data there?

floral flint
#

Hello. Is it possible that I want to load an asset from a personal server by Addressable while that asset is not in any group?

#

For example, I have 2000 textures and I built them by Addressable and I put the data that Addressable gave me on my server and I want to load it from the server. Can it be removed from the group and removed from the project? And if I get the Android output, will it take the data from the server and show it to me?

hoary rampart
frigid stag
plain terrace
#

For now, I don’t have a strong reason to migrate.

granite tendon
# frigid stag This is why it is suggested to convert everything to addressable whenever you wo...

I'm also thinking about this same problem. I understand the issues of having different instances when assets are referenced in a scene while also being loaded as an asset reference. However I'm kind of stunned at the implication of having literally everything being instantiated via Addressables. It feels like such a massive break from the traditional Unity work flow and game architecture of building your UI and basic game world in a scene - is anything other than static meshes and lighting data allowed to be in the scene at all? I suppose a couple manager classes but that's it. If you're working on a game without baked lighting (like most 2D projects) is there any reason, literally any reason at all, to split up your game into multiple scenes?

I've already started a non-trivial hobby project that embraces this approach, but it is tedious to have to manage the loading/instantiation/pooling of these addressable prefabs. For example, all the inventory item slots on my inventory screen UI are prefabs that are loaded + instantiated + pooled, and it works, but it is annoying that I can't just reference the prefab directly in the scene. I had a separate project that was very traditional, but I'm starting to realize as soon as I use any addressables I'm going to have this problem, as you've alluded to.

Are there any good resources (or better yet: open source examples) for building a game like this?

"I know what I have to do but I don't know if I have the strength to do it".jpg

frigid stag
granite tendon
# frigid stag You just need to load the scene ?

No I'm just talking about how I'm noticing the duplicated assets, how I have to be careful about ScriptableObjects that are referenced in scenes, etc. It feels like Addressables inherently introduce all these problems, but I've never really seen official documentation on it, just a few forum threads and posts like yours that all come to the same conclusion: literally everything must be addressable or nothing is addressable (or you just ignore and work around duplicate instances, which can feel broken or hacky)

frigid stag
#

Officially, they say to use Addressable for everything if you are going to use it.

robust elbowBOT
agile ginkgo
#

Maybe a dumb-ish question, but I assume it's not safe to release an addressable GameObject prefab asset (loaded using LoadAssetAsync) right after instantiating it and I have to hold onto the original prefab GameObjects while the instances are being used?

I'm getting Hidden/InternalErrorShader shader in the build (but not in the editor) on the instances if I release the original prefab, because it seems like... the shaders are getting released as well? >_<

random mango
# agile ginkgo Maybe a dumb-ish question, but I assume it's not safe to release an addressable ...

ReleaseAsset is for when you want to maintain your own reference counts. Normally you’d not release(unload) your assets by force while they are being used by an instance. A prefab is just a collection of asset references and config data after all, so force-unloading it is likely to get you into trouble, but it’s not guaranteed to cause issues either, for example if the prefab doesn’t depend on any other assets.

noble carbon
untold garnet
#

is it possible to convert some asset type variable in script (for example Scene) into AssetReference variable?

real basin
#

So the new version of CCD Management package got released fixing one issue that was making it basically unusable for projects with 2GB+ of content. (rewrite a single int to long)
But the addressables package didn't get updated with a new assembly definition that would define the ENABLE_CCD since it doesn't include ccd3.0.0 in any version.
Is the only way to overcome this by defining the ENABLE_CCD project wide in settings?

sturdy vigil
#

I have a friend who's using unity and the addressables system. When he selects a scene asset it's supposed to have an addressable checkbox at the top, but it doesn't. And he's not able to drag it into a group. What's wrong with his addressable settings?

the left screenshot is what my scene in the inspector looks like, the right is his

#

we're both using an sdk unity project so our addressable settings should be the exact same so im guessing he messed something up by changing it. My main question is what settings could change this?

#

and just checked with him it only happens with scenes. he can make prefabs addressable

opaque sandal
#

Is there anyway to fix the pink material for Android play on Editor?

hearty iris
#

Hello everyone, I have an issue with addressables
When I try to load an addressable and load the scene in the bundle everything works but when I do it another time the process randomly stops when I try to get the content catalog.
Here's my scrpit:

if (dir == "") return;

//load from the directory were spawning from
AsyncOperationHandle<IResourceLocator> loadContentCatalogAsync = Addressables.LoadContentCatalogAsync(@"" + dir, true);
await loadContentCatalogAsync.Task;
print("Loaded content catalog");
//call this when were done loading in the content
IResourceLocator resourceLocator = loadContentCatalogAsync.Result;
print("Locating Scene");
resourceLocator.Locate("default", typeof(SceneInstance), out IList<IResourceLocation> locations);
print("Located Scene");

//if there are loactions in the adressable spawn them
if (locations != null)
{
    foreach (IResourceLocation resourceLocation in locations)
    {
        print("Loading scene");
        AsyncOperationHandle<SceneInstance> scene = Addressables.LoadSceneAsync(resourceLocation);
        print("Loaded scene");
        ModInstance modInstance = Instantiate(ModInstancePrefab).GetComponent<ModInstance>();
        modInstance.SetValues(scene, loadContentCatalogAsync);

        //do this when the object is spawned
        scene.Completed += OnMapInstantiated;
    }
}
else
{
    print("No scene in bundle");
}

PS: I use addressables for a modding system so the user might want to load the same mod twice.
Could you help me? Please

strange wasp
#

it's suspicious that you're releasing loadContentCatalogAsync's handle and then trying to use its result. Then passing it into a method which is doing something using an incomplete async op and a completed and released op

hearty iris
#

thank you for your help i will try to set release after completed on false

#

AsyncOperationHandle<IResourceLocator> loadContentCatalogAsync = Addressables.LoadContentCatalogAsync(@"" + dir, false);

#

is that what you meant?

#

if it is, I still have the same issue

#

I cannot load the content catalog after loading it once

#

the script doesn't continue after line 4 if you prefer

strange wasp
#

does it stop there or does the app freeze? maybe you have an uncaught exception

hearty iris
#

the app still runs normally, i can go back to the main menu and I don't have any exception

strange wasp
#

the exception might be swallowed if you threw that above code into an async void method, so more context is probably needed now

hearty iris
#

I confirm these lines are in an async function

#

here's my scene

#

when I click on one of the maps on the list at the left, the script get the path of the catalog

#

then, when clicking on the "Load" button, the code above is executed

#

may you want the full script?

#

here's the gameobject the script is attached to

#

and here's is the function that is called by the button on click

    public async void SpawnMod()
    {
        //if were not spawning anything dont spawn anything
        if (dir == "") return;

        //load from the directory were spawning from
        AsyncOperationHandle<IResourceLocator> loadContentCatalogAsync = Addressables.LoadContentCatalogAsync(@"" + dir, false);
        print("Loaded content catalog");
        await loadContentCatalogAsync.Task;
        //call this when were done loading in the content
        IResourceLocator resourceLocator = loadContentCatalogAsync.Result;
        print("Locating Scene");
        resourceLocator.Locate("default", typeof(SceneInstance), out IList<IResourceLocation> locations);
        print("Located Scene");

        //if there are loactions in the adressable spawn them
        if (locations != null)
        {
            foreach (IResourceLocation resourceLocation in locations)
            {
                print("Loading scene");
                AsyncOperationHandle<SceneInstance> scene = Addressables.LoadSceneAsync(resourceLocation);
                print("Loaded scene");
                ModInstance modInstance = Instantiate(ModInstancePrefab).GetComponent<ModInstance>();
                modInstance.SetValues(scene, loadContentCatalogAsync);

                //do this when the object is spawned
                scene.Completed += OnMapInstantiated;
            }
        }
        else
        {
            print("No scene in bundle");
        }
    }
strange wasp
#

wrap it in a try...catch so any exceptions don't get hidden from you

hearty iris
#

ok give me 2 minutes

#

just added the try catch and still nothing in the console

strange wasp
#

time to set a breakpoint and dive into that method to see what's happening, then

hearty iris
#

ok I am reading how to do it

#

here's what I got the first and second time I loaded the mod

#

what should I understand?

strange wasp
#

? step through your method, verify which part is getting stuck, then debug the stuck part

hearty iris
#

Just found that on the 2nd attemp I got the error "Attempting to use an invalid operation handle"

#

But not on the first

hearty iris
#

1st time

#

2nd time

#

no path change

hearty iris
#

Just fixed the issue, it was the fault of the async function. Switched it to a normal void and added a trigger on LoadContentCatalog.Completed to call another function

#

nevermind still doesn't work

hearty iris
#

looks like I can't load any other addressable at all after loadinng one. Can someone help me? Thank you

strange wasp
#

whatever SetVAlues is doing is the next thing to look at

hearty iris
#

I don't await the scene load to spawn ModInstance since it's tagged as DontDestroyOnLoad

#

SetValues just set the SceneInstance and the OpHandle of the resource locator

#

then on leaving the scene i execute this code along with destroying all gameobjects (except ModInstance because it still runs a process)

strange wasp
#

I don't mean scene load, I mean the AsyncOperationHandle<SceneInstance> called scene in your code snippet. Your SetValues is definitely premature since you might pass an invalid handle to it if scene load fails. I don't know which handle you're releasing there in the latest snippet, but something is weird in your logic if ModInstance is holding that handle, is DDOL, and you're releasing the handle. Why is ModInstance DDOL in the first place if it's not reusable?

hearty iris
#

ModInstance is DDOL because I use a singleton at the script's start so I can access its functions directly from any gameobject in the bundle. I will try to instantiate it when Addressables.LoadSceneAsync().Completed is triggered

strange wasp
#

you mean instantiate the SceneInstance right? because you instantiate ModInstance immediately. It's entirely possible you have ModInstances for mods which didn't load at all if anything goes wrong

#

and if ModInstances are kept around, and are releasing their handles, and then you try to do something with those handles later ... boom, invalid operation handle

hearty iris
hearty iris
strange wasp
#

No, it sounds like you have a fundamental design problem

#

I assume you are iterating over existing ModInstances at some point and loading their scenes, right? Outside of the snippet you have shown

hearty iris
#

No, I have a gameobject in the mod loader scene that list every mod in the mods folder

#

And for each mod this gameobject instantiate a button which on click set the gameobject loading path to the mod selected

#

then I load the mod using the function showed earlier

#

maybe you want a record of the editor?

#

I think I should have posted this video earlier to show you the project structure

strange wasp
#

I mean, it looks like it's throwing an exception when you try and load. Which call? And look at the exception details

hearty iris
#

here are the breakpoints I've set earlier (1st and 2nd time)
The second time the LoadContentCatalogAsync function throws Attempting to use an invalid operation handle

strange wasp
hearty iris
#

Thank you, I think I will try it this way. Sorry to have bothered you

meager vale
#

Any of y'all ever get "content state file is missing" when trying to build to CCD?

lament ivy
#

damn, addressable is still a dumpster fire

#

anyone using it for large worlds without hitch?

remote mica
#

hey, how do i make addressable syatem for multiplayer?

meager vale
#

In my latest tutorial you'll learn how to optimize your audio assets in Unity games with Unity's cloud content delivery and addressables.

https://youtu.be/bpktjrM6eIo?si=E3eO0n9sVO-cehSy

In this Unity tutorial I teach how to use addressables and cloud content delivery for you music assets. Instead of bundling those assets in your game build they are downloaded asynchronously from the cloud thus reducing your build size, reducing the load time for your games and allowing you to add or modify your music assets without requiring yo...

▶ Play video
half dagger
#

hello, when my scene gets built (a script changes or something), so of my downloaded packages get copied from /Assets/Plugins (where I move all my downloaded packages) to /Assets/{PackageName}. why is that?

nimble hatch
#

Hello, I am tryuing to load a scriptableobject projectileSpell which inherits from Spell as such:

 var loadSpellOperationHandle = Addressables.LoadAssetAsync<Spell>(spellGuid);

However I am getting an error:
Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. Could not load Asset with GUID=ed4ab643e454b4b66a171f601e49460f, Path=Assets/Scripts/Abilities/ProjectileSpell.asset. Asset exists with main Type=ProjectileSpell, which is not assignable from the requested Type=Spell

Does this mean that LoadAssetAsync doesnt work with derived classes? If so what is a good way around this problem?

teal mortar
green frost
#

anyone seen this kind of error when using v2 sprite atlas and addresables?
Cannot recognize file type for entry located at 'Assets/SpriteAtlas/UISprites.spriteatlasv2'. Asset import failed for using an unsupported file type.

eager nymph
#

Hi, I am using addressables for remote contents and I am caching them. If download fails with an error, I want to load cached version. Is it possible with this system and how? (I am using remote catalog and updating previous build) Thanks for helping.

snow trench
#

is it normal, that 150 kb of 260 sprites takes to load 15 seconds?

#

nevermind, read that awaiting each load is a bad idea, since they can take some time. Rewrote it to a task list and it's done in half a sec

mellow root
#

just asking hoping someone had a similar issue, for some reason i don't understand unity is adding remote addressables in my local catalog I don't understand the logic of it, it doesn't seem normal

#

so I have local addressables and remote addressables, with obviously different set of folders to build and load. Remote catalog is correctly built together with bundles, but local catalog includes the remote ones -_-

next cairn
#

How do I tell where downloaded addressables are cached? I'm changing the way our remote addressables are stored, but it seems to work exactly the same way as before even when I changed it to something obviously broken for testing purposes. So I presume it's falling back on the already-cached data. How do I find this and delete it, to force the data to be re-downloaded?

chrome swallow
next cairn
#

I'll copy them somewhere else so that if things screw up I can replace them

next cairn
#

alright @chrome swallow I deleted those files, then deliberately started up the app in a way where the addressables should fail by searching in the wrong URL because the files have been deleted, yet the files in load anyway

#

weird

earnest raptor
#

Hello. I have a problem. When assembling bundles in Addressable, the RAM overflows and the assembly is not assembled. How can this be fixed? In one place I read: "I solved that by creating binary files containing all label data for each tile and added the binary file as TextAsset to the prefab, reducing the file size of all prefabs to 280 MB. So the build process worked again.". But I don't know how to do this. Can someone tell me?

half dagger
#

Hello, for some reason when I build my game, an old version is built, and im assuming it has something to do with addressables. even though i try to clean all the cache + all my asset groups have the "use asset bundle cache" unticked, when i build the game, the scenes are loaded with a (Cached) after the name, suggesting they ARE built from cache.

How can I fix this?

Any help is appreciated, thanks!

earnest raptor
#

Hello. I have a problem. When assembling bundles in Addressable, the RAM overflows and the assembly is not assembled. How can this be fixed? In one place I read: "I solved that by creating binary files containing all label data for each tile and added the binary file as TextAsset to the prefab, reducing the file size of all prefabs to 280 MB. So the build process worked again.". But I don't know how to do this. Can someone tell me?

earnest raptor
#

Hello. Does anyone know how assets from addressable storage in an address, for example in Application.persistentDataPath

wooden urchin
valid matrix
#

I'm looking for some tips and general help with dealing with large prefabs/folders using addressables. Currently i have large (2gb) prefabs/folder of assets which I had been storing in resources. The workflow was fine, I could edit the prefab and just build or run in editor to see the changes.

As the project scaled, I hit the resources file size limit, so I've put all of my prefabs/data into an addressable system. I have split each addressable folder using groups so i can specify which one i need when loading to stop ram from being obliterated. Loading from the addressable is fine, but I'm having trouble with the workflow. If i make a change to any of the files or prefabs in the addressable folders, i have to trigger a full addressable build which is taking a very long time (between 15-60 mins!).

Is there a better way to handle the workflow? Ideally, I want to be able to build the delta for the addressable, but it seems to take the same amount of time if i clean then build than if i just trigger a new build on its own.

This is using unity 2019.4 - addressables version 1.16.19

mild flax
# valid matrix I'm looking for some tips and general help with dealing with large prefabs/folde...

This isn't a full answer but - if you're not already, you probably want to switch to having multiple catalogs - which isn't super straight forward but it means you can have builds of different assets and load them in together. At that point, likely an editor script to enable certain assets or groups, building just those as you need. You can even try and automate this by checking when assets or dependencies update but that's very involved.
We do this on a very granular level - one bundle (sometimes even one catalog) per prefab which makes for quick iteration. I'd also suggest hash-based naming for bundles but really, I'm just commenting in case any of the above helps point you in the rough direction - answering this fully is very involved. Best of luck.

valid matrix
floral flint
#

Hello everyone. I have textures that I want to load from the server. And I'm doing this using addressable. But unfortunately it doesn't work. I put the Server Data folder in the server and gave its path to Load Path. I am sending the picture of the grievances. Thank you for your guidance

brittle silo
#

just want to check my understanding
so addressable is the upgraded version of asset bundle and still use it albeit hidden?
and it will work better because it's the upgrade version or is there any case that is better to use only asset bundle?

elder thunder
#

It there an alternative to addressable that allow remote file download without modifying existing code

uncut flame
plush bolt
#

Hey gang, does anyone know how to force the client to download a bundle from unity CCD? I'm trying to ensure I am getting the latest version of a bundle but there doesn't seem to be any obvious way to make sure, so much of this process is based off locally cached bundles, I'm not even sure what to delete locally to try to force this...

opal warren
#

I have a unity 3d project. I need to link (github , assetbundles , git , addressables and any other pieces of software to create a system like this).

1 - I need to publish the project on pc and mobile so I have 2 versions of each models.

2 - I also intend to update it content online dynamically and players with receive updates of models and assets (like assetbundles).

3 - I also need version control on the project mainly for code but no problem if I had another for the binaries.

4 - I also need to open source the game without releasing the (part of source code related to admob or other private parts of game like some or all of the 3d assets).

5 - I need it that to be connected somehow tweaks in the published code would reflect on the version I have in the game but changing the private version I have in the game doesn't alawys change the open sourced one (I should be a able to choose either that would reflect on the open sourced one or not).

6 - I want that system to be automated , easy to use , robust , flexible and modular because I will use it in most of my unity projects.

7 - that system is prefable to be local i.e. on a local pc or a local lan server.

I know I will use {asset bundles , addressable , github} but I have no idea how to construct such a system

random mango
opal warren
hearty timber
#

How do I make a copy of a AssetReferenceT<T> when it points to specific FileID?
In the editor I want to make copy sprite refence field to another sprite refence field.

#

I've tried destinationSpriteRef = sourceSpriteRef; but this shows up like Reference to sourceSpriteRef.$0.SpriteRefence and doesn't seem to be correct.

#

I've also tried destinationSpriteRef = new AssetReferenceSprite(sourceSpriteRef.AssetGUID); but this only seems to get me a reference to the main asset (the texture) and looking at the AssetGUID it only contains the file's GUID and not the fileID

#

Nvm, I found SubObjectName which solved my problem if I ran it after the constructor.

solid furnace
#

Hey, can anyone help me out I want to create a 3D environment in unity where a person can interact with a character basically and it will answer the basic questions asked by the user. I have created the environment but I'm having a hard time doing speech to text and text to speech conversion. I am trying to use azure but it's simply not working. Would really appreciate some quick help.

#

I am new to unity, but I have to build this for a competition and not much time is left, so if anyone who knows about this, some help would be appreciated

agile hazel
#

I dont know if this is the right place to post.. but a question.. is it bad to have camera as a child to player? If so why? is there a perfomance hit in this? maybe stupid question haha

hearty timber
#

However to answer your question, there are no performance penalties as far as I'm aware.
The main reason why you might not want to child the camera to the player is that you end up with a very static camera unless you do a bunch of math to counteract it (but then the question is why you would child it?)

#

But it might be perfectly fine in your case. Minecraft for instance I'm pretty sure just does this and also don't offset the camera at all.
A common case apart from "smooth camera" is for platformers you usually don't want to update the camera height too quickly, so jumping doesn't start moving the camera in height unless you jump/fall far enough or when the player character lands.

#

All of this is very much game feel 101 and like stated before depends a lot on your game and how you want it to be.

#

TLDR: If it works for you or make something simpler, go for it.

hearty timber
# solid furnace Hey, can anyone help me out I want to create a 3D environment in unity where a p...

This isn't the right channel for this I would suggest, #💻┃code-beginner or some art channel on the topic of creating a 3D environment.
What you're asking is very broad question that sounds a lot like "I have a game idea.. how do I make it?" to which I would suggest finding resources to help you be it blog post, video tutorials, friends who know those topics, etc.
On the toipic of how to use Azure I would suggest that you just make it as easy as possible such as Text -> Speech with a simple text field and maybe just saving the resulting audio to a file somewhere (or play it via a Audioclip).

Simplify as much as possible for each task and tackle them in what they are and once you're comfortable with how it works start implementing it into the rest of the game.

#

Good luck with the competition and focus on learning from it even if you don't have any showable results in the end.

hearty timber
# agile hazel I dont know if this is the right place to post.. but a question.. is it bad to h...

Here's a short video from the creator of Super Smash Bros on the topic of camera anchors, and while it's not necessarily 1 to 1 with Childing camera to the player they are closely related https://youtu.be/kLmd2F8LaLk

The center point in a game is the spot the camera is focused on. It's always there, but you can't actually see it.
While the center point generally follows the player character, it shouldn't anchor to them. Why is that?

▶ Play video
gaunt knot
agile hazel
#

thanks! 😄

heavy karma
#

Hi, I've started to convert a game to use the Addressables and starting to port to mobile. I'm researching how can I have the same assets with different quality settings, e.g. 4k texture, fhd textures, etc. The solutions that I have seen so far seem not very good or scalable.

A Unite conference talked about using labels for the quality and the same key for the asset, but is using string for the key and my understanding is this will not work using for example an AssetReference (since the assets are different). This is the example that is inside Addressables-Sample GitHub.

I've read in the Unity forum a discussion about Addressable variants that seems what I want but there isn't any good conclusion. There's a hacky solution renaming the different assets to use the same hash name.

I was hoping for something for example in Android that you have special folders for different screen quality and you just put there the different assets with the same name.

Does someone know a better way to handle this? Information about Addressables is cryptic and sparsed...
Thanks

slate timber
#

Has anyone tried LOD with Addressables?

vale ferry
# slate timber Has anyone tried LOD with Addressables?

Lod in addressables, is here. now your turn to add mipmap streaming into benchmark
https://github.com/Unity-Technologies/HLODSystem/blob/master/com.unity.hlod.addressable/Runtime/Streaming/AddressableHLODController.cs
UnityHlod; Normal; HLOD; Rate; Reduction;
GpuDrawCalls; 5642; 942; 16.87%;
Tris /_\ ; 8.0M; 3.0M; 48.75%;
TextureStream; _____ ______ ______

GitHub

Contribute to Unity-Technologies/HLODSystem development by creating an account on GitHub.

radiant bridge
#

why when I set a label to a folder inside a group: all assets in that group from outside get labeled too and not just desired folder? Am I missing something?

slate timber
brittle silo
#

is addressable assetadded to the build once it's loaded?
or will load everytime the game started?

radiant bridge
#

is it normal that this Addressables component have flickering value from 0 to 1 value in Collection Index?

#

or I messed up something using async loading?

slate timber
#

How do i get built-in material from code easily (URP-SimpleLit)? Documents are not pointing anything for the built-in materials.

teal mortar
slate sandal
#

Can we load an asset catalog from another game in a unity editorscript, and then export an asset bundle that properly references the other games catalog?

I'd love to just text this myself, but I cannot access my PC right now and am very curious about this system.

idle burrow
#

Can addressables load a ScriptableObject?

teal mortar
muted copper
#

Is there a way to check if Addressables "need" to be built, from an editor script? As in, changes have been made to Addressable content since the last build

teal mortar
muted copper
brittle silo
#

hello
how can i make an asset to be streamable for addressable to be added to custom server?
currently i only know how to do editor hosting and want to try server hosting but can't seem to find how to package the assets

radiant bridge
#

https://hatebin.com/gmftdbqbij

what I'm doing wrong with my unload scenes by AssetReference object code? it works and unloading scene, but I keep getting error about invalid handle all the time when I unload scene
I tried to store handles and scene instance object before and releasing them, but it keep throwing me this error about using an invalid one even when I'm doing it that way
how to release it properly then?
(in my concrete classes there only 2 lines of code for other stuff, so it doesn't matter in that case)

radiant bridge
#

ah, I've got what is wrong
I'm using handle that was auto released on unload, lol
didn't noticed that this parameter flag is true by default
changed to manual in unload method and released it after successful unload - works now without errors, heh

cerulean trail
#

Does anyone know how to delete a remote asset from the addressables cache?
I'm trying to use: Addressables.ClearDependencyCacheAsync(assetReference);

But I get this error:


AssetBundle 'cc9ae92ce5a81c39811b7010007e850f' with hash '3f0fa6feed9bfea62aadf043781ab104' is still in use. ```

but the weird thing is when I load the game next, the addressable is deleted from the cache
vale ferry
#

private bool _isLoaded=false; //then it is by default false

dry ledge
#

Hey has anyone used the addressable package for unity WWise? I'm trying to find an example of loading the Soundbanks through the addressable system rather than just AkBank component. If I load the addressable soundbank it seems like it succeded but I fail to post any events unless theyre contained in a sound bank i load the old/simple way through just putting an AkBank on a global obejct and loading on awake

steep hatch
#

hey guys, i made an android game and i wanted to publish it on google play store, but when i tried to put the aab file it says that its bigger than 200 mb and doesnt let me, to avoid this i now use addressables, but now i want to get the addressables from a server, is there a way to use addressables with play asset delivery ? if not can anyone help me make the unity cloud content delivery work ? i have made the code to load the addressables and stuff i just need help with getting it from the server, its giving me an invalid URI: invalid port specified, even though i chose the correct loadpath that unity gave me in the addressables profile

steep hatch
brittle silo
steep hatch
#

hey i need help with Addressables.LoadSceneAsync, im using it in my project in the start i use the download dependencies with the name of the scene and then i tell the code when its done downloading, load the scene with the same name that i used in download dependencies, on my laptop it works fine, but when i build it on android and try it, the download dependencies work but the load scene doesnt do anything

brittle silo
barren ginkgo
#
                    string errMessage;
                    if (e.Message == "path")
                        errMessage = "Invalid path detected during build. Check for unmatched brackets in your active profile's variables.";
                    else
                        errMessage = e.Message;

                    Debug.LogError(errMessage);
                    return AddressableAssetBuildResult.CreateResult<TResult>(null, 0, errMessage);

Who in Unity's developer team thought it was a good idea to catch all exceptions and print just the error, making it almost impossible to track down issues by removing the stack trace ._.

brittle galleon
reef steeple
#

Help fundamentally understanding and using Addressables

onyx plank
#

Releasing a AsyncOperationHandle doesn't invalidate it

graceful totem
#

currently i am facing some errors in addressable
can anyone help me to sort out all my errors.

#

Here is a errors:

Unable to open archive file: Library/com.unity.addressables/aa/Android/Android/ed3c0a8dae69eb5def6b163b48e1f784_unitybuiltinshaders_902d97b8e1277922e9f46a7a3fa469a4.bundle

RemoteProviderException : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android/ed3c0a8dae69eb5def6b163b48e1f784_unitybuiltinshaders_902d97b8e1277922e9f46a7a3fa469a4.bundle'.

UnityEngine.AsyncOperation:InvokeCompletionEvent ()

OperationException : GroupOperation failed because one of its dependencies failed
RemoteProviderException : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android/ed3c0a8dae69eb5def6b163b48e1f784_unitybuiltinshaders_902d97b8e1277922e9f46a7a3fa469a4.bundle'.

System.Exception: Dependency Exception ---> UnityEngine.ResourceManagement.Exceptions.OperationException: GroupOperation failed because one of its dependencies failed ---> UnityEngine.ResourceManagement.Exceptions.RemoteProviderException: RemoteProviderException : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android/ed3c0a8dae69eb5def6b163b48e1f784_unitybuiltinshaders_902d97b8e1277922e9f46a7a3fa469a4.bundle'.

graceful totem
#

Yes

teal mortar
graceful totem
#

Yes all files available and there paths also accurate but they cannot fetch objects they work accurate on simulator mode but cannot work on android mode.

polar walrus
crude sentinel
#

i'm not actually using Addressables, but my own AssetBundle management system. but here seems like a good place to ask:

when i use the new api Object.InstantiateAsync it seems the main thread is still blocked. I see things happening across the job threads, so it seems it's at least partially working. Why is the main thread blocked here? Is it only an issue in the editor, maybe? (currently making a build to test that)

hexed shell
crude sentinel
#

if i change this code to the following: i can at least get the Schedule() and IntegrateOnMainThread() calls on separate frames. but the Schedule() is always quite slow

#

i see it is indeed happening across jobs, and the whole operation IS faster than the Object.Instantiate() api, but not by much

hexed shell
#

I do think a large portion of it is still unavoidably synchronous, and afaik it is improved on builds

crude sentinel
#

this is profiling in a build btw ^

hexed shell
#

I haven't used it myself, but I've looked at some of the threads on the forums

crude sentinel
#

i think the problem is the Schedule() is so slow

#

if it wasnt the whole operation would be very fast

#

the IntegrateOnMainThread() is always smaller (which is the part that cannot be async, due to Awake() calls - but in my case that's actually okay)

glossy kraken
#

How early in a project should i commit to AssetBundles/Addressables?

lilac arrow
#

Hey, i have a question if i'm doing something wrong here:

I have all my scenes in addressables as seperate groups (level 1, level 2 etc.) then i have my SO's in one group "ScriptableObjects", when i load lets say "GameData" SO by AssetReference, the instance of this SO differs in level 1 and level 2. I kinda know that when i have these scenes in addressables, they pack their stuff seperately, but i can't wrap my head around it. How could i retrieve the same instance of GameData in level 1 and level 2?

vague oar
#

Hello there, I am addressables to manage my project. I am stuck with modifying scripts with the bundle. Is there any solution to for this as the c# code is compiled in to assembly according to different platforms. How can I modify scripts without having to update the build everytime?

polar walrus
polar walrus
vague oar
#

Yeah it can't be done with addressables but is there any other workaround for this

teal mortar
polar walrus
vague oar
#

Okay thanks

ripe jay
#

I got this issue with assertion issue. Would anyone know how to fix it

#

This person had the same issue

frank crag
hot prawn
#

did you rebuild the addressables? looks like its attempting to use a cache that is not the same

teal mortar
#

this doesn't sound like an addressables question?

river ginkgo
#

how do i fix this?

scarlet atlas
#

im getting unity collab errors for my project and have no clue why or how they are there. Never touched it and cant fix it myself, idk what to try!!!

there all saying i dont have a definition for various items, and some say theres no accessible extension

umbral socket
#

Anyone else have issues with building adressables being super slow? It's a real killer on platforms where you have to do builds to iterate. Change an asset of some sort & suddenly it's time to spend 15 minutes rebuilding addressables.

cloud aurora
#

Hey so I have an AssetReference object for a scene. I need to make sure that reference isn't to any of the currently open scenes. How would I do this?

stable marsh
#

Anybody know whether you should be including UniversalRendererData scrobs in your addressables when working with URP and addressables? I'm having an issue with a screen overlay effect not applying in build while it works in editor and i'm suspecting that the overlay material is somehow getting duplicated despite the material being included in the addressable groups.

novel aurora
unreal sleet
#

If I plan to use addressable assets, how does that interact with other assets from the store that aren't addressable?

novel aurora
unreal sleet
#

I meant from the asset store, or I guess any imported projects that aren't built around addressable assets.

#

I guess I could have worded that better

novel aurora
#

But apart from that, you can create a prefab, using some third party component on it and so on and just add that prefab to the addressables group and load it with the addresasble way.

unreal sleet
#

I think... I get it. I might just need to make a basic project so it starts to click.

rain quartz
#

Hi, could someone clarify what is going on with Addressables on the screenshot, please?

Trying to stream scenes for open world game, I've fixed a problem before related with async operation that I've tried to load a bunch of scenes at the same time and I got Loading.LockPersistentManager

Build: Infinix Pro 30
Unity: 2022.3.20f1

shell python
#

- Using addressables report for the first time; do i get this right that refs in the explore tab (total size (+refs) column) are only showing bundles and not assets in them that are referenced?

stable marsh
stable marsh
#

yeah i doesn't happen i a new project without addressables. eg. it works as it should in the new project

vital quartz
#

my right click and my middle mouse button are both pans, how can i change one to orbit?

somber crypt
#

hiya! in the context of:

AsyncOperationHandle downloadDependencies = Addressables.DownloadDependenciesAsync(key);```
what can `key` be? can it be a group or a label as well as an assetKey?
#

if not, how do I iterate through a label or a group?

#

ooh it can be a label, that may work then 🙂

somber crypt
#

this is what my addressable groups look like. is this enough for it to work? does it include sub-objects of folders marked as addressable? (the grey entries)

right now when I build I don't see the addressable assets going anywhere. there's nothing in the addressable report, they're empty

#

ok I found out how to build addressable content 🙂

somber crypt
#

does anyone remember what the setting is to get the editor to retain the downloaded asset bundle between plays?

wild holly
#

People who have faced the Addressable problem
Unable to load ContentCatalogData from location Library/com.unity.addressables/aa/Windows/catalog.json
I use remote resources to download
PlayModeScript -> Use Existing Build
I run it in the editor, there is a directory in the project with a configuration file, but something went wrong and the system cannot find it....

somber crypt
#

I am stuck. when I load my level (I use the same scene and build it out programmatically depending on the level requested) I do DownloadDependenciesAsync first. I use the labels of the addressable groups.

AsyncOperationHandle handle = Addressables.DownloadDependenciesAsync(
            new List<string> { "Base", "StoryCommon", storyName }, 
            Addressables.MergeMode.Union, 
            false);```
it does the download and finishes but then spits out this error:

UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Asset found with for Key=Library. Key exists as multiple Types=UnityEngine.Texture2D, UnityEngine.Sprite, UnityEngine.TextAsset, which is not assignable from the requested Type=UnityEngine.ResourceManagement.ResourceProviders.SceneInstance
UnityEngine.AddressableAssets.Addressables:LoadSceneAsync (object,UnityEngine.SceneManagement.LoadSceneMode,bool,int)
StoryLoader/<DownloadDependenciesAndLoadScene>d__7:MoveNext () (at Assets/PoppyAndBuddy/StoryPrefab/Scripts/StoryLoader.cs:66)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)```

the key definitely exists, but I'm not sure what it means by multiple types. the library label applies to a folder asset. will that break it?

stable marsh
#

That error sounds like you have 2 assets in your addressable groups with the same name.

somber crypt
#

can it be any of the groups? I do get a warning about that on build (but it's a spine2d thing soooo... don't wanna fuck with it)

#

the entire library group is in the screenshot

stable marsh
#

Yeah I believe the addressable names need to be unique across all groups.

somber crypt
#

is this set up okay?

stable marsh
#

all of those seem to have different names. I don't know why you have one asset that is highlighted white and the rest are greyed out. Is it set up in a special way?

somber crypt
#

these are the two things reported during the build

#

that shader isn't in the group

#

(or shouldn't be) but it's a dependency included with the base build (or is meant to be)

#

yeah that shader isn't in those locations in the project. it's in its package

stable marsh
#

yeah no, duplicated assets shouldn't be the problem here. Thats just the addressables making sure they have the references they need. I'm thinking more if there are any of your assets in the addresable groups which have the same name under the "Addressable Name" column.

somber crypt
#

lemme check

#

there really shouldn't be but who knows

#

we're talking about the entire asset name right? not just the last part of the path?

stable marsh
#

yeah

somber crypt
#

this should be fine then, I populated my groups by dragging the level's project folder into it

#

hmm I think I was building some stuff into the asset bundles that I want in the base install anyway, prefabs

stable marsh
#

so this error happens at runtime or during the build process?

somber crypt
#

I had an errant scene load command, removing that fixed it

#

it was at runtime

#

I don't want to load a scene at all

stable marsh
#

ah, grand. 🥳

somber crypt
#

bleh more errors. it's time to stop

#

thank you for the help 🙂

shrewd edge
#

Hi all, is addressables worth using still if I already have a game backend working which can give me signed URLs for my content? Basically the idea is that the game client makes a request on app start to my backend to see if new content is available, if it is, I request it as JSON data which includes a signed URL to an asset bundle. I can't figure out if I'm reinventing the wheel and it's a bad idea or if it's the best solution since I already have a backend and need signed URLs so my content stays private

somber crypt
#

I don't really understand yields yet aside from it's somehow async. I think the way I'm doing this is wrong though, because it never waits for the download to finish before proceeding and failing to load my assets:

AsyncOperationHandle handle = Addressables.DownloadDependenciesAsync(
                bundles, // new List<string> { "Base", "StoryCommon", storyName }, 
                Addressables.MergeMode.Union,
                false);

            while (!handle.IsDone)
            {
                Debug.Log($"Downloading dependencies progress: {handle.PercentComplete * 100}%");
                yield return null;
            }```
#

or maybe this is a better example of what I'm failing to get:

        //Check the download size
        AsyncOperationHandle<long> getDownloadSize1 = Addressables.GetDownloadSizeAsync("Base");
        yield return getDownloadSize1;
        if (getDownloadSize1.Result > 0) bundles.Add("Base");```
is my understanding correct that it'll execute the async operator then wait to do the final line? or am I misunderstanding it?
stable marsh
#

Yields aren't really async per se. In functions called through "StartCoroutine()" they delay execution. eg. every time you reach a yield statement the execution of that function is paused till next frame allowing other functions to run inbetween.

So in your top example it will start an async operation that is downloading the dependencies, then it will print the debug log and then pause execution. next frame it will check if the downloading operation is done, if it is not then it will print the debug again and wait another frame. This continues untill the download operation is done.

if you yield return IEnumerators(which i think AsyncOperationHandle implements) then the coroutine will ask for the next element from the enumerator, wait for a frame, then ask for the next ect. untill the IEnumerator doesn't have anymore values.

#

both your usecases seem correct so I guess what is going wrong here must be where/when these codes pieces are called.

high talon
#

not an addressables question

sly hare
#

I see why you would assume this is "addressables", but this is almost as basic question as it goes, so try #💻┃code-beginner

fading cave
#

@high talon,@sly hare
i tought that addressable are the questions about some unity problems
and if not could you please please point me to the right direction
because i'm not able to find the right channels for unity problems
tbh sorry to say but... this unity discord has sooo many channels that i can easly get lost in all of it
i will appreciate this very much

thanks in advance

high talon
fading cave
#

thank you for the right dir

warped quiver
#

Addressables.GetDownloadSizeAsync(key); what is the meanin of "key" ? i know it can be label. But i want to download groups of addressables.

#

how can i do that

sudden mural
#

I'm trying to load GLTF/GLB files through the addressables system while using GLTFast.

  1. Is it necessary to extend the AssetReferenceT for it?
  2. Is it also necessary to override the LoadAssetAsync somehow?
  3. If not, what is a better approach here?

My goal is to have a local mods folder where others can include gltf/glb files as mods and to load them in dynamically into a UI list to choose from, to place them in-game.
Help would be super appreciated 🙏

(PS: my idea was also to rebuild a catalog of available files from the local mods folder, but I'm still learning)

north stratus
shrewd edge
#

Has anyone developed a game using Addressables that involves a backend with server authority, such as a CCG? I am facing a challenge of syncing my backend with my game client when using Addressables. For instance, let's say I have a card graphic along with metadata for the card, such as "mana cost" and "hit points". I have already developed a backend for all the server logic, which needs full authority and understanding of the catalog of cards to use for example the "mana cost" values for calculating things in the backend. On the other hand, the game client requires both the metadata and the graphical assets, including "hard" assets like 3D meshes. If I use Addressables to deliver the content like the graphics, I am not sure where to store the metadata.

Should I include it in the asset bundle/addressable as well? If I did, this would create duplicate data in the server and client. The only solution I can think of is to have my backend API offer a method like GetCatalog(), which gives the metadata to the client. However, this approach seems to defeat the purpose of using Addressables, as my GetCatalog() endpoint would have to account for versioning and such if things got updated, so why not just include a link to a CDN with an asset bundle on it at the same time?

Am I missing something? Can anyone suggest an efficient way to sync metadata and graphical assets in a card game using Addressables and a backend with server authority?

somber crypt
#

Quick question about coroutines: if I don't care that things are getting locked up (e.g. it's a loading screen) so I still need to go through all of the IEnumerator and yield return null stuff?

    AsyncOperationHandle<GameObject> goHandle = Addressables.LoadAssetAsync<GameObject>("gameObjectKey");
    yield return goHandle;
    if(goHandle.Status == AsyncOperationStatus.Succeeded)
    {
        GameObject obj = goHandle.Result;
        //etc...
    }```
or can I just run this and have it work:
```cs
GameObject obj = Addressables.LoadAssetAsync<GameObject>("gameObjectKey").Result;

not sure if I'll go with that, just curious if it'd work. trying to understand if it's always async and you need to wait for it, or if it'll run inline if forced to

#

the other question I had, is if I'm calling FunctionA as a co-routine, can I call FunctionB from inside it normally and have it use yield statements, or does FunctionB also need to be a separate co-routine?

#

I.. guess as long as I'm returning the results of FunctionB from FunctionA the original co-routine will continue to operate as expected?

#

yeah that makes sense

#

I guess I have quite a big tree of nested loading functions, so all I want is for that entire tree to pass results back up the chain so it all works smoothly

#

that'll make my load bar smooth yay ¯_(ツ)_/¯

stable marsh
#

It will always load the asset async. so if you don't wait for it your code will continue before it is done loading(potentially crashing and burning if it needed the loaded assets). I think the AsyncOperationHandle has some sort of wait function you can call on it if you would like it to straight up freeze the application till it is done. Then you probably wouldn't need to run a coroutine, but ofc then you are freezing the application so there will be no animations or loadingbar movement visible while loading.

Yeah you can call functions inside a coroutine, they will behave as normal. If the methods return an IEnumerable you can yield return the results of that function in your coroutine without starting a new coroutine.

teal mortar
somber crypt
#

I'm changing everything over in my code now but I'm still stuck on how to structure this.

        public IEnumerator LoadAndInterpret(string path)
        {
            if (path == null)
            {
                Debug.LogWarning("CSV path null");
                yield break;
            }

            AsyncOperationHandle<TextAsset> loadHandle = Addressables.LoadAssetAsync<TextAsset>(path);
            yield return loadHandle;
            if (loadHandle.Status == AsyncOperationStatus.Succeeded)
            {
                text = loadHandle.Result;
            }

            return Interpret(text);
        }```

how do I return a useful value when I'm done instead of just an IEnumerator value?
#

I guess I don't need to interpret it immediately

#

actually better question, is there somewhere that lists what happens on various yields?

#

like, yield return null eventually makes its way up the chain and the frame finishes running, starts a new frame and the execution resumes at the same point on the next frame, yeah?

#

what do you return on success? the same thing?

#

I'm having trouble fitting the execution into my mental picture

stable marsh
#

If you are running this function as a Coroutine you wont really have access to the return values and you usually just yield return pointless values to indicate that you want to skip a frame. If you want to have access to a value generated / loaded in the function you should save it in a global variable of the class. eg. if interpret(text) returns a string you would like to use elsewhere then dont do "return Interpret(text)" but instead declare a class variable called eg. "_interpretedText" and do "_interpretedText = Interpret(text)" in the function.

if you are not running this function as a coroutine, then the value it returns is essentially a list(its a bit more complicated than that, but you can largely treat it that way) containing all the elements that were yielded in the function.

stable marsh
# somber crypt like, `yield return null` eventually makes its way up the chain and the frame fi...

Yeah, it will continue from right after the yield statement when you yield return eg. for a silly example:

CalculateMass()
yield return null;
Jump()
yield return null;
PlaySound()

This codeblock if run as a coroutine will immediately calculate the mass, then wait 1 frame. Next frame it will then Jump and wait another frame. The frame after that it will play a sound. Then it will be done executing and the coroutine stops.

#

Code is a little silly ofc as the three things happen so fast after eachother it would probably feel like they happened largely at the same time anyways, but thats the idea.

teal mortar
# somber crypt I'm having trouble fitting the execution into my mental picture

it's complicated because unity is kind-of-abusing the iterator function syntax for coroutines, so you're at the mercy of unity magically interpreting things certain ways and it has some pretty big built in limitations like this! unity is allowed to stop running your method whenever it likes and won't give you access to any kind of return value or exception to catch

#

the simple way to return a result is to add a callback, like in your case you could add a Action<TextAsset> onComplete parameter and call that at the end of the coroutine

#

async works similarly to a coroutine but it's a real C# feature designed for that purpose so you can return results, throw exceptions etc while waiting across multiple frames as if it was a normal method

candid pelican
balmy wing
#

If you drag a non-Addressable asset to an AssetReference field, the system automatically makes the asset Addressable and adds it to your default Addressables group. this can be disabled right?

#

You cannot drag non-Addressable assets to a field with the AssetReferenceUILabelRestriction attribute.

young basin
#

Hi, I'm looking for some help with my implementation of Addressables. I was working for a long time on 2021.3.4f1, implemented Addressables and scene loading via addressables. Recently upgraded to 2022.3.25f1, and have had a lot of difficulty getting Addressables back to where they were before the upgrade. I am currently facing an issue where Addressables are correctly downloading in build, but when I go to load a scene I have just downloaded, I get an error that the scene is not in the build. This is a new issue since upgrading the editor version. Does anyone have any ideas what might be causing this?

teal mortar
young basin
# teal mortar how are you loading the scene?

I'm using Addressable bundles for each scene, and labelling them. To load them, my menu is getting a reference to each addressable asset path, and passing that along to my scene loader, and loaded using

loadHandle = Addressables.LoadSceneAsync(addressableKey, LoadSceneMode.Additive);

//where loadHandle is

private AsyncOperationHandle<SceneInstance> loadHandle;```

This was working fine in my previous editor version (2021.3.4f1), but now when loading scenes in build I get an Asset not found error, the same as if the scene wasn't included in a local build. No errors are being thrown in the editor, with PlayModeScript set to Use Existing Asset Database
teal mortar
#

hmm could you paste the whole error too?

young basin
young basin
# teal mortar hmm could you paste the whole error too?

I have noticed as well, previously when using Addressables, adding a Scene to a Group would remove it from the build settings included scenes menu. That has not been happening anymore, on my previous implementation in 2021.3.4f1 or in my new 2022.3.25f1 versions. The scenes are not included in build, but I'm wondering if there presence in that menu is potentially causing a conflict as well. Will remove them and see

teal mortar
#

yes, you would want to remove them anyway otherwise you'd get two copies of the same scene asset built into the game, one in the base build and one in a bundle

#

not sure but that could be part of the problem you're seeing 🤔

young basin
#

Cool I was thinking that, just threw me because it was fine, so I'm assuming there was maybe something lost in the editor version upgrade that is now causing a conflict there, because it is the same error as if the scene wasn't included in the build.

For clarity, they are in there but unchecked so not included. My assumption was maybe they are now looking to load it from the Build Settings menu and hitting the conflict there, especially because I believe Addressables scene loading just uses SceneManagement anyway

teal mortar
#

hmm, i can't remember the details but yeah it's something like that, once a scene is loaded in addressables it's visible in SceneManager... so if those scenes are kept in the list at runtime (idk) but not in the build, it could be looking in the wrong place

teal mortar
#

i believe it depends on your asset naming too, if you use original asset names in bundles, the scene name will be the same as if you included it in the build, otherwise it'll be the hash or whatever addressables renames it too

young basin
# teal mortar i believe it depends on your asset naming too, if you use original asset names i...

Yeah so the assets are all the same names, at least as far as the editor is concerned. I would just expect to throw an error as well if it was getting conflicts between build / addressables but it seems to be fine, downloads and loads the scene from remote. Only throwing the error in build.

But I've deleted the library, and addressables package, and doing all fresh builds now so will update once thats done and get the error message from logcat

young basin
# teal mortar i believe it depends on your asset naming too, if you use original asset names i...

Right, have finally gotten through the rebuilds. Here is whats happening:

I log in, download the addressable scene, and go to load it. That gives this error in LogCat: 2024/04/23 12:46:20.381 3171 3193 Error Unity Scene 'Assets/SCENE-NAME.unity' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.

Rebooting the app, no download as the addressable has cached. Load the scene, (tracking then fails in VR), and the scene loads in successfully.

#

At this point I guess it rules out my scene loading structure as thats the same as before, and working after a reboot. Leads me to believe its something with caching, specifically on Android builds. Don't think I can replicate this at all in the Editor, even when using Android build groups

quaint marsh
zealous igloo
zealous igloo
#

How can I use the addressables system to instantiate prefabs that are not in the project? Basically I want to add/remove prefabs in an Addressable Group and create a build, but to do that I need all prefabs in the project. It's not manageable in a large scale, how do I solve this? Because right now every time I want to update the group, I need all prefabs I want in the project.

I want to download the prefabs remotely, they are not going to be in the project from the start, and I don't understand how I can use the addressables system to deal with this in a manageable way. I need to be able to add/remove prefabs to the group that will be used to create the build...without having to have every single prefab I'll use in the group inside the project! Is there a way to do this?

zealous igloo
#

Hello @candid pelican, thanks for your reply. So ultimately, I need to have a project with all the prefabs I want to build this catalog? It's not possible to edit this catalog without having to have the prefabs in the project?

teal mortar
#

you can't add items to a catalog that aren't in the build, but you can add more catalogs

zealous igloo
#

@teal mortar I think Unity Addressables isn't really the solution I'm looking for, is it? Imagine I have thousands of 3d models, but these models are wrapped in prefabs with Monobehaviours. My intent was to use Unity Addressables as an easy way to store these prefabs remotely and retrieve them, but what you're saying seems convoluted. My current workflow is to store the 3d models, fetch them, and instantiate the gameobject with the desired Monobehaviours, basically reconstruct the gameobject I want with the model + Monobehaviors.

I though I could use Unity Addressables to make this easier by storing the prefabs pre-made. But I have to actually have all the prefabs in the project to do this? Like wtf.

strange wasp
#

Your ask is a paradox, that's why the solution seems convoluted because nobody quite understands what you want. How do you have prefabs, if you didn't assemble them in a project somewhere?

zealous igloo
#

I do assemble them. I do have them in the project. But, ultimately I want to delete them from the project so that it's downloaded remotely. Basically, I need to have a second project with the thousands of prefabs I want, to build a catalog, and use that catalog on my main project?

strange wasp
#

no, you misunderstood. You put them in a remote bundle. You host the bundle and a remote catalog. The build will not include the remote bundle

zealous igloo
#

Yes, but the project is still built with the thousands of prefabs. That still goes to the build. I basically would need to exclude the folder with the prefabs from the build then. On runtime, the prefabs would be fetched from the bundle. I think what I'm trying to say is, that one way or the other, I need to have the thousands of prefabs in the Unity's directory, but I have to exclude it from the build because the prefabs will be downloaded from the remote bundle.

strange wasp
#

the build will only include the prefabs (and referenced content) if you put them into a Resources folder, or have direct references to them somewhere and they get past tree shaking

zealous igloo
#

Oh, so they aren't included automatically if they aren't referenced in the scene? I didn't know that. Hm..

zealous igloo
#

I guess this works then, never realized it. Only referenced stuff is included, and scripts, and Resource folder. Nice. Well that changes things I guess, it's not that cumbersome...the project will have thousands of prefabs but it won't go to the build by default so who cares. Ok thanks lol

zealous igloo
#

Thanks a lot @strange wasp .

Is it possible to make Unity select a profile if I'm in play mode, and another profile if it's a build?

strange wasp
#

I assume you can just modify AddressableAssetSettings. Might need to poke around a bit if that doesn't work by itself

zealous igloo
#

I can manually select the profile in use, but I'm looking for an automated way to check this

strange wasp
#

modifying the AddressableAssetSettings's activeProfileId didn't work?

zealous igloo
#

Sorry about the dumb question but do I need to create a script to modify it? I thought there was some configuration somewhere for this

strange wasp
#

not as far as I know

gentle thicket
#

can anyone give an overview of what these localization asset groups contain?
E.g. what is "Shared", where is table data, where is content for table keys etc.

candid pelican
#

@zealous igloo also u need to have monobehavior scripts in ur second project too (project which will be loading prefabs). Asset bundles doesn't contain class definitions however u can attach the script on the prefab and can change serialized data and then make addressable build and then when u fetch that prefab it will be downloaded/loaded w/ the serialized value so no script change is required

sudden mesa
#

Hello, I'm having an issue when trying to analyze my addressables. I get the following error

#

ArgumentException: An item with the same key has already been added. Key: 418b078393f67de48837cd871515ef75

#

How can I find this duplicate addressable with this key in my project ??

#

In my addressable groups, I have no addressable with this key.

#

I'm suspecting a failed previous sync messed my files and put back some files I had deleted a long time ago which is now causing this issue.

sudden mesa
#

There's a script here which allow to check duplicate names and after running names, I have no duplicate...

#

I guess I'll have to uninstall/reinstall the addressables then.

#

Ok nevermind, I found the culprit. I had two groups with same items. Due to this failed sync, a group I had renamed got duplicated.

#

Would be nice if the actual name of the asset was displayed instead of the encrypted name. Much faster to figure out

drifting hare
#

Hi, if I have a scene that is an adressable does code inside of it work or is like asset bundles?

candid pelican
drifting hare
#

Hmm okk and there is no work arround like for your game to be moddable it run the things in runtime

candid pelican
#

for that i believe u need dlls

#

or moonsharp

#

never tried it so not sure

teal mortar
#

yes, addressables doesn't make any difference here, it's the same as using an asset bundle

drifting hare
#

Yhea Im using asset bundles the problem is I load the dll but it doesnt detect the script still

teal mortar
#

what's in the dll?

drifting hare
#

In the dll is a compiled script by roslyn that just makes a cube rotate

#

but it was for testing that I wanted full mod support to my unity game but how Im seeing It will be very difficult without using a scripting language

teal mortar
#

you can load new classes but not unity objects like scripts at runtime from dlls, although there are some 3rd party tools which might be able to do that (bepinex etc although i haven't personally used them)

drifting hare
#

Yhea but it's a bit sad that unity doesn't let us add mod support to our games easily and we need to rely on 3rd party tools

teal mortar
#

it depends how complicated you need it to be, for simple mod support it's simple enough to make a script that you can customize with plugins without any special unity features

drifting hare
#

Yhea that's easy to do make a game dependable of files that the players can change or change the assets of a game but without the code

#

but like adding a new functionality to the game is very hard to do that

teal mortar
#

for lots of games it'd be preferable to have a defined mod API instead of loading arbitrary unity components anyway

drifting hare
#

Yhea but I was thinking of doing something like KSP

#

but it's not possible for the knowledge that I have because from what I understood they changed the build of unity for it to work with modding atleast that was what I read in a forum

gentle thicket
#

Is it possible to use addressables with TextMeshPro?
E.g. how do I set a Fallback Font Asset to another Font Asset if font assets are addressable?

teal mortar
#

you can override some behaviour to load sprite assets etc from addressables, but lots of stuff is just designed as hard references

gentle thicket
teal mortar
#

that's the exact problem our game has lol, and we just have to find memory savings elsewhere 😔

sudden karma
#

Hey, I've been trying to make my Localization system dynamic so that I would not need to make new builds of the game after release, but just update the Localization Settings remotely by using the Unity's Cloud Content Delivery system. At this moment I'm only using the Localization to change my game's name. It all works great when changing system language, the game name changed, but if I make changes and push them to the cloud content delivery it doesn't change the name of the game. I understand that I need load the addressables again once when opening the app, but it should have changed them then?

Can anyone point out what am i doing wrong?

[SerializeField] private AssetReference localeSettings;

void Start()
{
    // Load the asset reference asynchronously
    var loadOperation = localeSettings.LoadAssetAsync<LocalizationSettings>();
    loadOperation.Completed += OnAddressableLoaded;
}

private void OnAddressableLoaded(AsyncOperationHandle<LocalizationSettings> handle)
{
    if (handle.Status == AsyncOperationStatus.Succeeded)
    {
        LocalizationSettings.SelectedLocale.Metadata = handle.Result.GetMetadata();
        Debug.Log("Loaded localization settings successfully");
    }
    else
    {
        Debug.LogError("Failed to load localization settings: " + handle.OperationException.Message);
    }
}
novel aurora
#

And do you actually load the files from the CDN or is it just loading your local version?

sudden karma
#

The game name is under the built android app. And yes, the remote addressable loading is working. I'm loading also other assets in the game and it works as it should.

novel aurora
#

And I guess they are all part of the same group and so on. Nothing to distinguish between this content and that content?

sudden karma
#

Yes

novel aurora
#

Nah, I mean, you want to updarte the app name in the android system UI?

#

or inside your game in a textfield or whatever

sudden karma
#

Could the issue be that I must get rid of the old table content before loading the updated version?

novel aurora
#

I am not sure, but I am not aware that you could change the name of the app/game itself inside your code

#

That would be a big security issue, if it was 😄 Or I just misunderstood you

sudden karma
#

I have different names for the app depending on the android system language and they change accordingly. The issue is that if i make changes to the addressable, let's say I want the English game name to change from "ABC" to "123" it doesn't change even tho i load the addressable from the remote server 😦

novel aurora
#

But where do you set those names for the system language?

sudden karma
#

In Unity's localization system?

#

😄

novel aurora
#

So again, I am quite sure, you can not change the name of an app from INSIDE the app. But you can predefine names for different languages that get delivered to the playstore outside of the runtime scope

#

Imagine your favourite banking account app and me building an app that just calls itself similar with the same icon and some fake login fields 😉

#

You should test, if any other string is updated apart from your gamename. Like a teststring inside a UI field in your scene.

#

Because that should work. But changing the gamename in your App view of your system wont update from new files I bet

#

Ah I guess you are doing this with your sprites already

sudden karma
#

Yea, that' no issue. The localization system works good within the game itself, also when updating the assets remotely. The app name is the only thing that does not want to work with me. 😅 I do see your point tho, it really might be so that it's not even possible. Just sad, since I thought i could add new languages for my game later in the line via cloud content delivery, change the app name along with the text assets too, but i guess it would require a new build of the game and an update to the app store.

novel aurora
#

To add new game names for each language, you ahve to build a new version to the store sadly. So Unity does create the xml stuff for the android build, which will be some metadata of the app itself instead of the addressable localised strings.

#

I mean, you still can add names for the game already and just fallback to english, if no localisation is found for now. So you can still update the content at least

sudden karma
#

Yea, I guess I'll just add the app names pre-emptively even tho the game doesn't have the localisation for that language yet like you suggested. Thanks for the answers. I should had asked already long time ago from here. Been banging my head to the wall for way too long with this one. Thanks again!

novel aurora
nimble plume
#

Just to confirm, you can not change the name of the game once its built. The name is set during the build process, we have no control over it after the build 😉

candid pelican
nimble plume
#

Sorry shaders are not my area of knowledge. Can you file a bug report?

shadow stump
#

these enemies that I am instantiating with a timer show up in the editor but are invisible in the game?

#

any idea what might be the cause of this?

shadow stump
#

update: fixed it

gentle thicket
#

Why is the workflow for content update different from the new content build workflow?
Why can't I just do a "new build" and update the files of the changed AssetBundles in CDN?

#

Maybe I'm misunderstanding smth, but the Unity documentation is demanding a pretty unreasonable task:
Provide the addressables_content_state.bin file, that was created during the latest content build.

If "latest" means the latest content build that users have downloaded, there might be 10 versions of content users have. Some players might not play for a month and then return, skipping 3+ updates, some may update immediately.

How does it all work, how can I support all versions of content that are in production and be able to give everyone updates?

candid pelican
#

@gentle thicket Generally when u ship a build, u create new addressables build before making the player build so that the content catalog gets included in the build.
The creation of new addressables build process also creates addressables_content_state.bin artifact which u can use to update existing build that u just created via Update Previous build workflow. What happens is that ur player build, on each app startup (if u have enabled allow automatic catalog updates) matches the hash w/ the remote catalog (which is stored on cloud) and then downloads the content catalog file from the remote location if its the updated one. Now lets say, u want to have multiple locations where the content can be fetched but that is not part of the original catalog that was shipped in the build then U can use the Addressables API to manually download the catalog and initialize new resource locations (Here is the link for that https://docs.unity3d.com/Packages/com.unity.addressables@2.0/manual/LoadContentCatalogAsync.html#load-additional-catalogs). U need to come up w/ a dynamic system for ur existing build so that it can fetch the new addressables content location at runtime. Unity Remote config can be an option or u can create a scriptable object which holds urls for all the content catalogs and make it as addressables so u can update and reupload its bundle. Another solution can be to make a REST api where u can send the request on build startup and it gives u all the catalog locations. I personally have not tried just simply updating the bundle files without updating the content catalog but Im pretty sure that it can cause CRC mismatch error.

gentle thicket
gentle thicket
#

And another question, no matter how many incremental content updates users have skipped, as long as I did all incremental updates are based on the same addressables_content_state.bin, the users will be able to catch up, am I right?

#

And the final question, am I right that if the remote content catalog is different, it invalidates ALL cached asset bundles, even if the remote AssetBundle CRC is the same as cached?

P.S. If it's true, sounds kinda grim actually, because every play market update (which usually requires a fresh catalog upload) will mean whole re-download of content inside the game, defeating a good chunk of the benefit of addressables.
I remember that when playing Hearthstone, which is a Unity game, I didn't have to redownload already cached content inside the game, if I got an update from play market (I think).

candid pelican
candid pelican
# gentle thicket And the final question, am I right that if the remote content catalog is differe...

yes.
U don't need to create a new addressable build every time. If u r using the same machine and project, the content catalog will be cached and gets injected into the build.Also, u need to disable create addressable build on player build option from the top level settings otherwise new content catalog will be created everytime build is made.
Im not sure if hearthstone uses addressables. maybe they use assets bundles and used their own protocol for ccd.

gentle thicket
candid pelican
#

no worries. glad u found it helpful

gentle thicket
gentle thicket
#

And another question, is it possible to get a correct download size before downloading, taking into account the MergeMode of the upcoming download?

candid pelican
gentle thicket
somber crypt
#

when I build addressables groups, where do the bundles build to? need to upload them to my server
I found a likely location under [project]/ServerData/Android but everything is a month old, I've made and built changes since then

brittle silo
#

how to better use addressable for webgl?
i alr successfully implemented it and it works fine even with mirror
but there is a problem that i can't seem to fix
as you know when using mirror in webgl it wont allow hosting server from webgl so i need to use the windows build version as server and for webgl to works only as client
when i am using editor as server it works fine because can directly use the addressable asset
but when i tried to use the build version there is an error in which it can't load the addressable bundle because the bundle type is not for windows platform but webgl
so i m stuck on how to make it works
in summary my question is :

  1. how to make addressable asset bundle can be loaded by 2 different platform
  2. if not possible shld i use different address for each platform?
  3. if possible how the exact setting that i need to use?
    thank you
strange wasp
plain terrace
#

I'm experiencing random, long hangs caused by (my use of?) the Localizaiton package

#

The profiler indicates that it happens in LocalizationBehaviour, which is responsible for releasing async operation handles

#

        void LateUpdate()
        {
            var currentFrame = Time.frameCount;
            while (m_ReleaseQueue.Count > 0 && m_ReleaseQueue.Peek().frame < currentFrame)
            {
                var item = m_ReleaseQueue.Dequeue();
                AddressablesInterface.SafeRelease(item.handle);
            }

            if (m_ReleaseQueue.Count == 0)
                enabled = false;
        }

I'm pretty sure I'm not suddenly generating tens of thousands of handles, but it'll just hang in here for a good 5-30 seconds

#

deep profiling it produced way too much data

#

I am creating a good number of handles (i'm getting localized strings in IMGUI for a debug display)

#

oh 🥲

plain terrace
#

ah, yep, I'm leaking something; the number of handles starts growing without end if I stop and start the game with my debug menu open

#

oops!

#

Oh that's really sneaky

#

My debug menu wound up inserting an item into the release queue as the game quit

#

This meant that the head of the queue asked to be released at whatever frame the game was at

#

It stalls the entire queue

#

So it piles up and up and up until the game eventually gets to the frame I last quit at, and then it has to free a TON of handles

#

(and it wasn't my debug menu, but something else that i used alongside it that runs in LateUpdate)

robust ledge
#

Do I have to build my addressables per platform?
My game is failing to load my addressable bundles with

Unable to open archive file: Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle
Unable to open archive file: Content/Core/packedassets_assets_all_7342ab46f3de123fb6e5f997bbb2fdb8.bundle
Unable to open archive file: Content/Core/fantasybuildings_assets_all_8c691de803acfdec1e3df35736f91ffb.bundle
Failed to read data for the AssetBundle 'commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle'.
RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle'.
Failed to read data for the AssetBundle 'packedassets_assets_all_7342ab46f3de123fb6e5f997bbb2fdb8.bundle'.
RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/packedassets_assets_all_7342ab46f3de123fb6e5f997bbb2fdb8.bundle'.
Failed to read data for the AssetBundle 'fantasybuildings_assets_all_8c691de803acfdec1e3df35736f91ffb.bundle'.
#
OperationException : GroupOperation failed because one of its dependencies failed
RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle'.
OperationException : GroupOperation failed because one of its dependencies failed
RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/packedassets_assets_all_7342ab46f3de123fb6e5f997bbb2fdb8.bundle'.
OperationException : GroupOperation failed because one of its dependencies failed
RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/fantasybuildings_assets_all_8c691de803acfdec1e3df35736f91ffb.bundle'.
System.Exception: Dependency Exception ---> UnityEngine.ResourceManagement.Exceptions.OperationException: GroupOperation failed because one of its dependencies failed ---> UnityEngine.ResourceManagement.Exceptions.RemoteProviderException: RemoteProviderException : Invalid path in AssetBundleProvider: 'Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle'.```
gentle thicket
robust ledge
#

Figured, but didnt see that listed anywhere
Thanks

gentle thicket
#

Is there a way to check if the CDN has an updated catalog available?

Addressables.CheckForCatalogUpdates() checking is really bad, it returns success in case of errors (e.g. try to disable internet and check for updates, it will show success, and that there is no updates). And who knows how many other errors aren't sent up the stack.

I really want to see all silent failures, because I need my content updated before allowing users into the game.

robust ledge
#

I was planning on using that exact method 😦
I guess youll have todo it manually? On trying to connect to the server you could send the Addressable content Hashs, if it dosnt match what the server expects reject

gentle thicket
robust ledge
#

When loading a addressable catalog from a local path using Addressables.LoadContentCatalogAsync what should the *.bundle path be inside the catalog?
I'm unable to load my bundles and i think its the path being wrong

#

My bundle is built from a separate project (via automation CICD)
During my game release, the bundle is downloaded and added into StreamingAssets/Content/Core
During game startup, I load all bundles within StreamingAssets/Content
It correctly finds the bundle but then I get errors like Unable to open archive file: Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle
within the catalog_0.1.24.json all the bundles are listed with a path Content/Core/commonstuff_assets_all_8bf9378e44d010e36fd300307d02a873.bundle
But that path doesn't feel right, what should it be relative too?

teal mortar
#

i think the path is relative to the base path eg where the data folder is

robust ledge
#

Thanks Ill give it a try, my load path does not include streaming assets atm

#

I was hoping the path would be local to the catalog location

teal mortar
#

you can make it dynamic by putting a variable into the path if that helps

robust ledge
#

yea I was just reading up on that

#

but I dont think it would quite work, as I want to support mods,
so a modder would add assets and build some addressables
That would then end up in a Content/MODNAME, feels weird to have to have the build process put the mod name in

teal mortar
#

well if you're loading third party catalogs you don't really have much say over what other people put in the load path anyway so modders can do what they like

robust ledge
#

good point

white carbon
#
        {
            AsyncOperationHandle<T> op = Addressables.LoadAssetAsync<T>(key);

            T asset = op.WaitForCompletion();

            Addressables.Release(op);
    
            return asset;
        }```
I tried to use this method to load sprites; After I assign the loaded sprite to the UI, calling Release will unload the sprite from the assigned UI as well?
somber crypt
strange wasp
#

seems likely you either haven't built since then or changed the build path

somber crypt
#

yup the build path has changed. I moved ServerData and rebuilt and it didn't recreate it

#

ok I've misunderstood what this is probably

#

I think I see what I should do

ivory schooner
#

I'm using unity's cloud content delivery for storing the addressable prefabs.
When I build the addressables content as a single file, I can download it but when I build the addressables seperately, the file is not located even though I have uploaded it in the bucket.
Can anyone help me on using the seperately built Addressables content. I have to download and instantiate the prefab during runtime whenever I press a certain button.

brittle silo
#

is there any that has experience in using Addressable with Mirror for WebGL platform?
i meet some problem in my project in which i cant found the solution in the internet

ivory schooner
#

There are very few resources on addressables.😮‍💨

quasi gate
#

I love the e-books that unity has been making. I really wish they would do one on live ops, addressables, and best practices. There is so much confusion around addressables and it's real easy to brick a live client if you update it wrong.

candid pelican
ivory schooner
#

Is it okay if I share it tomorrow around this same time?
I have my exams going on😐

candid pelican
candid pelican
ivory schooner
#

Thanks!

somber crypt
#

I'm getting this error when I run on an android device:
System.Exception: Unable to load dependent bundle from location Assets/PoppyAndBuddy/Stories/Library/ConfigLibrary.csv

that asset path exists in my group, and it's downloaded the dependencies for that group.

what else can I check?

#

this is how I load the asset:

public IEnumerator Load(string path)
{
    if (path == null)
    {
        Debug.LogWarning("CSV path null");
        yield break;
    }

    Debug.LogWarning("Loading CSV file: " + path);

    AsyncOperationHandle<TextAsset> loadHandle = Addressables.LoadAssetAsync<TextAsset>("Assets/PoppyAndBuddy/" + path + ".csv");
    yield return loadHandle;
    if (loadHandle.Status == AsyncOperationStatus.Succeeded)
    {
        text = loadHandle.Result;
    }

    yield return null;
}```
#

this worked in the editor with remote assets, can it be an android specific problem?

brittle silo
# candid pelican I have never used mirror. but i believe addressables download/load is a strictly...

just a simple one
using mirror to load scene but all the loaded scene will be from addressable bundle
worked fine in the edtor and windows build platform
but when i tried for webgl (windows/editor as server webgl as client) there is an error in which the scene object not spawned, but the weird part is sometimes it spawned
possibly because the gap in which when mirror load the client when joining a room crashing with the addressable load time

candid pelican
candid pelican
next inlet
#

I am trying to load Unity Terrain using Addressables, however in editor (on a Mac) and an Iphone X build, I keep getting this error:

Texture is not accessible.
 #0 GetStacktrace(int)
 #1 DebugStringToFile(DebugStringToFileData const&)
 #2 Texture2D::ExtractImageImpl(ImageReference*, ImageBlitMode, bool, int) const
 #3 PackTextureAtlas(Texture2D*, int, int, Texture2D**, RectT<float>*, int, TextureCreationFlags)
 #4 PackTextureAtlasSimple(Texture2D*, int, int, Texture2D**, RectT<float>*, int, bool, bool)
 #5 DetailDatabase::RefreshPrototypes()
 #6 TerrainData::AwakeFromLoad(AwakeFromLoadMode)
 #7 AwakeFromLoadQueue::PersistentManagerAwakeSingleObject(Object&, AwakeFromLoadMode)
 #8 PersistentManager::IntegrateObjectAndUnlockIntegrationMutexInternal(int)
 #9 TimeSliceAwakeFromLoadQueue::IntegrateTimeSliced(int)
 #10 PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)
 #11 PreloadManager::UpdatePreloading()
 #12 InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward()
 #13 ExecutePlayerLoop(NativePlayerLoopSystem*)
 #14 ExecutePlayerLoop(NativePlayerLoopSystem*)
 #15 PlayerLoop()
 #16 EditorPlayerLoop::Execute()
 #17 PlayerLoopController::InternalUpdateScene(bool, bool)
 #18 PlayerLoopController::UpdateSceneIfNeededFromMainLoop()
 #19 Application::TickTimer()
 #20 -[EditorApplication TickTimer]
 #21 __NSFireTimer
 #22 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
 #23 __CFRunLoopDoTimer
 #24 __CFRunLoopDoTimers
 #25 __CFRunLoopRun
 #26 CFRunLoopRunSpecific
 #27 RunCurrentEventLoopInMode
 #28 ReceiveNextEventCommon
 #29 _BlockUntilNextEventMatchingListInModeWithFilter
 #30 _DPSNextEvent
 #31 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
 #32 -[NSApplication run]
 #33 NSApplicationMain
 #34 EditorMain(int, char const**)
 #35 main
 #36 start

The terrains seem to load fine, but I'd like to get rid of this error. Anyone have any clue what this is about?

candid pelican
somber crypt
somber crypt
#

interestingly, if I do it this way the locationhandle operation returns successfully, but the load asset does not:

 string AssetPath = "Assets/PoppyAndBuddy/" + path + ".csv";
 Debug.Log("Loading CSV file: " + AssetPath);

 AsyncOperationHandle<IList<IResourceLocation>> locationHandle = Addressables.LoadResourceLocationsAsync(AssetPath);
 yield return locationHandle;

 Debug.Log("Location handle status: " + locationHandle.Status);

 AsyncOperationHandle<TextAsset> loadHandle = Addressables.LoadAssetAsync<TextAsset>(locationHandle.Result[0]);
 yield return loadHandle;```
#

also, the asset load operation doesn't return failed. it errors out. there must be something extra bad going on

candid pelican
# somber crypt interestingly, if I do it this way the locationhandle operation returns success...

Im not sure wat could be the issue I just did a small test on a prefab and marked its parent folder as addressable and it worked fine.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;

public class Test : MonoBehaviour
{
    private IEnumerator Start()
    {
        var handle = Addressables.LoadAssetAsync<GameObject>("Assets/Addressables/Cube.prefab");
        yield return handle;
        if (handle.Result)
        {
            Instantiate(handle.Result);
        }
        
    }
}

somber crypt
#

I'll do more testing. right now I'm just stuck on getting one file, I don't know if the others are okay

#

does it matter at all that it's headed for android?

#

does it matter at all that the files aren't marked as addressables included, but they're in the folder that is?

candid pelican
teal mortar
#

our project switched to marking folders for everything a while back and it didn't make much difference, i doubt it's because of that

#

that said, we don't load anything directly by its address so idk if those get stored in the same way when only the folder is marked - we use AssetReference so it's by GUID only

#

maybe try loading the same asset by its guid/an AssetReference, just to confirm if that's the issue?

somber crypt
#

I'll try it just to remove it as a cause

somber crypt
#

it does work if it's not from a build so I guess it does. I'm still looking for the answer then

candid pelican
somber crypt
#

hmm okay

#

I remember when people told me this change would take an afternoon 😄

somber crypt
#

so it wasn't that, phew

#

is there anything obviously wrong with how I get my dependencies?

IEnumerator Start()
{
    DontDestroyOnLoad(this.gameObject);

    // Get the main dependencies on first load, we are currently in LoaderScene

    AsyncOperationHandle handle = Addressables.DownloadDependenciesAsync(
        new List<string> { "Base" },
        Addressables.MergeMode.Union,
        false);

    while (!handle.IsDone)
    {
        Debug.Log($"Downloading dependencies progress (Base): {handle.PercentComplete * 100}%");
        yield return null;
    }

    if (handle.Status == AsyncOperationStatus.Succeeded)
    {
        Debug.Log($"Scene downloaded successfully (Base), starting LoadLibrary coroutine");
        StartCoroutine(LoadLibrary());
    }
    else
    {
        Debug.LogError($"Failed to download dependencies (Base): {handle.OperationException}");
    }
}```
#

I just noticed this warning in the console, shit

Asset bundles built with build target Android may not be compatible with running in the Editor.
UnityEngine.AddressableAssets.Addressables:DownloadDependenciesAsync (System.Collections.IEnumerable,UnityEngine.AddressableAssets.Addressables/MergeMode,bool)
BundleWebLoader/<Start>d__0:MoveNext () (at Assets/BundleWebLoader.cs:18)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
#

I'll try on device again to see if I accidentally fixed anything

somber crypt
#

so it was a new asset bundle build, it's online, and on the device it came down instantly, which seems a bit wrong. 38 frames of 0% then done, no midway download progress. that can't be right.

#

I think it's getting the catalogue and nothing else...

#

this would explain being able to fetch the location for the key and not the asset itself

#

weirdly, when I run it in editor from the build it takes a while to download at least once. then it's instant after that. then it fails, no dependency
simulate groups is obviously slow af but works because of not needing to really get the dependencies

#

I know my host is configured right, and I'm not getting any http errors. dealt with all of those already

#

so, I guess, I'm not downloading dependencies correctly. am I missing a step? I need to get the Base group at least, then load assets from it

candid pelican
candid pelican
#

except on mac the ios bundles will appear fine

next inlet
# candid pelican Try enabling read/write on the texture settings

Unfortunately that did not work. I removed all grass/details/trees from my terrain and was still having the issue. So I checked out the terrain layers and noticed there were many textures with "Alpha is Transparency" enabled. This is a client's project so I did not do this, and obviously terrain diffuse textures should not have any alpha. So I changed these and the errors went away.

However, after fixing all of these textures and testing with my original terrain, the errors popped back up. I can only assume it's because there are many transparent textures being used by the trees/detail meshes on the terrain. Unless there's some reason transparent textures should not work on iOS, I have to imagine this is a bug.

somber crypt
somber crypt
#

I changed my dependency downloader a bit, now it's working. kinda odd. I don't think I did any functional changes

IEnumerator Start()
{
    DontDestroyOnLoad(this.gameObject);

    // Get the main dependencies on first load, we are currently in LoaderScene

    AsyncOperationHandle<long> getDownloadSize = Addressables.GetDownloadSizeAsync(new List<string> { "Base" });
    yield return getDownloadSize;

    Debug.Log($"Download size of Base: {getDownloadSize.Result}");

    if (getDownloadSize.Result > 0)
    {
        AsyncOperationHandle downloadDependencies = Addressables.DownloadDependenciesAsync(
            new List<string> { "Base" },
            Addressables.MergeMode.UseFirst,
            false);

        while (!downloadDependencies.IsDone)
        {
            Debug.Log($"Downloading dependencies progress (Base): {downloadDependencies.PercentComplete * 100}%");
            yield return downloadDependencies;
        }

        if (downloadDependencies.Status == AsyncOperationStatus.Succeeded)
        {
            Debug.Log($"Scene downloaded successfully (Base), starting LoadLibrary coroutine");
            StartCoroutine(LoadLibrary());
            yield return null;
        }
        else
        {
            Debug.LogError($"Failed to download dependencies (Base): {downloadDependencies.OperationException}");
        }
    } else
    {
        Debug.Log($"Scene already downloaded (Base), starting LoadLibrary coroutine");
        StartCoroutine(LoadLibrary());
    }
}```
#

just trying it on the device

#

yeah that worked. thanks everyone for your help

#

#

♥️

candid pelican
somber crypt
#

changed that earlier and it didn't make a difference. it is different, but it's only one extra downloadsize check step

#

I'll take the win 🙂 ¯_(ツ)_/¯

candid pelican
#

quirks of using addressables :p

errant orchid
#

Is the entirety of the Analyze Window missing in v2.1.0?

ivory schooner
tranquil igloo
#

I currently have addressables working. After many youtube vids and some headaches I was able to get the music for my mobile game loading from the Unity Cloud Content Delivery. This was a few weeks ago, and now I am trying to add some PSD files from my project to the Unity CCD.

I created a bucket for music originally thinking I would need some organization for buckets depending on content. Should I create another bucket for PSDs? or use the same bucket I had for music? Does it matter?

misty spear
#

I dont understand Addressable Exception Handling... when I wrap await Addressables.LoadAssetAsync<MyObject>(id).Task in a try/catch, it doesnt catch... I have to check the operation.Status and look at the OperationException

#
public static async UniTask<ItemData> LoadItemData(string itemId)
    {
        ItemData itemData = null;

        try
        {
            if (string.IsNullOrEmpty(itemId))
            {
                throw new ArgumentNullException(nameof(itemId));
            }

            var operation = Addressables.LoadAssetAsync<ItemData>(itemId);
            itemData = await operation.Task;

            if (operation.Status != AsyncOperationStatus.Succeeded)
            {
                Debug.LogException(operation.OperationException);
            }
        }
        catch (Exception exception)
        {
            Debug.LogException(exception);
        }

        return itemData;
    }
#

would it be smarter to just throw?

            {
                throw operation.OperationException;
            }```
teal mortar
misty spear
#

ok, i think just throwing there works for me. Thanks

#

would love to know the reasoning for educational purposes. Is it to make it "safer" for the beginner?

teal mortar
#

just simplicity for easy learning i'd guess, you don't need to know much C# at all to start scripting and exceptions are one more feature you don't need to learn

#

also just efficiency i suppose, since most unity APIs are just calling C++ methods and wouldn't natively throw exceptions

misty spear
#

the ExceptionHandler seems totally useless to me

thorn coyote
#

Hey guys, I have a weird problem with resolving addressable asset even in the Editor. Could somebody please take a look?

It says that key is not there, but I'm pretty sure it is.

#
var handle = Addressables.LoadAssetAsync<HeistTarget>(_addressableKey); 
candid pelican
candid pelican
thorn coyote
candid pelican
thorn coyote
candid pelican
candid pelican
# thorn coyote

change the Internal Asset Naming Mode to Filename instead of full path

candid pelican
thorn coyote
thorn coyote
candid pelican
thorn coyote
candid pelican
thorn coyote
candid pelican
# thorn coyote

Also one more tip, change the bundled mode to Pack Separately otherwise u will load EasyTarget and HardTarget will also be loaded because both of them will be bundled together

candid pelican
tranquil igloo
brisk mulch
#

why there is a full channel for addressables?

are addressables this popular now?

#

i also don't think animation channel belongs in artist tools

there is tons of scripting for animation

for audio too

maybe duplicate those channels in scripting category too

lusty yoke
#

Hey guys, I'm looking into using addressables. What is the 'correct' way to load assets in over a large space?

For example if I had a very large giant island, I'd want to load the trees using addressables. The point of this is to reduce memory usage so that not all the trees are loaded in at once, right? Would I want to use groups of trees for this, or individual trees? If I use groups of trees, would the proper way to do this be to have some objects scattered around and then use the player's position to tell them to load the groups of trees? And if the way to do it is to load individual trees, how would I even go about that?

neon pilot
#

where can i find what to do with the info about duplicated items in addressables report?

candid pelican
# lusty yoke Hey guys, I'm looking into using addressables. What is the 'correct' way to load...

U can download the dependencies and then instantiate when needed. In other words, download the tree prefabs in the background as user traverses the map. Another optimization step u can do, is u can avoid bundle dependency duplicates that is if ur trees share same mesh, material and textures then only download material, textures and mesh once. Then instantiate that tree where ever is needed ( u can place some placeholders or store the positions, rotations of the trees). Use MaterialPropertyBlock to apply material variations to the trees if any.

lusty yoke
lusty yoke
#

I think I found how to use it

neon pilot
tranquil igloo
#

I have PSD spritesheets that I am using. The PSDs have been assigned as addressables and they are in the Unity CCD. When I load them with code I am using:

Addressables.LoadAssetAsync<Sprite>(matchingItem.Key).Completed += operation => { if(operation.Status != AsyncOperationStatus.Succeeded) return; var sprite = operation.Result; sprites.Add(sprite); };

When I build the game I am still seeing the PSDs in the build report which I do not want. Why would they still be in there? I have animations that reference these PSD sprites. Does that matter?

hoary rampart
tranquil igloo
novel aurora
#

Quick question about ReleaseInstance. Does this fire OnDisable and OnDestroy on the object before getting destroyed/released?

teal mortar
tribal coral
#

I've been searching this for a while but couldn't find anywhere... Anyone know if I can change the Remote.LoadPath after the build is done?

Right now I have 3 sets there, "dev", "preview" and "prod", which only change the BuildPath and LoadPath.
I would like to have a single one, and only change the LoadPath when the user opens the game

somber crypt
#

I just put a build on my device and previously-working stuff has stopped.
It's going to download dependencies, gets the size, then the loop reports back 0% and claims it was successful in the next frame.

IEnumerator Start()
{
    DontDestroyOnLoad(this.gameObject);

    // Get the main dependencies on first load, we are currently in LoaderScene

    AsyncOperationHandle<long> getDownloadSize = Addressables.GetDownloadSizeAsync(new List<string> { "Base" });
    yield return getDownloadSize;

    Debug.Log($"Download size of Base: {getDownloadSize.Result}");

    if (getDownloadSize.Result > 0)
    {
        AsyncOperationHandle downloadDependencies = Addressables.DownloadDependenciesAsync(
            new List<string> { "Base" },
            Addressables.MergeMode.UseFirst,
            false);

        while (!downloadDependencies.IsDone)
        {
            Debug.Log($"Downloading dependencies progress (Base): {downloadDependencies.PercentComplete * 100}%");
            yield return downloadDependencies;
        }

        if (downloadDependencies.Status == AsyncOperationStatus.Succeeded)
        {
            Debug.Log($"Scene downloaded successfully (Base), starting LoadLibrary coroutine");
            StartCoroutine(LoadLibrary());
            yield return null;
        }
        else
        {
            Debug.LogError($"Failed to download dependencies (Base): {downloadDependencies.OperationException}");
        }
    } else
    {
        Debug.Log($"Scene already downloaded (Base), starting LoadLibrary coroutine");
        StartCoroutine(LoadLibrary());
    }
}```
#

what have I probably done? could it be a setting somewhere?

#
<i>AndroidPlayer "Lenovo_Lenovo TB 7306F@ADB:HA1NSPJ4:0"</i> Download size of Base: 34764972
<i>AndroidPlayer "Lenovo_Lenovo TB 7306F@ADB:HA1NSPJ4:0"</i> Downloading dependencies progress (Base): 0%
<i>AndroidPlayer "Lenovo_Lenovo TB 7306F@ADB:HA1NSPJ4:0"</i> Scene downloaded successfully (Base), starting LoadLibrary coroutine
#

maybe it's content perms, I did upload new ones

#

and that was indeed it

#

phew

next inlet
#

I have a weird issue going on and I'm wondering if anyone has come across it before. It has to do with shader variants which I know has been discussed before, but I still haven't found a good explanation for how to best approach variants when it comes to addressables. In any case, on to the isuse:

Our team just recently upgraded our project from 2022.3.16f1 to 2022.3.28f1. The addressables package in use now is 1.21.21 (not sure what it was before, it might have been the same, or it might have changed). We are using URP and the issue is present on a Mac, targeting iOS, however it is not present on a PC targeting Windows.

Previously there were no issues. Now, after building my addressable groups, the total size of all bundles is small (54 MB or so), but when I enter Play Mode, Unity loads what is seemingly a **** of variants for the URP/Lit, URP/Simple Lit, and URP/Terrain/Lit shaders. The URP/Lit shader size according to the Memory Profiler is nearly 5GB.

I have tried two approaches. Adding all used shaders to a common Addressable Group, and creating a Shader Variant Collection that contains the shaders used by my other Groups, and adding it to the common Group. Both of these approaches result in the same issue.

To reiterate, this issue did not happen on 2022.3.16f1. The size of URP/Lit there was around 40MB on builds.

It is very possible one of my other team members changed a setting somewhere or did something else that accidently screwed things up, so if anyone knows of a setting somewhere that might be tweeked to fix this issue, please let me know. Alternatively, maybe this is a known bug on this version of Unity and it would help to upgrade to a newer version (if so, I couldn't find any information online about it).

Any help would be greatly appreciated.

next inlet
#

It seems like before it was correctly only compiling the needed shader variants. Now it is compiling all (or at least many more than needed)

next inlet
#

One more thing. It's a problem in builds, not just in the editor.

oak vine
#

Hi there, i've been trying to implement Addressables in my game for a MetaQuest.

I am having issues with the building process, it seems that it doesnt want to get the prefab when running the build.

At first i had issues with not found but switched to AssetReferences and now i dont even have errors, just nothing, no spawn and no debug, but in playmode everything is good...

radiant bridge
#

hi guys and gals!
if I store async operation handle with scene instance and unload it after some time - can I load again the same scene with the same handle?
I want to keep track of unloaded scenes and then load them again by the same handle
is it possible? I'm not very good with addressables, but scene instance is a struct, so this make concern about will it work or not, lol

cloud fog
#

can someone provide an example of loading and unloading an addressable using UniTask? I have a loading example, but not unloading.

teal mortar
teal mortar
novel aurora
#

Did I get this right, that addressables are not unloading from memory?

next inlet
# novel aurora Did I get this right, that addressables are not unloading from memory?

If you have multiple addressables assets packed into a single Asset Bundle (can happen if using Pack by Label or Pack Together), once an Addressable Asset is loaded, it will not be unloaded from memory until either:

  1. All addressable assets that have been loaded in the bundle are unloaded, or
  2. You call Resources.UnloadUnusedAssets (not recommended by Unity as they say it will cause performance problems).
novel aurora
next inlet
#

Unless I am missing something with Addressables, they have to be packed into Asset Bundles. That's what happens when you build the addressables. If you want them to be unloaded from memory immediately when they are unloaded, you just need to set the Group settings to Pack Separately

#

then it will place each addressable in the group into a separate Asset Bundle

novel aurora
#

Thank you a lot for this insight!

next inlet
#

You're welcome!

novel aurora
# next inlet it's this setting

Did not want to be lazy and found it myself 😄 Thanks tho! Testing right now on the glasses and fingers crossed, this will do what I expect 🙂

next inlet
#

@cloud fog are you using scenes?

#

I don't have experience with UniTask but if using scenes you should be able to use that method ^^

cloud fog
#

"Addressables use asynchronous loading to support loading from any location with any collection of dependencies."

#

from the documentation

teal mortar
# cloud fog from the documentation

well UniTask will basically make it easier to deal with anything in Addressables that returns an async handle, like someone mentioned that can include unloading scenes but otherwise Addressables.Release returns void

robust ledge
#

Would it be better to pack each of my buildings onto separate bundles?
If a building is never built no need to load it.
But once built it would very very rarely be destroyed

#

Im building a city builder type game if it matters

#

1 building is currently, 4 prefabs, about 4 meshs and a handful of materials, 4ish different shaders.
They are basically my "characters" so animations, sounds, particles are all per building and likely unique

teal mortar
#

if there's dozens of buildings and only a few ever get built, it might be worth separating them, but if they're all likely to get used at some point, maybe it's better to load the bundle up front so you don't need to wait for assets to load in later?

robust ledge
#

Thanks @teal mortar
I'm aiming for around 100 buildings, and a number of variant. It's likely most of them would be built but depending on game settings some might be skipped/ignored.
I was also thinking I could only build and update the bundle when the building actually has a change which could save bandwidth.
But no idea how to figure out if there has been changes in some assets

solemn apex
#

I need help, kind of tasked with handling updating our game. So far I know the basics of storing AssetBundles in a cloud and getting them, im studying how to cache them and check if its already cached before downloading reduntant files. However im stumped on how to manage small updates, like what if I have a city and only update a bench, my game would prob just redownload the whole city. Whats a good service to handle this for me or what do I start learning

novel aurora
solemn apex
#

yeah haha. reading back somebody said more bundles = more overhead loading. Also just found out about playstore's delta patching so might not even need to use Asset bundling for updates

teal mortar
solemn apex
ebon basalt
#

Is it better for performance to load additive scenes with multiple prefabs, or simply load and instantiate those items when needed?

Right now, my game has several different kinds of enemies. All of them have full ragdolls, AI, lots of components, etc. I have several scenes that only contain 5 enemies each. When needed, I load those scenes and enable the appropriate amount of enemies. This has worked pretty well for my purposes, but on mobile VR I sometimes get lag when loading the scenes in.

I’m wondering if I should just make it more simple and instantiate the needed enemies one by one and get rid of the scene streaming entirely.

next inlet
# ebon basalt Is it better for performance to load additive scenes with multiple prefabs, or s...

Here's my 2 cents, someone please correct any information that is wrong in this:

Loading scenes additively should only be done if your used game memory is too high. The performance of actually getting the content into the scene will be the same as using Instantiate. This is because when loading scenes there is still a final step where Unity needs to integrate the assets into main memory, which is basically equivalent to calling Instantiate. Using scenes, you are basically just making the loading take longer as Unity will need to spend time loading the content from disk to game memory (RAM).

The advantage to using additive scenes is that you can unload the assets when they are not needed, freeing up game memory. Then load them again when needed.

But if you're enemies are going to be needed a majority of time, there's very little point in doing this, as they will almost always be taking up game memory anyway.

novel aurora
robust ledge
#

My custom shaders are marked as addressable, I have even added a custom shader variant collection and it seems todo nothing

#

If i manually change the loaded addressable shader to a local one in the project it seems to work fine.
Any idea how to have a Addressable within the built in (In project A (the main project))
Then in project B (the content project) the same shader exists but isnt built into the addressables there? and when loaded within project A it uses the built in one

cloud fog
#

would someone be willing to help me out with my addressable script with a screen share/voice chat? I am trying to load and unload from an LODGroup and struggling a bit. My programming skills could be better.

novel aurora
cloud fog
#

Another question. I am going to lengths to exclude the shader from my addresable - my thought being that when the material loads it will compile the shader/pack the shader. Am I wrong about this. Should I just be packing a prefab?

#

So for example, I have an lod prefab with materials. I am setting each element as its own addressable and then loading and connecting mesh, textures to materials etc.

#

so the mesh is an addressable, the texture is another one

novel aurora
#

This is confusing 😄 Where did the shader term go within the new example. But anyways. You could separate the textures from the addressable prefab that is going to be using it. But how do you assign it to it? If there is like a reference to it, it will load the other group anyways

cloud fog
#

I am not just loading data, but seeking to unload as well. I have a very limited memory.

novel aurora
#

One thing thats already helping is to use the pack separately setting in your addressable groups. And you could also be using the resources unload if needed on memory warning. Also you could use the addressable analyze tool which actually will separate double dependencies in their own group to clean things up. But thats something that needs to be tested

rancid wigeon
#

so can addressable assets references never be null?

i have an empty array of asset reference yet testing against null is always false:

        AssetReference reference = _asset.GeometryData[i];
        Debug.Log(reference == null);

how can that be when they are classes

#

ive not yet added any references to the array

teal mortar
#

references don't store an object reference, they're saved as a GUID and optionally some subobject info, so if you need to check if it's set you can check if the AssetGUID property is null/empty or use RuntimeKeyIsValid

bitter root
#

Platform: webgl
I am trying to download all my addressable bundles in the background for my game while the user navigates the main menu

            var resourceLocator = await Addressables.InitializeAsync();
            var allKeys = resourceLocator.Keys;

            Addressables.DownloadDependenciesAsync(allKeys, Addressables.MergeMode.Union, false).Completed += (x) =>
            {
                Konsole.Log("Downloaded dependencies.");
            };

but if the user rushes the main menu and tries to load the game scene (an addressable scene), then it seems unity can't understand that its being downloaded in the background and I get an error: Scene 'Assets/MyGameHere/Scenes/GameScene.unity' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.

Is there a secret handshake to download the bundles in the background and if a bundle is needed urgently bump it to the front of the list?

#

(if the user waits long enough for the "DownloadDependenciesAsync" then the error doesn't happen and it can go to the game scene without errors)

bitter root
#

okay, using LoadAssetsAsync instead of DownloadDependenciesAsync doesn't crash. Advancement! 🦾

#

(I am using unitask so I can await stuff that maybe you can't, but this worked)

            var resourceLocator = await Addressables.InitializeAsync();
            var allKeys = resourceLocator.Keys;

            var handler = Addressables.LoadAssetsAsync<GameObject>(
            allKeys,
            addressable =>
            {
                // Do nothing. lol.
            }, Addressables.MergeMode.Union, // Combine multiple labels 
            false);
            _ = await handler;
            Addressables.Release(handler); // Release the assets

This preloads my assets and doesn't explode in my face 😄

quiet tapir
#

How can I make it so the PrimaryKey of my assets be the Asset Guid?

quiet tapir
#

Ha, turns out Guids work as Keys, but you need to remove the dashes from the string :p

bitter root
#

how can I set the remote path as "same as the current url"?
./ is not working 😬

#

Application.absoluteURL might be enough 🤞
UnityEngine.Application.absoluteURL maybeee?

#

almost there 🥲
I just need to write a small getter to fix the path

bitter root
#

it refuses to read my variable 🥲

#

oh, I had to reference my variable in code so unity wouldn't strip the code away 🤔

teal mortar
tardy orbit
#

Hi guys, before using Addressables I had a synchronize function CreateEnemy() that creates(by AssetDatabase.LoadAsset) and returns an Enemy object. Now using Addressables async API inside CreateEnemy(), it can no longer return that object. Are there any conventional ways to fix such problems?

#

there are several callers that expect CreateEnemy to return an object. I'm trying to have minimum affects to these callers

teal mortar
tardy orbit
teal mortar
#

it's generally better to wait if you can, but if you can't then you can just use WaitForCompletion on the operation to get the result immediately

tardy orbit
#

now I make the function 'void CreateEnemy(Action<Enemy> onAssetReadyCallback)', so callers pass in a callback instead of use its return value. Not sure if this is a good solution

tardy orbit
teal mortar
#

ah, then you really do need to make it async

#

passing in a callback like you said is effectively the same thing

somber crypt
#

I'm having a weird problem.
If I do a release build and run on an android device, it downloads the dependencies, loads the assets and runs fine
once I move to google test track that seems to fail though. It seems to download dependencies (not super fast but it clicks over pretty quick) and then it tries to load the first asset but can't find it.
both instances are pulling content from my server. it's serving HTTPS so that's not the problem.
any ideas?

#

if I delete the installed app, does it delete any downloaded addressables content as well?

#

hmm.

2024/06/27 13:19:26.197 12725 12747 Info Unity Download size of Base: 34764958
2024/06/27 13:19:26.269 12725 12747 Info Unity Downloading dependencies progress (Base): 0%
2024/06/27 13:19:32.116 12725 12747 Info Unity Scene downloaded successfully (Base), starting LoadLibrary coroutine

there's no way that should look like that. It's skipping the download.

faint ridge
#

Do anyone know why they remove PlayerDataGroupSchema from Addressables 2?

#

In Addressables 1.X we can just use Addressables.LoadAsync on all resources asset and normal scene, which make all scene can be load easily from one same API no matter builtin or local or remote

#

So I don't know why they remove this useful functionality

carmine spruce
#

I'm having trouble with my camera collision system in my 3rd poerson game, can anyone help? ( since i don't know C# very well i'm using this tutorial: https://www.youtube.com/watch?v=NeuxiCn_zR8&list=PLD_vBJjpCwJsqpD8QRPNPMfVUpPFLVGg4&index=11 ) Here is my code:

In this video (Episode 4) we implement movement animations for our player via animator values, that will be changed based on our input!

► PLAYER MODEL & ANIMATIONS
https://drive.google.com/drive/folders/1HcjzIXnUDMxsd5Pj6s-iFMmuPKr5SajN?usp=sharing

► JOIN OUR DISCORD
https://discord.gg/jzmEVx5

► SUPPORT ME ON PATREON!
http://www.patreon.co...

▶ Play video
somber crypt
#

I am having an issue on android where on first-load my dependencies are downloaded but aren't available after it completes.
on second-load it skips the download since it already has them and just loads them.
what could be happening? it's definitely fetching the dependencies the first time

#

I was thinking about doing a force-reload of the app after download as as temporary fix
also, this only happens with the initial dependency fetch. I download other dependencies separately later and they work immediately after downloading them

solar shoal
#

Having a really strange issue where when I use it to "Use Existing Build" the materials don't apply properly to some of my units but when I'm using "Use Asset Database" everything works just fine. Really confused on what the issue would be

zealous kettle
#

anyone knows why my snippets arent working? i have installed all the extensions but it doesnt work

rancid wigeon
#

if i set a scriptable object as an addressable and it references assets or other scriptable objects in its fields with SerializedField... will the system automatically include them or do i have to go mark those assets as addressable too ?

teal mortar
#

an addressable asset hard referencing a non-addressable asset includes it, an addressable asset hard referencing an addressable asset creates a dependency on the bundle that asset is in, and then there's AssetReference

ebon basalt
#

I'm using addressables to load mods, any idea what's happening here?
I keep getting these errors when trying to load mods through Addressables.LoadAssetAsync<GameObject>()

What's weird is that it's working for a different mod that was created in the exact same way, so I'm not sure what the issue is.

Unity 2022.3.27
Addressables 1.21.21

`RemoteProviderException : Unable to load asset bundle from : file:///C://Users//Public//mod.io//4747//mods//4145145_5320665/Player%20Avatar%20-%20SCIFI_Trooper%20Red%20-%20PCVR//defaultlocalgroup__66e441f555e77035fb37b2c885bde9e9.bundle
UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
ResponseCode : 404, Method : GET
url : file:///C://Users//Public//mod.io//4747//mods//4145145_5320665/Player%20Avatar%20-%20SCIFI_Trooper%20Red%20-%20PCVR//defaultlocalgroup__66e441f555e77035fb37b2c885bde9e9.bundle

RemoteProviderException : Unable to load asset bundle from : file:///C://Users//Public//mod.io//4747//mods//4145145_5320665/Player%20Avatar%20-%20SCIFI_Trooper%20Red%20-%20PCVR//SCIFI_Trooper%20Red_Mono043_monoscripts_d2aa571d0a891571b375a3e6c49a1b1c.bundle
UnityWebRequest result : ProtocolError : HTTP/1.1 404 Not Found
ResponseCode : 404, Method : GET
url : file:///C://Users//Public//mod.io//4747//mods//4145145_5320665/Player%20Avatar%20-%20SCIFI_Trooper%20Red%20-%20PCVR//SCIFI_Trooper%20Red_Mono043_monoscripts_d2aa571d0a891571b375a3e6c49a1b1c.bundle`

peak kraken
#

Hi! Is it an okay idea to use the prefab InstanceId to track addressable ref count? I have assets loaded via labels, and individual assetreferences, and it seems to easiest way to know it's the same asset is to use GetInstanceId

#

and if I want to unload an asset, i'd just keep calling Release until the tracked ref count is 0

peak kraken
#

or i guess i could just put the gameobjects in a dictionary

amber oracle
#
//Load a catalog and automatically release the operation handle
AsyncOperationHandle<IResourceLocator> handle
    = Addressables.LoadContentCatalogAsync("D:\\SteamLibrary\\steamapps\\common\\Beat Saber\\Beat Saber_Data\\StreamingAssets\\aa\\catalog.json", true);
yield return handle;

Addressables.LoadSceneAsync("BigMirrorEnvironment");

Can anybody help me out? I'm trying to load the addressables from another game at runtime. I've added the catalog path which works fine, but an issue arises when i go to load an asset. For some reason it fails to find the path even though it already has the catalog.

ebon basalt
#

Whenever I try to load an addressable, there's now a problem with the m_EntryDataString being broken?

Unity 2022.3
Addressables 1.21.21

FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. System.Convert.FromBase64CharPtr (System.Char* inputPtr, System.Int32 inputLength) (at <b11ba2a8fbf24f219f7cc98532a11304>:0) System.Convert.FromBase64String (System.String s) (at <b11ba2a8fbf24f219f7cc98532a11304>:0) UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.CreateLocator (System.String providerSuffix) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceLocators/ContentCatalogData.cs:522) UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.CreateCustomLocator (System.String overrideId, System.String providerSuffix) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceLocators/ContentCatalogData.cs:473) UnityEngine.AddressableAssets.Initialization.InitializationOperation.OnCatalogDataLoaded (UnityEngine.AddressableAssets.AddressablesImpl addressables, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1[TObject] op, System.String providerSuffix, UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation remoteHashLocation) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/Initialization/InitializationOperation.cs:251)
UnityEngine.AddressableAssets.Initialization.InitializationOperation+<>c__DisplayClass16_0.<LoadContentCatalog>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1[TObject] res) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/Initialization/InitializationOperation.cs:279) UnityEngine.ResourceManagement.ChainOperation2[TObject,TObjectDependency].Execute () (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs:67)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1[TObject].InvokeExecute () (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:538) UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1[TObject].<.ctor>b__38_0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle o) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:150)
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1+<>c__DisplayClass60_0[TObject].<add_CompletedTypeless>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle1[TObject] s) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs:332)
DelegateList1[T].Invoke (T res) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/Util/DelegateList.cs:75) UnityEngine.Debug:LogException(Exception) DelegateList1:Invoke(AsyncOperationHandle1) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/Util/DelegateList.cs:79) UnityEngine.AddressableAssets.ResourceProviders.InternalOp:CatalogLoadOpCompleteCallback(AsyncOperationHandle1)
DelegateList1:Invoke(AsyncOperationHandle1) (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/Util/DelegateList.cs:75)
UnityEngine.ResourceManagement.ResourceManager:Update(Single)
MonoBehaviourCallbackHooks:Update() (at ./Library/PackageCache/com.unity.addressables@1.21.21/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:29)`

rancid wigeon
#

can some one explain the differences between asset database, asset bundles and addressables? Does addressables replace the the asset db and bundles or do they serve different purposes

#

its rather confusing they have all 3 of these and its not just one singular api

hoary rampart
rancid wigeon
rancid wigeon
#

i like how it doesnt explain how to avoid asset churn just explains what it is

hoary rampart
rancid wigeon
#

i was interpreting it as if you're about to unload to change scene but the next scene also refers to the asset then don't unload it or something 🤔

#

but that just seems like a headache to manage

hoary rampart
#

Yes pretty much

#

I think it mainly an issue when you're doing it to a lot of assets

rancid wigeon
#

how do you save an asset to addressables and get the generic asset reference returned? i tried this:

AssetReferenceT<MeshAsset> assetReference = AddAssetToAddressables($"Assets/Game Assets/MeshAssets/{prefix}.asset");

didn't work though

#

since add only returns regular asset reference

dreamy trout
#

I'm wondering if this is a bug.

Depending on your setup, LoadAssetsAsync will actually load the first sub object of an asset.

Basically I have 2 ScriptableObjects:
Location
Dungeon

A Dungeon has multiple Location assets as sub-objects.

If I add a label to Dungeon and LoadAssetsAsync<Location>, it returns the first sub object of dungeon, which I would very much like to never happen.

Is there any way to prevent this silly behaviour?

rancid wigeon
#

Unable to create a details viewfor the module 'Addressable Assets'. Object reference not set to an instance of an object

Any one know what causes this error when using the profiler ?

#

seems to be a unity error not something in my own code but beyond that - its hard to know the cause

peak kraken
#

(ContentCatalogData.cs)

#

nvm , found it

forest needle
#

Hey, does anyone here have experience with utilising addressables alongside Unity CCD for Android. I've built out all of my functionality within the editor but as soon as it's built for android it just hangs when I make calls to initialize the addressables system and then to download dependencies.

#

I've written out all of my logic using async/await and I didn't know if maybe this is what is causing the unexpected behaviour. I have tried migrating to using the UniTask library but still get the same hang upon calling DownloadDependencies

#

I'm happy to share code snippets if that provides further insight

peak kraken
#

is it possible to get load progress for a local addressable bundle?

#

PercentCompleted from the handle is just showing as zero

warped quiver
#

if I mark an asset such as sprite,prefab as addressable. but if i drag and drop this asset to any monobehaviour on scene. Is this addressable behave like addresale.load or normal asset load. and should i release this asset

sullen bison
#

I'm trying to mod going medieval, it uses addressables for meshes and such and I'm struggling to figure out how to add my own models as mods
I know how to make it into a .assets file or whatever but I have no clue where the game might search for assets, I looked through a big part of the source code but cant find much. Anyone with more experience that can point me in the right direction?

candid pelican
sullen bison
# candid pelican I can help can u send some more details .

that'd be lovely, I don't know too much about addressables so forgive me if the information isn't clear, what I know is the game uses them to find assets, and I'm trying to somehow get the game to also load in my modded assets. I've been trying to find where it searches for the addressables in the source code but I have had no success in this. My goal is basically just to add custom models into the game

candid pelican
sullen bison
#

thats what I'm trying to find as well

candid pelican
#

https://goingmedieval.fandom.com/wiki/Modding
@sullen bison have u looked at this link ?

Going Medieval Wiki

The developers of Going Medieval are not responsible for any bugs or loss of data as a result of modifying any game files! You may crash your save files or wreck your game installation; your...

sullen bison
#

yes

#

nothing in there regarding custom models sadly

candid pelican
#

how did u come to conclusion that addressables will help u ? I mean how did u know if the game is using addressables at all

next marlin
#

can anyone please explain me how to build addressable for standalone linux?

#

this is the error i am getting

next marlin
#

Hey guys when im trying to make a build in andriod for addressable everything works fine,

but when im making a build for addressable in linux server
im getting this

InvalidOperationException: Unable to build with the current configuration, please check the Build Settings. UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/GenericMenu.cs:125)

SBP ErrorException

Addressable content build failure

and when i hit play with exisiting build for addressable ,I get this
Player content must be built before entering play mode with packed data. This can be done from the Addressables window in the Build->Build Player Content menu command.

can one please help ,this is delaying my release

Found Solution for this :- change scripting backend in playersetting from il2cpp to mono

next marlin
#

hey @undone hound did you ever solve it?

undone hound
#

I assume so, I've launched 4/ 5 apps using addressables now.

next marlin
#

what was the solution

undone hound
#

Haven't got the foggiest of ideas what the solution was, it was 3 fucking years ago 🤣

next marlin
#

im unable to make addressable build in server platform but works fine in andriod platform

undone hound
#

I've only ever worked with addressables for Android and iOS

next marlin
#

never made seervers?

#

standalone linux server

#

anyway can you please think of the solution

#

it would be really helpfully

#

im really struggling here , this is causing my release to be delayed

undone hound
#

Good luck

next marlin
next marlin
#

I have also tried checking what group was causing the issue but , its failing after processing the group

#

someone please if you know something about it , do let me know . I will have to revert all my 15 days of work if server doesnt support addressable but atleast let me know

#

I also tried deleting everything from addressable group and making build. It did work but after adding one thing it stops working , please help me with this

next marlin
steep lichen