void SetMovieFile(string movieFileName) { if( mto!=null ){ Destroy(mto); mto = null; } mto = ScriptableObject.CreateInstance<GLMovieTextureObject>(); mto.Load(targetTexture,movieFileName); mto.SetLoop(loop); if( autoPlay ){ mto.Play(); } }
void LoadMovieTexture(string moviePath) { if( _renderer==null || moviePath == null ){ return; } if( _mto != null ){ Destroy(_mto); _mto = null; } Texture2D texture = new Texture2D(1,1,TextureFormat.ARGB32, false); _mto = ScriptableObject.CreateInstance<GLMovieTextureObject>(); _mto.Load(texture,moviePath); _mto.SetLoop(true); _renderer.material.mainTexture = texture; }
void SetMovieFile(string movieFileName) { if (mto != null) { Destroy(mto); mto = null; } mto = ScriptableObject.CreateInstance <GLMovieTextureObject>(); mto.Load(targetTexture, movieFileName); mto.SetLoop(loop); if (autoPlay) { mto.Play(); } }
void LoadMovieTexture(string moviePath) { if (_renderer == null || moviePath == null) { return; } if (_mto != null) { Destroy(_mto); _mto = null; } Texture2D texture = new Texture2D(1, 1, TextureFormat.ARGB32, false); _mto = ScriptableObject.CreateInstance <GLMovieTextureObject>(); _mto.Load(texture, moviePath); _mto.SetLoop(true); _renderer.material.mainTexture = texture; }
void Start() { if (targetTexture != null) { mto = ScriptableObject.CreateInstance <GLMovieTextureObject>(); if (!mto.Load(targetTexture, targetTexture.name)) { Destroy(mto); mto = null; return; } mto.SetLoop(loop); if (autoPlay) { mto.Play(); } return; } targetTexture = new Texture2D(1, 1); }
void Start() { if( targetTexture!=null ){ mto = ScriptableObject.CreateInstance<GLMovieTextureObject>(); if( !mto.Load(targetTexture,targetTexture.name) ){ Destroy(mto); mto = null; return; } mto.SetLoop(loop); if( autoPlay ){ mto.Play(); } return; } targetTexture = new Texture2D(1,1); }