I`m trying to load a SpriteAtlas packed in a bundle.
In my test scenario is just one bundle with no variants.
The altas is loaded and the number of sprites in the atlas is correct (I logged it)
I tryed with and without including it in the build.
public override void OnBundleLoaded(IEvent payload)
{
base.OnBundleLoaded(payload);
string error;
LoadedAssetBundle loaded = AssetBundleManager.GetLoadedAssetBundle(@“test”, out error);
SpriteAtlas atlas = loaded.m_AssetBundle.LoadAsset(“TestAtlas”);
GameObject go = new GameObject();
go.AddComponent();
go.GetComponent().sprite = atlas.GetSprite(“clubs_11_en”);
go.name = “test”;
Debug.Log("LoadAtlasBundleCommand:OnBundleLoaded ------------ “+ atlas+” "+ atlas.spriteCount);
}
The problem is that visually the atlas seem to be empty. The sprites are invisible and when i pass the atlas to a public variable to inspect it, i don`t see any linked texture on it.
I really have no idea where the problem is, you are my last hope.