Ejemplo n.º 1
0
        public void OverwriteDownloadUrl(ThumbnailUrl loadThumbnailUrl)
        {
            if (string.IsNullOrEmpty(loadThumbnailUrl.Url))
            {
                return;
            }

            if (imageTex != null && currentTexturePath == loadThumbnailUrl.Url)
            {
                return;
            }

            var downloadThumbnailService = new DownloadThumbnailService(
                loadThumbnailUrl,
                tex =>
            {
                loadingImage = false;
                imageTex     = tex;
            });

            downloadThumbnailService.Run();
            loadingImage       = true;
            imageTex           = Texture2D.whiteTexture;
            currentTexturePath = loadThumbnailUrl.Url;
        }
Ejemplo n.º 2
0
        public void SetImageUrl(ThumbnailUrl url)
        {
            if (string.IsNullOrEmpty(url.Url))
            {
                SetError();
                return;
            }

            var downloadThumbnailService = new DownloadThumbnailService(
                url, SetSuccess, exc => SetError());

            downloadThumbnailService.Run();
            reactiveOverlay.Val = "…";
        }
Ejemplo n.º 3
0
        public void SetImageUrl(ThumbnailUrl url)
        {
            IsEmpty = string.IsNullOrEmpty(url.Url);
            if (IsEmpty)
            {
                reactiveImageTex.Val = AssetDatabase.LoadAssetAtPath <Texture2D>("Packages/mu.cluster.cluster-creator-kit/Editor/Texture/require_image.png");
                reactiveOverlay.Val  = "";
                return;
            }

            var downloadThumbnailService = new DownloadThumbnailService(
                url, SetSuccess, exc => SetError());

            downloadThumbnailService.Run();

            reactiveOverlay.Val = "…";
        }
Ejemplo n.º 4
0
        public void SetImageUrl(ThumbnailUrl url)
        {
            IsEmpty = string.IsNullOrEmpty(url.Url);
            if (IsEmpty)
            {
                reactiveImageTex.Val = Resources.Load <Texture2D>("require_image");
                reactiveOverlay.Val  = "";
                return;
            }

            var downloadThumbnailService = new DownloadThumbnailService(
                url, SetSuccess, exc => SetError());

            downloadThumbnailService.Run();

            reactiveOverlay.Val = "…";
        }