Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Addressables missing in build

Discussion in 'Addressables' started by eegorebulbous, Jul 3, 2021.

  1. eegorebulbous

    eegorebulbous

    Joined:
    Mar 13, 2020
    Posts:
    2
    Hi all,

    I'm using the latest Addressables version (as of this post, that is 1.18.11), and I am having a problem where I am using this code:
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle<TextAsset> handle = UnityEngine.AddressableAssets.Addressables.LoadAssetAsync<TextAsset>(dynamically_built_addressable_name);

    It works great in play mode, everything is as expected. When I build and run though, I get nothing back -- the asset appears to not be included in the build.

    The asset isn't referenced anywhere but in code, via the dynamically built addressable name -- which I suspect is part of the reason it's not being included in the build, but if I go to Window -> Asset Management -> Addressables -> groups, I see a group with all of the assets that work normally, but don't work in my Build.

    I figure there's something really basic I'm missing, but I've spent a couple hours scouring the internet -- including finding this thread: https://forum.unity.com/threads/addressables-not-loading-in-build.925982/page-2 -- which talks about something that appears to be similar, but says it is fixed as of 1.17.5.

    (Edit: -- I've been messing around a bit trying to see if the resources are making it into the build in any way, and it turns out that if I list all my assets by making a call to LoadResourceLocationsAsync, I can get an IResourceLocation for the asset I want -- it's just that when I try to load it using LoadAssetAsync, it returns null -- it seems like if it is going to store the locations, it should be storing the assets too -- maybe there is a setting somewhere I need to check?)

    Any help would be greatly appreciated.

    Thanks,
    Ken
     
    Last edited: Jul 3, 2021
    anycolourulike and Charlicopter like this.
  2. Quasimodem

    Quasimodem

    Joined:
    May 21, 2013
    Posts:
    47
    Hi Ken, I don't suppose you've made any progress on this issue? It seems we're encountering something similar, assets are just not included in our builds, regardless of whether they're referenced by other assets or not. To our best guess, our assets are being correctly bundled (according to buildlayout.txt file) but calling Addressables.LoadAssetAsync() with our addressable name fails in different places depending on which machine we make the build on. We've trudged through the dense settings for Addressables many times but nothing has seemed to produce any results.
     
  3. Josethehedgehog

    Josethehedgehog

    Joined:
    Jul 26, 2017
    Posts:
    2
    Bump because I've been having the same uhh "error"?

    I want to build for android and load things locally, no remote server or whatsoever.

    Same as OP, editor works great but when I build it doesn't work.
    Don't know if the spawn code executes before the asset even loads, the assets are not being included in the apk or if I have to change build and load paths to something other than the defaults.

    Unity 2020.3.15f2 with Addressables 1.18.15
     
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    Flagging this for the team to share some guidance!
     
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey all, just to make sure, since there is some ambiguity in the word "build", you're all doing an Addressables content build for your desired platform prior to building the player? The content build can be done from the Addressables Groups window. Build > New Build > Default Build Script.

    Since it works in the editor but not a build I'm assuming you're using the AssetDatabasse Mode play mode script (you can check on the Play Mode Script drop down in the Groups window). If you are, and switch that to Use Existing Build and see if it still works. If it doesn't then trying doing the content build and see if it works then.

    Also, given that some platforms appear to cause issue and other don't, please make sure you've done a content build for each platform before building the player. Cross platform AssetBundles aren't compatible so individual content builds need to be done for each platform.

    Hope some of that helps
     
    miracalious likes this.
  6. Noogy

    Noogy

    Joined:
    May 18, 2014
    Posts:
    130
    FWIW, I've noticed that about a quarter of the time I'll do a build and my project acts like the addressables don't exist. A quick rebuild (ctrl-B, not an addressable rebuild) usually resolves it. Annoying and a waste of time but always resolves itself, although not terribly reassuring.
     
  7. cboswell

    cboswell

    Joined:
    Jun 10, 2021
    Posts:
    1
    I've been trying to build using "pack separately" to see if I can get load time improvements but I get weird build errors deep in the addressables system code and it only builds about half of my assets.
     
  8. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    I can confirm this issue: sometimes, building for Android doesn't include the Addressable bundles, which is also visible by looking at the final apk/aab file (smaller, as bundles are missing).
     
    Noogy likes this.
  9. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    123
    I'm running into this issue as well.
    I have a bunch of assets / scenes grouped as addressable, have built the bundles, etc, but when I set the play mode script to "Use Existing Build", or build out the game and run it, all of those assets are missing.
    It's a persistent behavior for me, vs intermittent as some people seem to be describing above.
     
  10. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    175
    Just wanted to add I also get this intermittent issue where the addressables are missing from the build. Have yet to work out what sequence of events cause it but it happens every ten or so builds.
     
  11. geraldoatelectricsquare

    geraldoatelectricsquare

    Joined:
    Nov 3, 2021
    Posts:
    1
    We are also seeing this issue with Android .apk and .aab builds in our CI build machines.

    Unity version: 2021.1.27f1
    Addressables Package version: 1.19.9

    We're using the BuildPipeline from the platforms package. Addressables are built before calling buildConfiguration.Build(). Sometimes addressables are included in the final package, but very often they are not.

    I'm at a loss as to why this is happening, is there a known workaround?
     
  12. LE-Peter

    LE-Peter

    Joined:
    Sep 15, 2020
    Posts:
    42
    I get this far too often, it's very frustrating.
     
    dr4 likes this.
  13. so3arbelnox

    so3arbelnox

    Joined:
    Apr 17, 2019
    Posts:
    2
    Also getting this issue rather frequently (probably around 25-30% of my Android builds). Re-running the build script seems to fix it, but its not making me feel very confident about release..

    Its also a bit frustrating as my builds take close to 10 min so I need to re-run everything.
     
  14. danielrusnac

    danielrusnac

    Joined:
    Jun 17, 2021
    Posts:
    4
    Encountering the same issue, sometimes addressables are missing from the build. Building for android with Unity 2020.3.22f1 and Addressables 1.18.19.

    It's interesting that the game works fine, prefabs are spawned and I can control the player, just nothing is rendering, except the skybox.
     
  15. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    @danielrusnac, just to confirm, before doing your player build, you're building the Addressables content with the Android build target set as the active build target? If by "nothing is rendering" you mean you get those pink/purple textures on everything, that's usually an indicator that the shaders were built for the incorrect target. But, if that's the case, I'm surprised that your prefabs are spawning at all so it could be something else.

    For anyone, if you're using 2021.2 or newer you can try going into Edit > Preferences > Addressables and change the Build Addressables on Player Build option to "Build Addressables on Player Build". I think it's turned off by default.

    Just to demystify the process a bit, what happens is this:
    1. You perform an Addressable content build, the default local build path places this in a special folder in the Library that uses the current active build target as a subfolder for all the data. The Library folder is used so we don't import all the AssetBundles, the build target subfolder is used so you don't have to rebuild your content every time you switch build targets.
    2. The player build is kicked off
    3. As part of a build callback, we take the current active build target again and find that folder and copy all those AssetBundles, and content catalog, into the StreamingAssets folder of the project before the player build is kicked off.
    There could be two potential issues:
    1. There's a race condition/bug of some kind in the engine that is causing pre build callbacks to not fire correctly, or at the correct time.
    2. Double check the build and load paths of your local groups. If you've modified those default build and load paths, that could be the problem. We have this blurb in the docs:
    You might ask yourself why we would do that. Well, build and load paths are basically just arbitrary key value pairs. There's no mechanism currently to concretely tell the system "This is shipping locally, include this regardless of where it was built to." Perhaps there could be, but right now there isn't. So, currently, we can't be overly opinionated about what gets built into StreamingAssets. We only make this assumption if you're using the default field that we call Local Build Path.

    If none of this applies to you and you're still seeing this issue, I'd ask you file a bug with your project as a repro with your repro steps. I'll spend some time trying to repro it myself, but I can't promise anything there.

    I hope some of this helps.
     
    JuanPaixao and sandolkakos like this.
  16. Cardinal90

    Cardinal90

    Joined:
    Aug 9, 2017
    Posts:
    15
    @davidla_unity, I've recently filed a bug report for an issue which sounds similar. Case 1397608, it is not processed by QA as of this moment. The problem is that sprites from an addressable sprite atlas aren't rendered. It only happens when building for a second platform. Meaning that if I already made a Linux build, I have to delete the Library folder before making a working Windows build and vice versa.
     
    davidla_unity likes this.
  17. danielrusnac

    danielrusnac

    Joined:
    Jun 17, 2021
    Posts:
    4
    @davidla_unity , yes, the build target is set to android. By 'not visible' I meant that there is actually nothing rendering, I'm just colliding with the air, and this happens in half the builds. I will try I recreate it in a smaller project, just don't have much time now.

    Maybe my approach to addressables is wrong? My goal is to eliminate the loading times at startup, so the player gets to the menu faster. I set as addressables only the scenes and some scriptable objects. My setup is similar to the one in 'unity open project one'.

    - Only one scene in the build settings called Boot
    - The boot scene loads the managers scene (which is set as addressable) and unloads itself
    - The manager scene then loads the UI, menu etc.

    So all my scenes (except for Boot) are addressables. If I understand it right, loading and unloading a scene (using
    sceneReference.LoadSceneAsync()
    ) should load and unload all it's dependencies, or should I mark as addressables the art assets too?
     
  18. danielrusnac

    danielrusnac

    Joined:
    Jun 17, 2021
    Posts:
    4
    I solved my problem. The reason wasn't that the assets don't get included in the build, but a custom shader that we used.

    To fix this I created a separate group and put the shaders we use in there (found the answer in this thread).
     
    davidla_unity and sandolkakos like this.
  19. lisley

    lisley

    Joined:
    Apr 12, 2019
    Posts:
    1
    I also have the same issue with my localized assets. It works fine in play mode but not in in my build.
    I already checked the build and load paths, nothing wrong with them.
    Unity can find the localization asset tables and the according entries but when I try to access the localization asset it is always null. Everything is also listed correctly in the addressable groups window and the localization strings always work it's just the assets that don't.
    Did I miss something when doing the the builds or some other settings?

    Would really appreciate it if someone has any suggestions.
     
  20. mmekies

    mmekies

    Joined:
    Aug 26, 2020
    Posts:
    12
    I am having similar issues with localization only working from a local build and not a remote build (custom pipeline). We have implemented a pre export method that handles the building of the addressables, which is called before building the app , for both android and ios. here is the method :

    /// <summary>
    /// Run a clean build before export.
    /// </summary>
    static public void PreExport()
    {
    Debug.Log("BuildAddressablesProcessor.PreExport start");
    AddressableAssetSettings.CleanPlayerContent(
    AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder);
    AddressableAssetSettings.BuildPlayerContent();
    Debug.Log("BuildAddressablesProcessor.PreExport done");
    }

    The build passes, but when trying to switch locales we get an exception (Exception: Attempting to use an invalid operation handle). The full logs are attatched. Please help!
     

    Attached Files:

  21. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    As for the Localization issues, I've given this thread to that team so hopefully they can add some insight.

    EDIT: Looks like there's already been some communication with the Localization team. It looks like all your errors, mmekies, stem from the original RuntimeData is null.

    Since this is a build automation issue only it seems, I'd wager that the issue is still a build callback problem.

    Your Pre-export script actually doesn't look like it does the copy into streaming assets. That copy-ing is only done as part of the player build which is where I think the problem is coming from. The build callback isn't copying and importing the data before the player build finishes (or at least gets past the point that it's accepting of new data).

    mmekies, in your script, after calling BuildPlayerContent, I would add a recursive call to copy everything from Addressables.BuildPath into Assets/StreamingAssets. Then actually start the player build. Give that a try and see if it works.
     
    Last edited: Feb 10, 2022
    karl_jones likes this.
  22. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey all, just wanted to come back and say I've been looking into this issue and I think I may have found the problem. It appears to work for the repro we were finally able to get working on our end. If anyone wants to edit the package to make sure this works for them as well, please let me know if it solves your issue or not.

    So, we have a class called AddressablesPlayerBuildProcessor that is responsible for copying the AssetBundles and catalog to your streaming assets as part of a prebuild step. After the build is done we have a cleanup step that moves everything back. However, the method that cleans everything up (internal CleanTemporaryPlayerBuildData) is tagged with [InitializeOnLoadMethod]. We did this to make sure we didn't leave artifacts around by accident in the case of a catastrophic build failure.

    I think what's happening is that there are situations where a domain reload is happening after the prebuild steps but before the build, causing the data to get deleted before the build pipeline can pick it up.

    If you have the package in your project (so you can edit it freely) try going into that class and just commenting out the [InitializeOnLoadMethod] tag above that method. I'm going to continue to dig a bit, but I wanted to post this here before I forgot in case this is a major blocker for anyone. If it looks like this solves the issue we'll remove that attribute in 1.19.19+

    Thanks, everyone. Sorry for the inconvenience.
     
    Apex_Dev_03 likes this.
  23. mwnDK1402

    mwnDK1402

    Joined:
    Jul 14, 2015
    Posts:
    1
    Thanks! This worked for me. But I don't build production builds in the editor, I use a CI/CD workflow. How would I automate this? Addressables are missing from my GameCI builds.
     
  24. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    if all you need is to automate building player content, and you're not running into the other issues mentioned in this thread, you can use
    Code (CSharp):
    1. AddressableAssetSettings.BuildPlayerContent();
    You can include that call in a method that switches build target, or whatever you need to do prior to building content, and is called as part of your CI. https://docs.unity3d.com/Manual/EditorCommandLineArguments.html (-executeMethod is what I think you'll find most relevant)
     
  25. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    I'm trying to figure this out with GameCI too... Using Unity 2020.3.25f1 atm, with the following code as the custom build script:

    Code (CSharp):
    1.  
    2.         var buildPlayerOptions = new BuildPlayerOptions();
    3.         buildPlayerOptions.target = BuildTarget.Android;
    4.         buildPlayerOptions.locationPathName = buildPath+"/"+apkName;
    5.         Console.WriteLine("Build addressables!");
    6.         EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
    7.         AddressableAssetSettings.CleanPlayerContent();
    8.         AddressableAssetSettings.BuildPlayerContent();
    9.         Console.WriteLine("Addressables built!");
    10.         Console.WriteLine("Start build!");
    11.         BuildPipeline.BuildPlayer(buildPlayerOptions);
    12.         Console.WriteLine("Finish build!");
    13.  
    Does this seem correct? Any suggestions on how to fix this... Works perfectly when built locally when the addressables are built from the Unity menu...
     
  26. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Yeah, so I think my initial assessment was incorrect, where I thought a script that made sure to manually copy the local Addressables files over before the player build would work wasn't correct. Given how the pre/post build (build meaning Player build, not Addressable content build) callbacks in Addressables are setup there's a chance it'll always move those files from StreamingAssets back to the Library before the player build, even if you manually put them there first. It's a strange situation where the engine appears to be domain reloading (or in some way firing InitializeOnLoadMethods) after the prebuild step, which we use to copy files from Library -> StreamingAssets, but before the Player build. The InitializeOnLoadMethod we have moves files from StreamingAssets -> Library, and is done that way in the event of a build failure. We wanted to ensure that artifacts weren't left around.

    Check out my post above to see what you can do to work around it for the moment (requires editing the package, which requires you to copy the addressables folder from Library/PackageCache into your Assets folder) if you need to test a workaround.
     
  27. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    I tried copying the folder from the Library to Assets but I can't seem to figure out how to put all the pieces together with that. I'm using the Localization package too, so I tried to also copy that from the Library to be able to delete them from the Package Manager. However after doing this, I get a lot of errors, for example

    Assets/Editor/Build.cs(2,19): error CS0234: The type or namespace name 'AddressableAssets' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)


    I'm using UI Toolkit, so I have created the Assembly Definition files for the project and then the Editor folder. The errors above are present when I'm not including Localization or Addressables in the Assembly Definitions, but if I include them, those errors go away and instead I get, for example,

    Assets/com.unity.addressables@1.19.9/Editor/Build/AddressablesDataBuilderInput.cs(2,25): error CS0234: The type or namespace name 'Pipeline' does not exist in the namespace 'UnityEditor.Build' (are you missing an assembly reference?)


    Any further help on how to configure this so I could try the workaround? :)
     
  28. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Ah, sorry, when you removed Addressables from package manager it likely would have taken the scriptable build pipeline package with it. Addressables depends on that package. For 1.19.9, I think you want Scriptable build pipeline 1.19.3. So you should be able to install that package directly and then leave it alone.
     
  29. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Alright, this fixed the compiler errors but now all of my localization files say
    "The associated script can not be loaded.
    Please fix any compile erros
    and assign a valid script."
    Any easy way to fix this? Would love to test the workaround and report if it fixes things...
     
  30. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Your localization package is still in the PackageCache folder? You may need to move that into Assets as well since you moved Addressables. I wouldn't have thought so, but I'm unsure what else could be happening. Try moving Localization to the Assets folder and then removing it from package manager as well. If you're still having issues I'll have to ping the Localization team and see what they think might be happening.
     
  31. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    I haved moved the Localization package to Assets already to be able to delete the Addressable from the Package Manager! I also tried to recreate the localization settings, for example but was greeted with a null ref exception. However, when I built the project even with all the localization broken and thus the game not correctly loading, I think the start up sequence got a bit further than before, so I guess that's promising!
     
  32. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Huh, that's weird. I'm not exactly sure what's going on. Let me see if someone from that team can chime in. Let me know if you're able to get it working
     
  33. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    I can try to do this once again, so do you think the steps would be:
    1. Move Addressables package from Library to Assets
    2. Move Localization package from Library to Assets
    3. Remove both from Package Manager
    4. Install Scriptable Build Pipeline from Package Manager
    5. Fix assembly definitions to link to the correct definitions (?)
    6. All good, ready to build in batch mode with the custom build script I posted above?
     
  34. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Hi what errors are you getting from localization? Can you provide the log message and callstack?
    Why are you moving the packages into the assets folder? That sounds like a recipe for disaster.
    Can you instead move them into the projects Packages folder?
    Putting them in assets means package dependencies wont be resolved correctly, It also probably means a load of other issues ;)
     
  35. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
  36. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Oh ok. Well try adding the following package with add from git: com.unity.nuget.newtonsoft-json
    Its a dependency for localization
     
  37. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Thanks, I'll try that!
     
    karl_jones likes this.
  38. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    No luck, still getting just this with all my Localization related assets:

    No compile errors however. Also all my addressables seem to have vanished as in the Addressables > Groups menu I'm just greeted with this view:

    The localization assets are the only addressables we're currently using :/
     
  39. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Do you know what script is missing? Did you change a .meta file somewhere, that's what tends to create the missing script issue.
    Instead of moving the localization package into assets can you move it into Packages and edit its package.json file to remove the dependency on addressables? That may be easier.
     
  40. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    I have no idea what the missing script would be. Let me try that solution!
     
  41. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Now my localization assets seem to be fine and also the Addressables Groups is not empty. However, when I try to select the "Build" Option from the Addressable Groups, I get the following NullReferenceException:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.TopToolbar (UnityEngine.Rect toolbarPos) (at Assets/com.unity.addressables@1.19.9/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:256)
    3. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnGUI (UnityEngine.Rect pos) (at Assets/com.unity.addressables@1.19.9/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:462)
    4. UnityEditor.AddressableAssets.GUI.AddressableAssetsWindow.OnGUI () (at Assets/com.unity.addressables@1.19.9/Editor/GUI/AddressableAssetsWindow.cs:159)
    5. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:403)
    6. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:381)
    7. UnityEditor.DockArea.OldOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:372)
    8. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:366)
    9. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:682)
    10. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:654)
    11. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:647)
    12. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:607)
    13. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:596)
    14. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/IMGUIContainer.cs:529)
    15. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/Events/IEventDispatchingStrategy.cs:113)
    16. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/Events/MouseEventDispatchingStrategy.cs:35)
    17. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/Events/MouseEventDispatchingStrategy.cs:26)
    18. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/Events/MouseEventDispatchingStrategy.cs:19)
    19. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:381)
    20. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:344)
    21. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:306)
    22. UnityEngine.UIElements.EventDispatcher.OpenGate () (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:270)
    23. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:75)
    24. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:372)
    25. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/EventDispatcher.cs:222)
    26. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/Panel.cs:383)
    27. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/UIElementsUtility.cs:466)
    28. UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/UIElementsUtility.cs:209)
    29. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/UIElementsUtility.cs:74)
    30. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.18/Core/UIElementsUtility.cs:28)
    31. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    32.  
     
  42. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    If I checkout from git all the changes in the Assets/AddressableAssetsData/ folder, I am once again greeted with the empty popup saying "Create Addressables Settings". If I press the button, I end up in the situation above.
     
  43. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    This is likely because it replaces the old Addressable settings asset. The asset is referenced in ProjectSettings/EditorBuildSettings.asset
    Try changing the guid to match the one you pull from git

    e.g
    com.unity.addressableassets: {fileID: 11400000, guid: 7f490a09d1a0044c7bef1372b0609b4a,

    You may need to restart the editor after this change
     
    davidla_unity likes this.
  44. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    There seems to be no changes to the file ProjectSettings/EditorBuildSettings.asset. Any other ideas?
     
  45. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    That file may be referring to the wrong asset. Can you check if the guid in the build file matches the addressable asset settings file. The guid will be in the .meta file
     
  46. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Changed it, no changes in the Addressable Groups window. The file was previously pointing to a GUID that is the Assets/AddressableAssetsData/DefaultObject.asset, is that incorrect?
     
    Last edited: Feb 17, 2022
  47. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Check the AddressableAssetSettings object in the Data folder. Scroll to the bottom of the inspector to where Build and Playmode Scripts are listed. Do there appear to be any missing references there? I pulled the code from 1.19.9 and it looks like that null ref is coming from a data builder being null, so I'm thinking those got unlinked somehow.
     
    karl_jones likes this.
  48. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Well that asset isn't working:

    I don't think I have any problems in upgrading the packages if that helps?
     
  49. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Oh my, that's very bizarre. I see now where you posted that in your screenshot above. So, I tried installing Localization and then moving it to my Assets folder to see if I could replicate the issue and I wasn't able to reproduce it. The
    only thing I can think of is to delete that scriptable object, go into the Addressable Groups window and click Create so it'll make a new one, then go into your AssetGroups folder and drag and drop all your groups into the Groups window so it'll link it all back up.

    Then you can check the data builders, but I think it should be good. You might also have to re-reset the GUID on that default object. Let me know if any of that works. I'm really stumped on why/how this stayed messed up after you fixed the compilation errors.
     
    karl_jones likes this.
  50. jaine-wond

    jaine-wond

    Joined:
    Nov 9, 2020
    Posts:
    29
    Yeah no luck, all the Localization related assets in the AssetGroups folder also have that Missing script error... Also same thing with the DataBuilders assets. So any ideas on how to fix those? Or I can also privately share our project for you to take a look if you wish, it would be nice to see if the workaround would fix the build!