Closed absences closed 1 year ago
there is my steps: Test.cs:
using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.U2D; using UnityEngine.UI;
public class Test : Image { // Start is called before the first frame update protected override void Start() { base.Start();
Addressables.LoadAssetAsync<SpriteAtlas>("Atlas/hero.spriteatlas").Completed += OnCompleted; } void OnCompleted(AsyncOperationHandle<SpriteAtlas> op) { sprite = op.Result.GetSprite("hero_icon_004"); Addressables.Release(op); }
}
then,play the game in editor, everything right. but exit the game ,hide unity window and reopen editor window(just refresh) , the "hero_icon_004" show in the scene(not playing!)
i guess something woring with inherit the UIBehaviour,
there is my steps: Test.cs:
using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.U2D; using UnityEngine.UI;
public class Test : Image { // Start is called before the first frame update protected override void Start() { base.Start();
}
then,play the game in editor, everything right. but exit the game ,hide unity window and reopen editor window(just refresh) , the "hero_icon_004" show in the scene(not playing!)
i guess something woring with inherit the UIBehaviour,