public void LoadMovie(string url, BinkPlugin bp) { this.filePath = url; this.binkPlugin = bp; this._LoadMovie(); }
private void _LoadMovie() { BinkPlayOptions bpo = this.getBinkPlayOptions(); BinkPlugin bp = this.binkPlugin; string url = this.filePath; if (bp.enabled && bp.MovieLoaded) { bp.Cleanup(); //undo textureAspectRatio... this.UndoAspectRatios(); } bp.SetAlpha(bpo.alphaChannel); bp.isGameSpeedAgnostic = this.isGameSpeedAgnostic; bp.enabled = true; bool ok = bp.LoadMovie(url); if (ok) { this.textureAspectRatio = bp.getAspectRatio(); } else { Debug.LogError("Problem loading Bink file " + url); } LocalMediaReady(); }
/// Give an existing GameObject an icBinkMaterial with a given local Bink file. public icBinkMaterial CreateBinkMaterial(string filePath, GameObject go) { if (ToolbeltManager.FirstInstance.useBink) { icBinkMaterial mat = go.GetComponent <icBinkMaterial>(); if (mat == null) { mat = go.AddComponent <icBinkMaterial>(); } BinkPlugin bp = go.GetOrAddComponent <BinkPlugin>(); mat.LoadMovie(filePath, bp); return(mat); } else { Debug.LogWarning("Tried to CreateBinkMaterial() when ToolbeltManager::useBink is false. Returning null. \"" + filePath + "\""); return(null); } }
public void LoadMovie(string url) { this.filePath = url.Replace("\\","/"); this.binkPlugin = this.gameObject.GetOrAddComponent<BinkPlugin>(); this._LoadMovie(); }
public void LoadMovie(string url) { this.filePath = url.Replace("\\", "/"); this.binkPlugin = this.gameObject.GetOrAddComponent <BinkPlugin>(); this._LoadMovie(); }