Xcode trows a exception that says unknown filename(-1).
![binaryformatter in unity for mac binaryformatter in unity for mac](https://user-images.githubusercontent.com/31087168/42213541-a49989c0-7eeb-11e8-95b7-141d1e640b43.png)
BINARYFORMATTER IN UNITY FOR MAC PC
This works on a pc and a mac, but when I build it to the Ipad air2 and its like nothing happens. I'm using OnDisable/OnEnable so that my game autosaves every time the users exits. GameData data = (GameData)binFormatter.Deserialize(file) If (File.Exists(Application.persistentDataPath + "/savedgame.dat"))įileStream file = File.Open(Application.persistentDataPath + "/savedgame.dat",FileMode.Open) This one saves/creates the fileīinaryFormatter binFormatter = new BinaryFormatter() įileStream file = File.Create(Application.persistentDataPath + "/savedgame.dat") Just so that you dont have to or want to watch the whole video, here is the save/load functions. , so I followed the tutorial at unit圓d.com (located here) :Run(ExecutionContext, ContextCallback, Object, Boolean) :RunInternal(ExecutionContext, ContextCallback, Object, Boolean) UnityEngine.Debug:LogException(Exception) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) Possible causes are invalid stream or object version change between serialization and deserialization.Īt .Binary._BinaryParser.Run () in :0Īt. (.HeaderHandler handler, .Binary._BinaryParser serParser, System.Boolean fCheck) in :0Īt. (System.IO.Stream serializationStream, .HeaderHandler handler, System.Boolean fCheck) in :0Īt. (System.IO.Stream serializationStream, .HeaderHandler handler) in :0Īt. (System.IO.Stream serializationStream) in :0Īt StandardFileSystem.LoadObject (System.String filename) in :0 SerializationException: Binary stream '0' does not contain a valid BinaryHeader. Total: 5.459800 ms (FindLiveObjects: 0.220000 ms CreateObjectMapping: 0.123000 ms MarkObjects: 4.921000 ms DeleteObjects: 0.195500 ms)įile is invalid: C:/Users/(Me)/AppData/LocalLow/adamgryu/A Short Hike/GameSaveNew.mountain
![binaryformatter in unity for mac binaryformatter in unity for mac](https://i.ytimg.com/vi/heiYQNs-vLE/maxresdefault.jpg)
![binaryformatter in unity for mac binaryformatter in unity for mac](https://blog-api.unity.com/sites/default/files/2009/03/unity25.jpg)
Unloading 56 unused Assets to reduce memory usage. I will not clear things because this should be persistent in this game! Yarn is trying to ResetToDefaults in this adapter. DialogueController: Located service and caching it. An instance of GlobalData is needed in the scene, so '(Global Singleton) GlobalData (UnityEngine.GameObject)' was created with DontDestroyOnLoad. An instance of ServiceLocator is needed in the scene, so '(Global Singleton) ServiceLocator (UnityEngine.GameObject)' was created with DontDestroyOnLoad. An instance of CustomControllerManager is needed in the scene, so '(Global Singleton) CustomControllerManager (UnityEngine.GameObject)' was created with DontDestroyOnLoad. An instance of is needed in the scene, so '(Global Singleton) (UnityEngine.GameObject)' was created with DontDestroyOnLoad. Setting up 8 worker threads for Enlighten.Īt (wrapper managed-to-native) (UnityEngine.GameObject,bool)Īt EnableSimutaneously.OnDisable () in :0 TimerManager: Created a new service in the scene. An instance of TimerServiceLocator is needed in the scene, so '(Global Singleton) TimerServiceLocator (UnityEngine.GameObject)' was created with DontDestroyOnLoad. Unloading 6 Unused Serialized files (Serialized files now loaded: 0) (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/ Line: 35) An instance of is needed in the scene, so '(Resource Global Singleton) SoundPlayer(Clone) (UnityEngine.GameObject)' was loaded as a prefab with DontDestroyOnLoad.
![binaryformatter in unity for mac binaryformatter in unity for mac](https://cdn-ak.f.st-hatena.com/images/fotolife/k/kan_kikuchi/20170511/20170511082110.jpg)
Renderer: NVIDIA GeForce GTX 1070 Ti (ID=0x1b82)ĭ3D11 device created for Microsoft Media Foundation video decoding. GfxDevice: creating device client threaded=1 Discovering subsystems at path C:/Program Files (x86)/Steam/steamapps/common/A Short Hike/AShortHike_Data/UnitySubsystems Mono config path = 'C:/Program Files (x86)/Steam/steamapps/common/A Short Hike/MonoBleedingEdge/etc' Mono path = 'C:/Program Files (x86)/Steam/steamapps/common/A Short Hike/AShortHike_Data/Managed'