Hello:
I use the Addressables to Remote Download spriteAtlas.
In the “Simulate Groups” error:
ResourceManagerException encountered in operation InvalidHandle: Unable to load asset Assets/Resources_moved/Art/Atlas/MainCards.spMainCards from simulated bundle http://156.233.64.47/slots/Android/77739cdc7ca2645a40b743cd298142fa_assets_all.bundle.
UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase1:<.ctor>b__27_0(AsyncOperationHandle) DelegateList1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.AsyncOperations.GroupOperation:OnOperationCompleted(AsyncOperationHandle)
DelegateList1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69) UnityEngine.ResourceManagement.ResourceProviders.Simulation.InternalOp:<Start>b__4_0(VBAsyncOperation1)
DelegateList1:Invoke(VBAsyncOperation1) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
UnityEngine.ResourceManagement.ResourceManager:Update(Single)
My Code:
public class Test2 : MonoBehaviour
{
public SpriteRenderer ss;
//public SpriteAtlas sp;
public AssetReferenceAtlas spriteAtlasReference;
// Start is called before the first frame update
void Start()
{
//Addressables.LoadAssetAsync("MainCards").Completed += OnLoadDone;
spriteAtlasReference.LoadAssetAsync().Completed += AtlasDone;
//ss.sprite = sp.GetSprite("ui_spcard_01");
}
void AtlasDone(AsyncOperationHandle<SpriteAtlas> op)
{
if (op.Result == null)
{
Debug.LogError("no atlases here.");
return;
}
//sp = obj.Result;
//spritesToChange[2].sprite = op.Result.GetSprite("u3");
//sp = obj.Result;
ss.sprite = op.Result.GetSprite("ui_spcard_01");
}
/*
private void OnLoadDone(UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle<SpriteAtlas> obj)
{
// In a production environment, you should add exception handling to catch scenarios such as a null result.
//myGameObject = obj.Result;
sp = obj.Result;
ss.sprite = sp.GetSprite("ui_spcard_01");
}*/
// Update is called once per frame
}
[Serializable]
public class AssetReferenceAtlas : AssetReferenceT<SpriteAtlas>
{
public AssetReferenceAtlas(string guid) : base(guid) { }
}
and My Setting:



