Using VRIF asset and not loading saved info

Discussion and help for Easy Save 3
Post Reply
frostamation
Posts: 12
Joined: Mon Jan 19, 2015 11:39 pm

Using VRIF asset and not loading saved info

Post by frostamation »

So im using VRIF asset which is the vr backbone, not to important, but I am saving objects in their "snap zone" (just a holder of said objects the player can put in and take out of). I am using autosave for this script and everything saves and loads properly except for one item which is the "held item" on the script. this held item is the game object that is attached to the snap zone. without it i can not remove any objects from this snap zone. for whatever reason es3 does not load this variable into the script.

any help appreciated. thanks!

attached some screen shots if they help.
three.png
three.png (52.9 KiB) Viewed 219 times
two.png
two.png (27.22 KiB) Viewed 219 times
one.png
one.png (36.45 KiB) Viewed 219 times

User avatar
Joel
Moodkie Staff
Posts: 4123
Joined: Wed Nov 07, 2012 10:32 pm

Re: Using VRIF asset and not loading saved info

Post by Joel »

Hi there,

Do you get any warnings in console when loading?

It's likely that the reference to that GameObject doesn't exist between sessions, for example because it's generated at runtime so has a different reference ID each time.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

frostamation
Posts: 12
Joined: Mon Jan 19, 2015 11:39 pm

Re: Using VRIF asset and not loading saved info

Post by frostamation »

There are no errors in console on load or exit. is there a way to manually set a reference ID?

User avatar
Joel
Moodkie Staff
Posts: 4123
Joined: Wed Nov 07, 2012 10:32 pm

Re: Using VRIF asset and not loading saved info

Post by Joel »

You can manually set a reference ID for an object using ES3ReferenceMgr.Current.Add(yourObject, id), and you should also call ES3ReferenceMgr.Current.Remove(yourObject) beforehand to ensure that any previously assigned ID is removed.

You would need to do this for each reference which is being saved/loaded.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Post Reply