Need help loading old android and ios saves

Yeah, SharedObjects used to be saved as user preferences rather than as explicit .sol files. Since the code for accessing those preferences seems to be completely absent from Lime now, you’ll want to grab the legacy code and put it in an extension, or manually find and parse the files where user prefs are stored with Haxe code.

Since I believe the user prefs can be found in different places on different Android devices, it’s probably easier to copy over the old Lime code.

Here’s an extension where the work is already done (probably). It came from a larger extension, with some things cut out and others renamed. Honestly, I didn’t test it after refactoring.

With that extension included, you would probably write something like this to access the old SharedObjects.

@:access(openfl.net.SharedObject)
public static function convertLegacySharedObject(name:String):Void
{
	#if mobile
	var path = SharedObject.__getPath("", name);
	
	if(!FileSystem.exists(path))
	{
		var data = MobilePrefs.getUserPreference(name);
		
		if(data != null && data != "")
		{
			try
			{
				var directory = Path.directory(path);
				
				if(!FileSystem.exists(directory))
				{
					SharedObject.__mkdir(directory);
				}
				
				var output = File.write(path, false);
				output.writeString(data);
				output.close();
			}
			catch(e:Dynamic)
			{
				trace(e);
			}
		}
	}
	#end
}