How do I save on iOS locally?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
ryuuguu
Posts: 2
Joined: Wed May 29, 2013 2:50 pm

How do I save on iOS locally?

Post by ryuuguu »

I tried your sample code for "public class InstantiatePrefab : MonoBehaviour " on my editor with build for iOS and it does not seem to save. I added a check

Code: Select all

	void OnApplicationQuit () {
       // Save the number of prefabs we're saving.
		createdPrefabs = GameObject.FindGameObjectsWithTag(tagName);
    	ES2.Save (createdPrefabs.Length, saveFile+"?tag=prefabCount");
        
        // Now save the Transform of each created prefab,
       // using the order in the list as the tag.

		for(int i=0; i<createdPrefabs.Length; i++){
           	ES2.Save(createdPrefabs[i].transform, saveFile+"?tag="+i);
			Debug.Log (i);
		}
		Debug.Log (createdPrefabs.Length);
		Debug.Log (ES2.Exists(saveFile));
	}
and called OnApplicationQuit for my object I can see that createdPrefabs has gameobjects in it and I can it loop through them but ES2.Exists(saveFile) is returning false.
Is it possible to save files locally on iOS?
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: How do I save on iOS locally?

Post by Joel »

Hi there,

Can I confirm that you are using the latest version of Easy Save 2? Please go to the Asset Store to check if there are any updates.

Kind regards,
Joel
ryuuguu
Posts: 2
Joined: Wed May 29, 2013 2:50 pm

Re: How do I save on iOS locally?

Post by ryuuguu »

I am using v2.11 the latest version. I updated just yesterday.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: How do I save on iOS locally?

Post by Joel »

Hi ryuuguu,

We're looking into this for you as we speak.

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

Re: How do I save on iOS locally?

Post by Joel »

Hi ryuuguu,

We've not been able to replicate your problem as it seems to be working fine at our end. What is the value of the 'saveFile' variable set to? And other code you could send us would be much appreciated also.

Just to confirm, where does the problem occur? Does it work in the Unity Editor when it's set to PC/Mac, but doesn't work when it's set to iOS? Or does it not work when it's built to the device?

Regards,
Joel
Locked