Search Unity

Addressables are here!

Discussion in 'Addressables' started by audrey-unity, Jun 15, 2018.

Thread Status:
Not open for further replies.
  1. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    Hello,
    I am struggling with events in Addressables. Because of the lack of a simple syncronized load method.
    ----------
    **What happens if I override the variable textureHandle before it triggered?**
    The previous delegate is deleted and not notified anymore, or It will trigger twice?
    are they considered two different events?
    ----------
    Code (CSharp):
    1.      AsyncOperationHandle<GameObject> textureHandle = Addressables.LoadAssetAsync<GameObject>("AssetAddress");
    2.         textureHandle.Completed += ElementToNotify1.TextureHandle_Completed;
    3.  
    4.         AsyncOperationHandle<GameObject> textureHandle = Addressables.LoadAssetAsync<GameObject>("AssetAddress");
    5.         textureHandle.Completed += ElementToNotify2.TextureHandle_Completed;
    ----------
    P.S. This code is in a class named DataManager.
    I have a class Dog and a class Cat, I need both to spawn a poo gameobject, with addressable.

    I would like to write in Dog and Cat classes a method LoadPooAsync() that will call the DataManager and pass to them their object reference so, when the object is loaded it will trigger the event for the right object who asked for it.
    I tried to write something with Actions but didn't work..
    Could you help me to write the methods signatures?
     
  2. ConfusedExpert

    ConfusedExpert

    Joined:
    Dec 25, 2014
    Posts:
    8
    Hello.
    I have a question about the caching system for remote bundles.
    When I try to run my app without internet connection, the app eventually loads the latest copies found in the cache.
    But it takes the app 300 seconds approx to do so.
    I am unsure how I can change this. I'd like it to give up much faster and go grab the copies from the cache, especially if there is no internet connection.
    Or maybe even load the cached version while checking if a new one is available.

    Does anyone know how I can achieve this?
     
  3. rastlin

    rastlin

    Joined:
    Jun 5, 2017
    Posts:
    127
    @LeleUnity
    In above code, you have two separate events, to whom you subscribed, they will fire independently for each of your notify classes.

    Someone already pointed out to you, you don't need to load the same asset twice, you can subscribe to the Completed method twice, it's a delegate.

    If you need the assets to be loaded synchronously, you could just do:
    Code (csharp):
    1.  
    2. var asyncResult = Addressables.LoadAssetAsync<GameObject>("AssetAddress");
    3. await asyncResult.Task;
    4.  
     
  4. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    I can't Use Async Addressables. I don't want to use Sync addressable since is not recommended and not supported in WebGL. I want to use the Async version.

    I have a structure where:
    Character1Holder---->LevelManager---->DataBaseManager
    Character2Holder----->LevelManager--->DataBase Manager

    The 2 charcter holders calls a method "give me character named X/Y and send a callback to me When loaded" respectively. So it will pass both the name of the desired charcter to be loaded and the reference of themselves to be called when the load is completed.

    The levelManager just passes the request to the DatabaseManager that base on the wanted prefab it will load it asynchronsly. Then, thanks to the reference to the Character1Holder it will register a call back method.
    This is the code of the method inside the DataBaseManager.



    Code (CSharp):
    1. AsyncOperationHandle<GameObject> CharacterHandle= Addressables.LoadAssetAsync<GameObject>("CharacterX");
    2.  
    3. CharacterHandle.Completed += CharacterXObjectReference.CharacterHasBeenLoadedCallBack;
    The problem is:
    What will happen IF this Charcter1 calls this method, and Charcter2 calls this method too before the
    Code (CSharp):
    1. Character1ObjectReference.CharacterHasBeenLoadedCallBack
    is triggered ?

    The variable CharacterHandle will be overriden with the data of Charcter2.
    This will delete the previous subscribtion to the event? or both triggers will be registered to the event of the loaded charcter1 ?
    What happens if I override the variable CharacterHandlebefore it is triggered?**
    The previous delegate is deleted and not notified anymore, or It will trigger twice?
    are they considered two different events?
     
  5. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    17
    Does anyone have problems with saving settings of Addressable Asset Settings within Unity editor?

    After couple days of trying to make addressables working, I accounter situation, that I have to manually change settings files, like AddressableAssetSettings.asset, because modifying inside the editor is not reflected in file change.

    Using Unity 2018.4.23, addressables package 1.8.3
     
  6. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    17
    I have also a second problem, maybe connected to what I've described above.
    Everything works in Unity editor (even with Play Mode Script set to "Use existing build" with remote load path set to our CND hosting server), but it does not work in iOS or Android build.

    It fails with the message:
    Exception encountered in operation Resource<IAssetBundleResource>(here is bundle name): RemoteAssetBundleProvider unable to load from url (here is proper url), result='Unknown Error'.​

    I double-check the file to download, and URL specified is correct. It downloads bundles in a web browser. The binary diff shows no differences between download file and local file generated with addressable build process.
     
  7. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    how can a ScriptableObject be loaded with addressables?
     
  8. wwaero

    wwaero

    Joined:
    Feb 18, 2020
    Posts:
    42
    When I click the addressable checkbox it locks up my unity for a very long time. What is happening while my unity is locked? I'm trying to make a large 1.5gb file addressable, is this a bad idea?
     
  9. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    Can i ask something simple?
    The correct way to implement with occlusion and light are these steps:
    1.- difference not interactable or referenced elements with high texture .
    2.- do bake of lights and occlusion
    3.- made it addressable these elements and use it when player trigger near or something like that?

    I was some days reading all and i was a bit confused with that.
     
  10. pontos_developer

    pontos_developer

    Joined:
    May 20, 2020
    Posts:
    15
    Hello,I have a question about LoadAssetAsync();
    this API is too slow to downloaded asset if the bundle large,maybe 50M or bigger.
    It's that problem based on AssetBundle? WebRequest or else?
    Code (CSharp):
    1. var startTime= Date.Now;
    2. Addressables.LoadAssetAsync<GameObject>(label).Complected+=obj=>
    3. {
    4.   //It may take 40s or more when files bigger than 20M
    5.   Debug.Log("TotalTimes"+(Date.Now-startTime).TotalSeconds);
    6. }
    7.  
    Hope someone can tell me why Addressable load very slow.Thanks
     
    Last edited: Jun 9, 2020
  11. sinaari

    sinaari

    Joined:
    Jan 28, 2019
    Posts:
    47
    I'm having the same problem.. Have you been able to find out what's wrong?
     
  12. pontos_developer

    pontos_developer

    Joined:
    May 20, 2020
    Posts:
    15
    I'm not sure.
    I thought it might locate the asset too slow on Server?But on AWS or GCP still slowly so I think it's unity's problem.
    LZ4 and LZMA compress format possible casue the issue,you can try no compreess,LZ4 and LZMA to test.
    Whatever I tried path or label still too slow!
    If the issue is the UnityWebRequest cause,I can't do anything...
    Maybe try System.WebClient to download asset....
    I hope someone like Unity Technologies can help us.
    This problem cause me can't use AAS in my company project.:(
     
    Last edited: Jun 9, 2020
  13. Tsotne991

    Tsotne991

    Joined:
    Jun 15, 2018
    Posts:
    2
    Hello, Everyone
    I added the addressable later in the game development and for some reasons I cant get it working properly with the sliced sprites. In not sliced sprites it works normally, but in sliced sprites it cant recognize the sliced object and gives reference to the hole Texture itself. What can be the problem be?
    Thank you in Advance
     
  14. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    Sorry for bumping, but i want some tips or best practices for starting with addressables in mobile ;)
     
  15. fabioColombini

    fabioColombini

    Joined:
    Dec 9, 2013
    Posts:
    30
    Any tip on Scriptable Objects and Addressables?

    Our game is based on SO to communicate between systems, but with addressables, it seems that the SO loses its contents.
     
  16. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    Scriptable Objects function the same as GameObjects. I use them with addressables without issue.
     
  17. deltamish

    deltamish

    Joined:
    Nov 1, 2012
    Posts:
    58
    Problem with using RemoteLoading for Addressables (Works in Editor but not in build)
    Issue:
    Exception encountered in operation Dependencies: Invalid path in AssetBundleProvider: 'D:/Work/Projects/Unity/AddressableSystemTest/Builds/WinBuild4/AddressableSystemTest_Data/StreamingAssets/aa/StandaloneWindows/defaultlocalgroup_unitybuiltinshaders_240b781245634e4879740700defc2878.bundle'.
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:LogFormat(LogType, String, Object[])
    UnityEngine.Debug:LogErrorFormat(String, Object[])

    My goal is to load new assets from server into my scene.
    I have a script called loader that does Addressables.LoadAssetAsync<Object>("robot").

    I have set up the RemoteLoadPath to point to my S3 and RemoteBuildPath as default.

    Steps I followed were:
    1. Download Robot-Kyle asset
    2. Move it into Addressable group while having remote profile active.
    3. Changed address as robot
    4. Build the Script
    5. Build the application
    6. Copy paste contents from /ServerData/StandalonWindows into S3 bucket with public flag
    7. Runs in Editor. Works in build
    8.Now I downloaded a new asset. Added it to the group.
    9. renamed old one as soemthing else and renamed New Asset as "robot"
    10. Build Addressables using UpdateFromPreviousBuild
    11. repeat step 6
    12. Run in Editor. Works
    13. Run the build. Error I pasted above is thrown.
    14. Did a ton of research no valid answer that works


    upload_2020-6-27_14-50-51.png
     
  18. Ayodhya1991

    Ayodhya1991

    Joined:
    Apr 24, 2017
    Posts:
    3
    Hi Everyone,

    As i am going through Addressable assets Implementation from all the Videos i found following steps:
    1.Download addressable package.
    2.Create prefab which has to be marked as Addressable. Then mark is as Addressable asset and Build it to addressable local path / Cloud path.
    3.Load it with the Asyc method provided [Here the prefab stays in the Project itself].

    What i tried to implement.
    1. Created a Unity Project Say "Project 01" and i build few addressable assets.
    2. Loaded addressable assets from local as well as Cloud path But Here the prefabs are present in the project itself.
    3. I was able to load the assets from local as well as cloud path.
    4. Next i have created another empty unity project "Project 02" with addressable asset settings.
    5. In "Project 02" i have given path for Cloud location to fetch it with the same scripts as "Project 01".
    6. But i not able to do so.

    Please let me know what are the steps need to be followed to implement following Use case.

    Use case.
    1. I want to create 2 unity project "Project 01" & "Project 02" environments where one would be Development environment from which i would like to build and upload Addressable Assets to Cloud.
    2. Another project would be Production ready where i will fetch all the Addressable Assets created from Project 01 to Project 02 with the same cloud path where Addressable Assets are uploaded.

    Thanks.
     
  19. mars_jang

    mars_jang

    Joined:
    Jul 1, 2020
    Posts:
    2
    Hello, I am trying to create a group template with script completely.

    And now I could create a template and assign the build / load paths,
    but I have no idea how to assign the 'Asset Provider' and 'AssetBundle Provider' fields.

    Anyone can help ?
    Addressable version: 1.8.4

    snapshot.png

    Code (CSharp):
    1. [MenuItem("Marscat/Addressable/Init")]
    2. private static void InitTemplates()
    3. {
    4.     var settings = AddressableAssetSettingsDefaultObject.Settings;
    5.     settings.GroupTemplateObjects.Clear();
    6.  
    7.     var groupSchemaTypes = new[] {typeof(BundledAssetGroupSchema), typeof(ContentUpdateGroupSchema)};
    8.     settings.CreateAndAddGroupTemplate("PackTemplate", "A description", groupSchemaTypes);
    9.  
    10.     var newTemplate = settings.GetGroupTemplateObject(0) as AddressableAssetGroupTemplate;
    11.     InitGroupTemplate(newTemplate, "LocalBuildPath", "LocalLoadPath", true, BundlePackingMode.PackTogether);
    12.  
    13.     AssetDatabase.SaveAssets();
    14.  
    15.     void InitGroupTemplate(AddressableAssetGroupTemplate template, string buildPath, string loadPath, bool includeInBuild, BundlePackingMode packingMode)
    16.     {
    17.         var bundleSchema = template.GetSchemaByType(typeof(BundledAssetGroupSchema)) as BundledAssetGroupSchema;
    18.         bundleSchema.BuildPath.SetVariableByName(settings, buildPath);
    19.  
    20.         bundleSchema.LoadPath.SetVariableByName(settings, loadPath);
    21.         bundleSchema.IncludeInBuild = includeInBuild;
    22.         bundleSchema.BundleMode     = packingMode;
    23.         bundleSchema.BundleNaming   = BundledAssetGroupSchema.BundleNamingStyle.NoHash;
    24.  
    25.         EditorUtility.SetDirty(bundleSchema);
    26.     }
    27. }
    28.  
     
    Last edited: Jul 21, 2020
  20. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    I have an issue that whenever i mark the prefabs as addressable and go to new build > default build script afterwards i have to clean the cache and rebuild it if i want my prefabs to be spawned like they appear in the project view. Otherwise, a previous version is spawned.
     
  21. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Hello I am new to Addressables.
    I am having a problem getting a AssetReferenceSprite.

    I have 1000's of scriptable objects that reference Sprites.
    I am writing a script to populate a new field with the AssetReferenceSprite in it.
    I did something similar for my prefabs and it worked great.
    But I can't figure out how to the the AssetReferenceSprite back for the Sprite object.

    Here is some code that may help you understand what I am doing.

    Code (CSharp):
    1.     void OnWizardCreate()
    2.     {
    3.         UnityEngine.Object[] objects = Resources.LoadAll(path, typeof(ScriptableObject));
    4.  
    5.         foreach (UnityEngine.Object cd in objects)
    6.         {
    7.             ConditionData data = cd as ConditionData;
    8.  
    9.             if (data == null)
    10.                 continue;
    11.  
    12.             data.iconReference = data.icon.GetAssetReference() as AssetReferenceSprite;
    13.  
    14.             EditorUtility.SetDirty(cd);
    15.         }
    16.  
    17.         AssetDatabase.SaveAssets();
    18.  
    19.     }
    Code (CSharp):
    1.         public static AssetReference GetAssetReference(this Object o)
    2.         {
    3.             string guid = string.Empty;
    4.             long localID = 0;
    5.  
    6.             bool foundAsset = AssetDatabase.TryGetGUIDAndLocalFileIdentifier(o, out guid, out localID);
    7.  
    8.             if (foundAsset)
    9.                 return AddressableAssetSettingsDefaultObject.Settings.CreateAssetReference(guid);
    10.  
    11.             return null;
    12.         }

    Any help would be great.
     
  22. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Ok I got it working by adding this method to "AddressableAssetSettings".

    Code (CSharp):
    1.         public AssetReferenceSprite CreateAssetReferenceSprite(string guid)
    2.         {
    3.             CreateOrMoveEntry(guid, DefaultGroup);
    4.             return new AssetReferenceSprite(guid);
    5.         }
    They may have been a way to get it without adding this method but I could not figure it out.
     
  23. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Addvatage of scene.load async or addressables load?

    On a local storage I want to load several different screens with content.

    Now my question is, what has the better over a performance ? Scene.load async or addressables loading a Scene?

    The loading processing should be as smooth as possible in the background.

    Does anyone have experience with?
    Thanks!
     
  24. HamidDjavadi

    HamidDjavadi

    Joined:
    Sep 21, 2020
    Posts:
    2
    When you build your bundles using addressable system, the output contains these stuff:

    1. a hash file
    2. catalogue of your assets (local + remote)
    3. remote bundles (but not local)
    The problem is: after unity building and releasing in store, when you change a local asset and build using addressable system and put it on server again, the hash of your local in catalogue will change (without having that local bundle on server) and that causes client to update local asset hashes without having the related bundles, as a result not loading those assets.

    What is the reason of putting local asset addresses in remote catalogue while you do not have local bundles on remote?
     
    Last edited: Sep 27, 2020
  25. pavelmo4alov

    pavelmo4alov

    Joined:
    Mar 13, 2013
    Posts:
    14
    Hello! Are there any way to load prefab with scripts from addressable bundle, if bundle build by another project ? Prefab with mesh and materials load correctly but script is missing. If I copy script to this project and load prefab - all is good.
     
  26. JasperCiti

    JasperCiti

    Joined:
    Jul 5, 2013
    Posts:
    17
    I noticed that if I create a scene with static GameObjects and I make that scene addressable: Then when I load the scene directly in the editor the static GameObjects are static, but when I load the scene as an addressable asset, the all the static GameObjects are loaded as non-static GameObjects.

    Is that per design or a bug?

    I was using Addressables 1.16.1
     
  27. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Hi, were you able to figure this out? I am having the same problem.

    I think they get instantiated as new objects and loses the reference to the original. For example, if I have 10 UI elements that reference UIColorScriptableObject, when I instantiate those elements they seem to each have a new instance of UIColorScriptableObjects instead of pointing to that original one asset.

    This breaks the intended purpose of ColorScriptableObject which is to share data between multiple instances.
     
  28. AriyaSD

    AriyaSD

    Joined:
    Nov 2, 2019
    Posts:
    24
    Dependencies of Addressable assets are duplicated into the bundle. If you don't want that to happen, you can explicitly set the dependency (in your case, UIColorScriptableObject) to be Addressable. That way, all Addressable assets that depend on UIColorScriptableObject will refer to the same, Addressable, instance of it.

    Although I'd like to add that I'm pretty sure if there are also non-Addressable assets that depend on UIColorScriptableObject, you'll still get two instances of UIColorScriptableObject, one for Addressable assets, and one for non-Addressable ones.
     
    FlightOfOne likes this.
  29. Joshk87

    Joshk87

    Joined:
    Jul 13, 2020
    Posts:
    1
    Hi, I am trying to build different addressable groups and it’s important for me to give each group individually a different build path and load path.

    I was wondering if Unity allows or can allow access to modifying each groups’ build or load path through code, it’s critical for my game...

    Do any of you have any ideas if it’s possible?
     
  30. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    113
    does anyone know what happen in addressable when ReleaseInstances is called before InstantiateAsync is complete?
     
  31. toshiki_hata

    toshiki_hata

    Joined:
    Dec 5, 2019
    Posts:
    2
    How do you manage Addressable assets on your version control system?

    Is it possible to separate AddressableAssetGroup assets form AddressableAssetSettings?
    If you add an AddressableAssetGroup asset, AddressableAssetSettings will be updated simultaneously.
    In multiple people development, when someone adds an AddressableAssetGroup asset to a version control system, they must also update AddressableAssetSettings.
    Therefore, AddressableAssetSettings will conflict.

    Is it possible to add AddressableAssetGroup asset to the version control system, and ignore changes about AddressableAssetSettings?
    Or should I exclude both AddressableAssetGroup assets and AddressableAssetSettings from the version control system?

    How do you do in your project?
     
  32. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    We just KDiff the conflict, most of the time it doesn't even need manual intervention.
     
    toshiki_hata likes this.
  33. toshiki_hata

    toshiki_hata

    Joined:
    Dec 5, 2019
    Posts:
    2
    Dear Alkis Fortune Fish

    Thank you for your advice!
    I will refer to KDiff.
    But in the case of my project, there are many people who are not familiar with version control tools such as designers.
    So, I am considering another plan...
     
  34. lysz

    lysz

    Joined:
    Sep 6, 2018
    Posts:
    1
    catalog too big why??????????
     
  35. imjusthere

    imjusthere

    Joined:
    Oct 12, 2012
    Posts:
    72
    I'm changing scenes using Addressables.LoadSceneAsync(sceneReference). sceneReference is an AssetReference. It works fine when running in the editor via the link cable on my Quest 2. But when I do a build and run it on the Quest 2 without the link cable it crashes as soon as I attempt to load the scene. Is there a step I am missing?
     
  36. mohamad_dan

    mohamad_dan

    Joined:
    Feb 6, 2020
    Posts:
    1
    I want to use encryption with addressables so I want to modify the way addressables loads assetbundles ,
    for that I tried to implement custom AssetBundleProvider , but it didn't work , I faced issues like :
    Exception encountered in operation ChainOperation<GameObject> - InitializationOperation, status=Failed, result= : ChainOperation of Type: UnityEngine.GameObject failed because dependent operation failed

    and in other try somthing like : unknown provider....

    so , is there any example or tutorial or obvious documentation on how to implement custom AssetBundleProvider.
     
    imbible and WolveX like this.
  37. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    I am having an issue figuring out where the name of the addressable(s) is coming from? Is there documentation of how the bundle names are created?
    I have set the name of the addressable(s) to what I would like it to be. For example: NameOfMyBook. And this is what shows on the Group name\Adressable name column of the Addressables Group tab of the addressables tool. The group that contains this asset has bundle naming set to filename. But when I build the addressable(s) something is appended to the addressable name. So instead of having a bundle named: NameOfMyBook as I expected, I have book_scenes_NameOfMyBook and I have no clue where "book_scenes_" is coming from !
    Can anyone shed some light?
     
  38. Bentoon

    Bentoon

    Joined:
    Apr 26, 2013
    Posts:
    98
    Hi all,
    I'm trying to work with addressables and I have parsed an ok workflow but am having some trouble:
    specifically, w WebGL builds & loading remote scenes from a server

    Here is my (somewhat working) workflow:
    a) import addressables package and make new group (I call 'scenes') and drag the scenes I want to load inside- Note that alone makes them addressable
    - and because it's a scene I don't think I also need to include the prefabs/ models / materials & textures... However, I believe it will help with loading if do this

    b) I set up another profile I point to a server I control the permissions on and right click to set as the active profile
    - & I make sure all my groups point to using the remotes Load and Build
    - & check the √ build remote catalog button in the Addressableasset settings also

    c) in my Starting (almost blank) scene, I have a script to load a remote addressable (below)
    Code (CSharp):
    1.     [SerializeField] AssetReference assetReferenceScene;
    2.  
    3.  
    4.     void OnSomething()
    5.     {
    6.               assetReferenceScene.LoadSceneAsync(UnityEngine.SceneManagement.LoadSceneMode.Additive);
    7.  
    8.     }

    - I test it in the Play mode (use asset database)
    - Then I use the addressables build to build (new build > default) the remote assets to my "Server Data" folder created outside the Assets folder (n my case this is a webGL build, so it creates a webGL folder to hold my bundles .json and hash)
    - After that builds I upload the (WebGL) folder to the remote server (the same file path as the remote setting I provided (above where WebGL is [build target])) & I change the permissions to be completely open so they can be accessed.
    - I test it again in addressable Play mode (with use existing build) selected as this will pull the assets remotely

    works in play modes but not in build or on line

    Do I need separate download & instantiate functions?

    Any Ideas? Addressables are driving me crazy!
    Thanks!
    ~b
     
    Last edited: Jun 19, 2021
  39. lyflike

    lyflike

    Joined:
    Dec 23, 2018
    Posts:
    12
    Hi All,

    I need to achieve below actions In the Unity Windows Standalone Build exe.
    1. Create Group by script.
    2. Make Addressable Assets and add it into the group.
    3. Build it and upload file in the s3 bucket.

    So basically I want to create addressable assets in runtime. It should upload in the s3 bucket (this could possible).

    Please help is it any way possible.

    Thanks You !
     
  40. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    You cannot build assets at runtime. The best you can do is save the data you need, then dynamically instantiate objects and components based on that data.
     
  41. JorisEertink

    JorisEertink

    Joined:
    Mar 15, 2017
    Posts:
    24
    Hi @unity_bill @karl_jones ,

    I found that you guys cache the current state of assets in a content_state.bin file to detect changes for new builds. Currently this is filtered to specific bundles/content (for example marked as static).

    When we are making new bundles, we would like to get a detailed overview of which bundles have changed compared to last time, and because of which assets.

    I found this would be possible with this content_state.bin if we modify the filter to include all bundles into the binary. But to do this I would have to modify your BuildScriptPackedMode class. I tried creating my own BuildScript and inherit from yours, but a lot of the referenced classes and methods are not accessible, even if I would copy paste the complete logic from BuildScriptPackedMode.

    Would it be possible to make it more accessible? Or is there an easier way to compare all newly build bundles to their previous state?

    Thanks in advance!

    Joris
     
  42. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    That would be quite good, because at the moment my custom build script has to live in the Addressables project.
     
  43. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    I'm going to lock this thread. For individual issue you encounter, please create a new thread. Thanks!
     
Thread Status:
Not open for further replies.