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;
    }

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2021-12-12
  • 2022-01-07
  • 2021-12-14
  • 2021-12-12
  • 2021-06-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2021-12-12
  • 2021-08-31
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案