public IImageComponent SetMovieTexture(ResourceAuto resource, System.Action onDataLoaded, System.Action onComplete = null, System.Action onFailed = null) { this.flipVerticalInternal = MovieSystem.IsVerticalFlipped(); this.SetVerticesDirty(); this.Stop(); this.SetImage(resource, onDataLoaded: () => { if (onDataLoaded != null) { onDataLoaded.Invoke(); } }, onComplete: () => { //if (UnityEngine.UI.Windows.Constants.LOGS_ENABLED == true) UnityEngine.Debug.Log("SetMovieTexture: " + this.name); MovieSystem.UnregisterOnUpdateTexture(this.ValidateTexture); MovieSystem.RegisterOnUpdateTexture(this.ValidateTexture); if (onComplete != null) { onComplete.Invoke(); } }, onFailed: onFailed); return(this); }
public IImageComponent SetMovieTexture(AutoResourceItem resource, System.Action onDataLoaded, System.Action onComplete = null, System.Action onFailed = null) { this.flipVerticalInternal = MovieSystem.IsVerticalFlipped(); this.Stop(); this.SetImage(resource, onDataLoaded: () => { if (onDataLoaded != null) { onDataLoaded.Invoke(); } }, onComplete: () => { //Debug.Log("SetMovieTexture: " + this.name); MovieSystem.UnregisterOnUpdateTexture(this.ValidateTexture); MovieSystem.RegisterOnUpdateTexture(this.ValidateTexture); if (onComplete != null) { onComplete.Invoke(); } }, onFailed: onFailed); return(this); }
public virtual IImageComponent Stop() { MovieSystem.UnregisterOnUpdateMaterial(this.ValidateMaterial); MovieSystem.UnregisterOnUpdateTexture(this.ValidateTexture); MovieSystem.Stop(this); return(this); }