Пример #1
0
        public void LoadMovie(string url, BinkPlugin bp)
        {
            this.filePath = url;
            this.binkPlugin = bp;

            this._LoadMovie();
        }
Пример #2
0
        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();
        }
Пример #3
0
        public void LoadMovie(string url, BinkPlugin bp)
        {
            this.filePath   = url;
            this.binkPlugin = bp;

            this._LoadMovie();
        }
Пример #4
0
        /// 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);
            }
        }
Пример #5
0
 public void LoadMovie(string url)
 {
     this.filePath = url.Replace("\\","/");
     this.binkPlugin = this.gameObject.GetOrAddComponent<BinkPlugin>();
     this._LoadMovie();
 }
Пример #6
0
 public void LoadMovie(string url)
 {
     this.filePath   = url.Replace("\\", "/");
     this.binkPlugin = this.gameObject.GetOrAddComponent <BinkPlugin>();
     this._LoadMovie();
 }