Cannot read Vector3 array

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
MaximumFirecracker
Posts: 22
Joined: Thu Nov 13, 2014 9:05 pm

Cannot read Vector3 array

Post by MaximumFirecracker »

I just bumped into this very odd error. Whenever I try to load this Vector3 array, I get an OutOfMemoryException.

Code: Select all

var bytes = Resources.Load<TextAsset>("bakeData").bytes;
var data = ES2Reader.Create(bytes, new ES2Settings { });
var offsets = data.ReadArray<Vector3>();
I'm using the latest EasySave2 (2.8.2).

Attached the bakeData.txt file.
Attachments
bakeData.txt
(4.5 KiB) Downloaded 439 times
MaximumFirecracker
Posts: 22
Joined: Thu Nov 13, 2014 9:05 pm

Re: Cannot read Vector3 array

Post by MaximumFirecracker »

Ok, if loading the file directly this error doesn't seem to occur. So I guess EasySave doesn't like TextAssets?
User avatar
Joel
Moodkie Staff
Posts: 4860
Joined: Wed Nov 07, 2012 10:32 pm

Re: Cannot read Vector3 array

Post by Joel »

Hi there,

TextAssets apply an encoding to the data unless you give the file the extension .bytes.

For more information on loading from Resources, see our Loading from Resources guide:
http://docs.moodkie.com/easy-save-2/gui ... resources/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
MaximumFirecracker
Posts: 22
Joined: Thu Nov 13, 2014 9:05 pm

Re: Cannot read Vector3 array

Post by MaximumFirecracker »

Thanks! That fixed it.
Locked