public virtual void AsyncUpdate(WWWAsync.DownloadState progression, object result, object userData) { if (progression == UUEX.UI.WWWAsync.DownloadState.COMPLETED) { // Instantiate and update } }
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); } }
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; } }
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; } }
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; } } }
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; } } }