Skip to content

Instantly share code, notes, and snippets.

@ksnnacar
ksnnacar / LoadAddressablesSprite.cs
Last active December 1, 2021 08:54
Unity find atlas of a UI.Image.Sprite and set it as AssetReferenceAtlasedSprite.
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.U2D;
using UnityEngine.UI;
public class LoadAddressablesSprite : MonoBehaviour
{
[SerializeField] private AssetReferenceAtlasedSprite assetReferenceSprite;