Пример #1
0
 public virtual void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
 {
     if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED)
     {
         // Instantiate and update
     }
 }
Пример #2
0
 public virtual void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
 {
     if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED && result != null && result is AudioClip)
     {
         SoundManager.Play(result as AudioClip);
     }
 }
Пример #3
0
        public override void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
        {
            if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED)
            {
                Texture2D texture = result as Texture2D;

                Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
                mBackgroundImage.sprite = sprite;
            }
        }
Пример #4
0
        public virtual void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
        {
            if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED)
            {
                Texture2D texture = result as Texture2D;

                Image  image  = GetComponent <Image>();
                Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
                image.sprite = sprite;
            }
        }
Пример #5
0
        public void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
        {
            if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED)
            {
                Texture2D texture = result as Texture2D;

                RawImage rawImage = GetComponent <RawImage>();
                if (rawImage != null)
                {
                    rawImage.texture = texture;
                }
            }
        }
Пример #6
0
        public override void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData)
        {
            base.AsyncUpdate(progression, result, userData);

            if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED && result is Texture2D)
            {
                Texture2D texture = result as Texture2D;

                if (mRawImage != null)
                {
                    mRawImage.texture = texture;
                }
            }
        }