コード例 #1
0
 void OnDestroy()
 {
     if( mto!=null ){
         Destroy(mto);
         mto = null;
     }
 }
コード例 #2
0
 void OnDestroy()
 {
     if (mto != null)
     {
         Destroy(mto);
         mto = null;
     }
 }
コード例 #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 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();
     }
 }
コード例 #6
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;
    }
コード例 #7
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);
 }
コード例 #8
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);
 }