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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Dublicates ResourceLocation

Discussion in 'Addressables' started by deters, May 29, 2020.

  1. deters

    deters

    Joined:
    Aug 19, 2015
    Posts:
    6
    When I load resource locations, have duplicates assets path but with different hashes. Why it can be? Is It meant that i have two bundles (old and new) ?

    Code (CSharp):
    1.  
    2.        
    3. public IEnumerator Load(GameState type)
    4. {
    5.     var operation = Addressables.LoadResourceLocationsAsync(Labels.UI_ByName.ToString());
    6.     yield return operation;
    7.     Debug.Log("AddressableManager load");
    8.     foreach (var location in operation.Result)
    9.     {
    10.         Debug.Log(location);
    11.         Debug.Log(location.Hash(location.ResourceType));
    12.  
    13.         var name = Path.GetFileNameWithoutExtension(location.PrimaryKey);
    14.         Debug.Log(name);
    15.         if (!LocationsAssets.ContainsKey(name))
    16.             LocationsAssets.Add(name, location.PrimaryKey);
    17.     }
    18.  
    19.     yield return null;
    20. }
    21.  
    My logs:
    upload_2020-5-29_12-40-0.png
    Group Settings
    upload_2020-5-29_12-40-32.png
     
  2. deters

    deters

    Joined:
    Aug 19, 2015
    Posts:
    6
    Ok, i found what the problem was. First result is reference to texture, second to sprite