private void Start()
 {
     //unneeded now
     //init rendertexture
     setupRenderTex();
     //create VideoCacheData this is the unity 'instance'. this should only ever be created once per movie, in Start.
     VideoInstance = createVideoTexture();
     //store this instance in manager for videoLoaded/videoEnded callbacks
     VTP.addInstance(this);
     //set the path to the movie, then call this.
     load();
 }
예제 #2
0
    private void Start()
    {
        if (!VTP.checkIfVTPSupported())
        {
            return;
        }

        if (!VideoTextureCacheContext.instance && !destroyed && Camera.main != null && Camera.main.gameObject != null)
        {
            Camera.main.gameObject.AddComponent <VideoTextureCacheContext>();
        }

        //init rendertexture
        setupRenderTex();
        //create VideoCacheData this is the unity 'instance'. this should only ever be created once per movie, in Start.
//		VideoInstance = createVideoTexture();
        //store this instance in manager for videoLoaded/videoEnded callbacks
        VTP.addInstance(this);

        //set the path to the movie, then call this.
        load();
    }