Beispiel #1
0
    public void ToImage(int to)
    {
        lastPageNo = currentPageNo;
        netTexture2DGroup[lastPageNo].scaleImage = null;

        currentPageNo = to;
        scaleImage.SetImage(netTexture2DGroup[currentPageNo].LoadTexture2D(scaleImage));
    }
Beispiel #2
0
    /// <summary>
    /// 当缓存到本地时,如果这张图有被scaleImage使用就保留,如果没有被使用就Destroy以减少内存使用;
    /// </summary>
    /// <param name="inTex"></param>
    public void OnLocalCached(Texture2D inTex)
    {
        if (!hasLocalCached)
        {
            hasLocalCached = true;

            if (scaleImage != null)
            {
                scaleImage.SetImage(inTex);
                ramCachetexture = inTex;
            }
            else
            {
                Object.Destroy(inTex);
            }
        }

//       scaleImage.SetImage(inTex);
    }