x


How to Convert MovieTexture to Byte?

In my project at school, I need to load an .ogg file from a local file system then upload it into a web server. But, base on samples on the net, I guess before I can upload the MovieTexture file, first I need to convert it into byte. So my question is how to convert MovieTexture to Byte?

Btw, I already google the issue, but can't find an answer so far. Any help will be appreciated.

Thanks.

more ▼

asked Mar 03 '11 at 02:18 PM

Sanlaato gravatar image

Sanlaato
31 2 2 7

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

If you're happy to just load the file with http://System.IO:

var bytes = System.IO.File.ReadAllBytes("file.ogg");

Alternatively, use the WWW class. It has a bytes member you can get the bytes from.

Otherwise I don't know how to get the bytes of a MovieTexture.

more ▼

answered Mar 03 '11 at 02:28 PM

Statement gravatar image

Statement ♦♦
20.1k 35 70 175

Damn me! I forgot about .bytes X) Well I really need the .progress in WWW class so I don't want the http://System.IO solution. I think I can make this works now. Thanks for the help:)

Mar 03 '11 at 02:39 PM Sanlaato
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x527
x107
x63
x21

asked: Mar 03 '11 at 02:18 PM

Seen: 1085 times

Last Updated: Mar 03 '11 at 02:18 PM