You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Deleting a save game in a standalone build doesn't work because Player.log is currently being used by a process. I've ended all processes except the game but it doesn't work. I tried restarting my computer as well
To Reproduce
Steps to reproduce the behavior:
Calling a function that calls SaveGame.Clear() or SaveGame.DeleteAll() prints this error.
Expected behavior
It should clear all saved data.
Screenshots
After clicking new game, this error appears
Error message:
IOException: The process cannot access the file 'C:\Users\hi\AppData\LocalLow\company\game name\Player.log' because it is being used by another process.
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x001d7] in <2b3a3162be434770b7a4fac8b896e90c>:0
at System.IO.FileInfo.Delete () [0x00038] in <2b3a3162be434770b7a4fac8b896e90c>:0
at BayatGames.SaveGameFree.SaveGame.DeleteAll (BayatGames.SaveGameFree.SaveGamePath path) [0x00037] in <81391f8c6baa4ae7b039f97e592f680c>:0
at BayatGames.SaveGameFree.SaveGame.Clear () [0x00005] in <81391f8c6baa4ae7b039f97e592f680c>:0
at QLE.NormalPanel.ClearSavedData () [0x00001] in E:\projects\game name\Assets\Scripts\UI\Main Menu\NormalPanel.cs:50
at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in C:\buildslave\unity\build\Runtime\Export\UnityEvent\UnityEvent.cs:180
at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in C:\buildslave\unity\build\Runtime\Export\UnityEvent\UnityEvent\UnityEvent_0.cs:58
at UnityEngine.UI.Button.Press () [0x00027] in E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Button.cs:68
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00010] in E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Button.cs:110
at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00001] in E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\ExecuteEvents.cs:50
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00074] in E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\ExecuteEvents.cs:262
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1) (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\ExecuteEvents.cs:266)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject) (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:187)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData) (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:641)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32) (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:547)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent() (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:527)
UnityEngine.EventSystems.StandaloneInputModule:Process() (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\InputModules\StandaloneInputModule.cs:282)
UnityEngine.EventSystems.EventSystem:Update() (at E:\Coding\Unity-2019\2020.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\EventSystem.cs:385)
Desktop:
OS: Windows 10
Version 10.0.19042
the code in the button is just
btw, the scriptable object code does not do any calls in SaveGame
The text was updated successfully, but these errors were encountered:
Fixes#9Fixes#11 and #16 by adding IgnoredFIles and IgnoredDirectories that allow you to add any file or directory to be excluded from SaveGame API, the default values are "Player.log" and "output_log.txt" for files and "Analytics" for directories
IOSupported method is now deprecated
Added UsePlayerPrefs option to allow the user to specify whether to use PlayerPrefs as storage or not (otherwise it uses file storage)
Added OnSaving and OnLoading events that occurs at the start of the processes
Describe the bug
Deleting a save game in a standalone build doesn't work because Player.log is currently being used by a process. I've ended all processes except the game but it doesn't work. I tried restarting my computer as well
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should clear all saved data.
Screenshots
After clicking new game, this error appears
Error message:
Desktop:
the code in the button is just
btw, the scriptable object code does not do any calls in SaveGame
The text was updated successfully, but these errors were encountered: