5313人加入学习
(36人评价)
Unity商业游戏底层资源加载框架(Unity2018.1)

更新完成,更新时间2018-12-26

价格 ¥ 350.00
该课程属于 Unity - A计划(永久有效期) 请加入后再学习

图片加载不出来可以用下面这种形式,就不用在方法里面传参数了;

private void OnLoadSpriteTest1(string path, object obj, object param1 = null, object param2 = null, object param3 = null)
    {
        if (obj != null)
        {
            Texture2D texture = obj as Texture2D;
            Sprite sprite = Sprite.Create(texture, new Rect(0,0,texture.width,texture.height),new Vector2(1f,1f));
            m_MainPanel.Test1.sprite = sprite;
            Debug.Log("图片1已加载");
        }
    }

测试可以加载出来

[展开全文]