一、菜单
二、工程截图
生成图集的工具类 AssetsToolEditor
三、写测试脚本
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Test : MonoBehaviour { public Image image; void Start() { StartCoroutine(LoadAtlas()); } IEnumerator LoadAtlas() { string url = string.Format("{0}/atlas/emoji.atlas", Application.streamingAssetsPath); WWW www = new WWW(url); while (!www.isDone) yield return www; AssetBundle ab = www.assetBundle; Sprite[] sprites = ab.LoadAllAssets<Sprite>(); for (int i = 0; i < sprites.Length; i++) Debug.Log(sprites[i].name); image.sprite = sprites[0]; } }