I am trying to load some binary files from my Resources folder as TextAsset.
Currently I am doing this:
However this doesn't seem to work correctly. I have a file that is supposed to be 176kb long, but bytes.Length reports it's only 85524 bytes long. Also I found out using a hex editor, that when parsing the file the first byte of the file is not read. Instead it starts with the second byte.
I have another file that is a lot shorter (~36kb), which is read correctly with the same code.
asked Oct 31 '10 at 02:00 PM
Unity 2.6 cannot use TextAsset.bytes correctly; you need to use Unity 3. (It works fine in Unity iPhone 1.7 though.)
answered Oct 31 '10 at 04:08 PM