I’m having some trouble with unloading / de-initializing movieTextures.
I currently have a series of movies that are loaded one by one into the same variable on a keypress.
movieTexture is defined as a private scope class variable and each movie is loaded into the variable like so:
movieTexture = (MovieTexture)Resources.Load(movieTexturePath);
After the movieTexture has finished playing, I call movieTexture.Stop();
This is all fine, however If the user presses a key during the playback and repeats the MovieTexture playback there is often (not always) a brief glitch where the first few hundredths of a second of the previous movieTexture plays before the new MovieTexture loads and plays - this causes a noticeable glitch.
I have tried setting MovieTexture to null and have tried destroying it, but I actually need to keep track of it rather than destroying it so I can de-initialize it if the user decides to interrupt it. I’d have thought that setting it to null would do the trick but it doesn’t.
I found another thread which is related http://forum.unity3d.com/threads/28034-How-do-you-rewind-a-movie-texture but does not offer a solution. Seems like the movieTexture is not completely removed from Memory when a new one is loaded in its place.
If anybody has experienced the same behaviour or knows of a solution I’d like to hear from you, I really want to solve this problem (bug?)