예제 #1
0
 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();
     }
 }
예제 #2
0
    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;
    }
예제 #3
0
 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();
     }
 }
예제 #4
0
    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;
    }
예제 #5
0
 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);
 }
예제 #6
0
 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);
 }