示例#1
0
 public void SetIconURL(string url)
 {
     if (url.StartsWith("//"))
     {
         url = "http:" + url;
     }
     this.m_IconKeyimage      = new Image();
     this.m_IconKeyimage.mUrl = url;
     this.m_IconKeyimage.Name = "icon";
     ImageCache.DownloadImage(this.m_IconKeyimage, null);
 }
示例#2
0
        public static ImageCache PushImage(string url, Texture2D tex)
        {
            ImageCache.EnsureCacheSpace();
            ImageCache imageCache = new ImageCache();

            imageCache.Failed            = false;
            imageCache.Texture           = tex;
            imageCache.LastUsed          = EditorApplication.timeSinceStartup;
            imageCache.Progress          = -1f;
            ImageCache.EntriesByUrl[url] = imageCache;
            return(imageCache);
        }
示例#3
0
 public static ImageCache PushImage(Image img, Texture2D tex)
 {
     img.mImgCache = ImageCache.PushImage(img.mUrl, tex);
     return(img.mImgCache);
 }