Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by tkcast · May 29, 2013 at 03:12 PM · windowsmovietexturemovie

Playing external movie file on Windows: WWW Problem

Hi, i have a list of external videos which i have to play on a GUITexture (or any texture which works, in fact). I just want to play one video at a time.

When i use WWW, the movie loads and works quite well, but when i load the next movie the memory always increases. So it is a memory leak. I've tried disposing WWW, i've tried destroying the gameobject and creating another one, and i've tried using QTPlayback plugin of the wiki, but it is not working on Windows on Unity 4.1 Pro (i've tried to change the texture pointer as they suggest in the wiki, didn't work).

Unfortunately, i can't affod AVPro. Could you help me?

Here's when i load the video:

 string pathPrefix = @"file://";
 string fullFilename = pathPrefix + movPath;
 WWW www = new WWW(fullFilename);
 movTexture = www.movie;    
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tkcast · Aug 29, 2013 at 06:03 PM 0
Share

I've found one memory leak in my code. I was doing

 Texture2D texTmp = new Texture2D(512, 512, TextureFormat.DXT5, false);

every time I wanted to load and display a new file. It turns out that this memory is never freed automatically. $$anonymous$$aybe I'm able to dispose it by myself. So I don't know about WWW, but I noticed that I should avoid allocating new Texture2D since it is not disposed automatically.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Graham-Dunnett · May 29, 2013 at 03:51 PM

It's not a memory leak. Movie textures are intended to be short clips that are used on 3d geometry. These movies are fetched but never freed up. This feature is not a movie streaming service (which throws data away once it's been decoded and presented).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

14 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Movie Texture and EndUser's PC 0 Answers

Movie Texture 0 Answers

www.movie.other formats 1 Answer

MovieTexture stops playing after first frame 0 Answers

On movie end 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges