From 57d846ba961cb926610ccbf547bc1fbc452c651a Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 11 Sep 2014 14:51:18 +0100 Subject: [PATCH] Disabled binary serialisation on WinRT --- Assets/Fungus/FungusScript/Scripts/GlobalVariables.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Fungus/FungusScript/Scripts/GlobalVariables.cs b/Assets/Fungus/FungusScript/Scripts/GlobalVariables.cs index e9af853b..10932238 100644 --- a/Assets/Fungus/FungusScript/Scripts/GlobalVariables.cs +++ b/Assets/Fungus/FungusScript/Scripts/GlobalVariables.cs @@ -3,7 +3,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; +#if !UNITY_WINRT using System.Runtime.Serialization.Formatters.Binary; +#endif using System.IO; namespace Fungus @@ -24,6 +26,7 @@ namespace Fungus */ public static void Save(string saveName) { +#if !UNITY_WINRT // Save strings { var b = new BinaryFormatter(); @@ -57,6 +60,7 @@ namespace Fungus } PlayerPrefs.Save(); +#endif } /** @@ -64,6 +68,7 @@ namespace Fungus */ public static void Load(string saveName) { +#if !UNITY_WINRT var stringData = PlayerPrefs.GetString(saveName + "." + "stringDict"); if (string.IsNullOrEmpty(stringData)) { @@ -99,6 +104,7 @@ namespace Fungus var m = new MemoryStream(Convert.FromBase64String(boolData)); boolDict = b.Deserialize(m) as Dictionary; } +#endif } /**