Unity实现精灵资源动态加载

    private Sprite LoadSourceSprite(string relativePath)
    {
        //把资源加载到内存中
        UnityEngine.Object Preb = Resources.Load(relativePath, typeof(Sprite));
        Sprite sprite = null;

        ExceptionHandler.Assert(() => { sprite = Instantiate(Preb) as Sprite; });

        //用加载得到的资源对象,实例化游戏对象,实现游戏物体的动态加载
        return sprite;
    }
原文地址:https://www.cnblogs.com/ezhar/p/12924137.html