Пример #1
0
    private void PreSetImage()
    {
        if (string.IsNullOrEmpty(currentPath))
        {
            return;
        }
        if (AtlasConfig.kUsingCopyTexture)
        {
            m_Atlas.SetTexture(currentPath, texture, OnGetImageCallBack);
        }
        else
        {
            m_Atlas.SetTexture(currentPath, texture, OnGetMaterialCallBack);
        }

        //此时可以卸载自己的引用计数
    }
Пример #2
0
    private void SetImage()
    {
        defaultSprite = sprite;
        if (string.IsNullOrEmpty(currentPath))
        {
            return;
        }
        if (AtlasConfig.kUsingCopyTexture)//Sprite 只支持using copytexture
        {
            m_Atlas.SetTexture(currentPath, mainTexture, OnGetImageCallBack);
        }
        else
        {
            gameObject.SetActiveVirtual(false);
        }

        //此时可以卸载自己的引用计数
    }