Search Unity

Bug (v0.4.8-preview) Addressables.LoadCatalogsFromRuntimeData()

Discussion in 'Addressables' started by s-vovik, Dec 17, 2018.

  1. s-vovik

    s-vovik

    Joined:
    Mar 24, 2017
    Posts:
    15
    Platform: WebGL

    I have 2 projects: Client & GameEditor. Both has addressables systems. Client build all UI bundles while GameEditor generates all bundles for game objects and environment. In Client startup I have a script

    Code (CSharp):
    1. public class StartController : MonoBehaviour
    2. {
    3.     public string addressablesCatalog;
    4.    
    5.     void Start()
    6.     {
    7.         Addressables.InitializationOperation.Completed += operation =>
    8.         {
    9.             if (!string.IsNullOrEmpty(addressablesCatalog))
    10.                 Addressables.LoadCatalogsFromRuntimeData(addressablesCatalog);
    11.         };
    12.     }
    13. }
    The problem is that both projects auto generates UnityBuiltInShaders inside theirse catalogs. So when we LoadCatalogsFromRuntimeData we have 2 addessReferense with same address. As a result we have shaders nightmare and fails to load some addressables prefabs.

    Am I miss somthing?

    Any help is apprisiated.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    you are in advanced territory that we haven't fully tested. The shader issue doesn't seem to be you "missing" anything. I think it's an issue on our part. We'll look into it.
     
    MNNoxMortem likes this.
  3. diego_mp

    diego_mp

    Joined:
    Jun 12, 2017
    Posts:
    23
    Yep, same problem here with 0.5.3.

    Code (CSharp):
    1. E/Unity: Exception encounterd in operation UnityEngine.ResourceManagement.AssetBundleProvider+InternalOp`1[System.Object], result='', status='None', valid=True, location=Assets/StreamingAssets/com.unity.addressables/Android/UnityBuiltInShaders..
    2.     UnityEngine.DebugLogHandler:Internal_Log()
    3.     UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4.     UnityEngine.Logger:LogFormat(LogType, String, Object[])
    5.     UnityEngine.Debug:LogErrorFormat(String, Object[])
    6.     UnityEngine.AddressableAssets.Addressables:LogException(IAsyncOperation, Exception) (at /Users/xxx/Dev/BRANCH_Academy/Library/PackageCache/com.unity.addressables@0.5.3-preview/Runtime/Addressables.cs:177)
    7.     UnityEngine.ResourceManagement.AsyncOperationBase`1:set_OperationException(Exception) (at /Users/xxx/Dev/BRANCH_Academy/Library/PackageCache/com.unity.resourcemanager@2.4.4-preview/Runtime/AsyncOperations/AsyncOperationBase.cs:167)
    8.     UnityEngine.ResourceManagement.InternalOp`1:<.ctor>b__5_0(IAsyncOperation`1) (at /Users/xxx/Dev/BRANCH_Acade
    9. E/Unity: Exception: Invalid path in AssetBundleProvider: 'Assets/StreamingAssets/com.unity.addressables/Android/UnityBuiltInShaders'.
    [Update] Actually is not the same. I am just trying to load multiple scenes (
    LoadSceneMode.Additive) within a single project. The App crashes there but that folder is auto-generated by the Addressables.
     
    Last edited: Jan 11, 2019
    unitydevelopers-greg likes this.
  4. unitydevelopers-greg

    unitydevelopers-greg

    Joined:
    Nov 15, 2018
    Posts:
    12
    @unity_bill Same here, the issue is holding major release. Any ETA on the fix? Can you drop the updates here please
     
    diego_mp and MNNoxMortem like this.
  5. diego_mp

    diego_mp

    Joined:
    Jun 12, 2017
    Posts:
    23
    I found a workaround for now, just kill the function that builds the UnityBuiltInShaders.
    Open CreateBuiltInShadersBundle and
    Code (CSharp):
    1.         public ReturnCode Run()
    2.         {
    3.             return ReturnCode.Success;
    4.         }
    It will break something at least I can go on now.
     
  6. SimonVTate

    SimonVTate

    Joined:
    May 15, 2019
    Posts:
    1
    Was the UnityBuiltInShaders problem fixed?

    I have a similar problem with remote catalogues and keep getting:

    Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/StreamingAssetsCopy/aa/Windows/StandaloneWindows64/defaultlocalgroup_unitybuiltinshaders………

    In the main game. My level and asset builders apps all work fine.
     
  7. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    That is likely due to a Windows too-long-path issue. You can somewhat help it by setting your group to "HashOnly" or "NoHash" naming. Also, make sure the folder your unity project is in isn't super deep in some file structure.
     
  8. Fingerbob

    Fingerbob

    Joined:
    Sep 6, 2014
    Posts:
    24
    Would it be possible to get a warning to the effect of "Path too long ..." in that case (assuming you can detect it) ? This was the cause of one of my builds not working (Unity 2020.1, Addressables 1.8.4) and without stumbling on this thread I doubt I'd have resolved it in a timely fashion.