- Home /
Getting an array of floats from a .bytes asset
From my understanding, if I have an asset referenced in the editor by a script that asset will be included in the build.
If that asset is a .bytes asset then presumably those bytes are part of the created executable. (I'm particularly thinking about Android but I assume it applies more broadly.)
If this is the case is there any way that I can access those bytes as an array of floats without making a copy of them? It seems like TextAsset.GetBytes() creates a copy and I would then need to use BlockCopy or BitConverter to copy them once again to create the float array..
I wouldn't worry but I'm looking at 16MB of data or more.
Your answer
Follow this Question
Related Questions
Why can I make a float turn into an int? 2 Answers
How to assign variables like Texture2D, TextAsset, Transform, etc. using code? 1 Answer
Loading TextAsset returns null 1 Answer
How to make a custom TextAsset? 1 Answer
Using Resources.Load on my binary data to create a custom asset actually doubles its size 1 Answer