WOW! this is an awesome package, thanks so much for making it!
I'm making a game in which two fairly complex rigs are interacting, and the end use involves allowing end users to manipulate the rigs and then share the positions they put them in. (It's an MMA / Combat Sports move repository). I got the auto save function to work instantly and perfectly... well, it does what it's designed to perfectly, not what I'd like it to, haha, seriously this is a real relief to even get to here after trying to figure out how to save / load by myself from scratch.
I have two main questions:
1) What is the best way to force the game to save or load game objects and their children on a button press in game? The game object save process says to write
// Save a GameObject.
ES3.Save<GameObject>("myGameObject", go);
but Unity's editor rejects it, with error message "error CS0103: the name "go" does not exist in the current context"
I am very very very new to unity, so I'm presuming I'm missing something here, but I don't know what.
My second, and more nebulous question is: How do / Can you create multiple save files? It looks like the code currently just overwrites itself, but I'd like to end up being able to do the following steps:
1) Open a general menu window and pick one "position" from a list of saved position files and load it
2) Manipulate the figures to different positions
3) Press a save button, which pops up an input field where I can type a new save file name (which I can already do/may not be germane to your program/not your problem, just including it for continuities sake)
4) that newly named pose / file gets added to the file list
5 if possible?) I'd like to have the save files in folders ideally for the different macro positions, and then have subfiles for each move group, but that may, once again, be outside your program's a/o.
Mostly wondering about saving and loading separate files instead of just an read/write on the same file location
Sorry if any of this is woefully stupid question or a waste of whoever is reading this' time
Access Multiple Save Files
Re: Access Multiple Save Files
Hi there,
With regards to the error you are getting, the go parameter needs to be the GameObject you want to save. The error message means that no variable named 'go' exists.
I strongly recommend that you get some advice on coding from the Unity forums before trying to write code, because I can only assist with issues specific to Easy Save, not general programming mistakes.
With regards to setting the filename, the ES3.Save and ES3.Load methods accept a filename parameter you can use to set the filename and folder.
With regards to the GUI aspects, this is a question regarding coding for Unity in general, so you will need to ask about how to implement a GUI on the Unity forums.
All the best,
Joel
With regards to the error you are getting, the go parameter needs to be the GameObject you want to save. The error message means that no variable named 'go' exists.
I strongly recommend that you get some advice on coding from the Unity forums before trying to write code, because I can only assist with issues specific to Easy Save, not general programming mistakes.
With regards to setting the filename, the ES3.Save and ES3.Load methods accept a filename parameter you can use to set the filename and folder.
With regards to the GUI aspects, this is a question regarding coding for Unity in general, so you will need to ask about how to implement a GUI on the Unity forums.
All the best,
Joel
Re: Access Multiple Save Files
Ok, thanks very much, I'll give it a shot.
Re: Access Multiple Save Files
Does Auto Save have a filename parameter too? Because I would like to use it to save different scene on different files.Joel wrote:Hi there,
With regards to the error you are getting, the go parameter needs to be the GameObject you want to save. The error message means that no variable named 'go' exists.
I strongly recommend that you get some advice on coding from the Unity forums before trying to write code, because I can only assist with issues specific to Easy Save, not general programming mistakes.
With regards to setting the filename, the ES3.Save and ES3.Load methods accept a filename parameter you can use to set the filename and folder.
With regards to the GUI aspects, this is a question regarding coding for Unity in general, so you will need to ask about how to implement a GUI on the Unity forums.
All the best,
Joel
Re: Access Multiple Save Files
Hi there,
You can change the filepath for Auto Save using the following code:
Joel
You can change the filepath for Auto Save using the following code:
GameObject.Find("Easy Save 3 Manager").GetComponent<ES3AutoSaveMgr>().settings.path = "YourFileNameOrPathHere"All the best,
Joel
Re: Access Multiple Save Files
Thank you!Joel wrote:Hi there,
You can change the filepath for Auto Save using the following code:
GameObject.Find("Easy Save 3 Manager").GetComponent<ES3AutoSaveMgr>().settings.path = "YourFileNameOrPathHere"All the best,
Joel