JimmyCushnie / JECS

Jimmy's Epic Config System
Do What The F*ck You Want To Public License
154 stars 16 forks source link

Error when program is setting up wachter #18

Closed Vanderlolbroek closed 4 years ago

Vanderlolbroek commented 4 years ago

the saving system is working when I am playing the game in the unity editor. But when I build my game and launch it, I get an error when it tries to make a data file. I think it is the wachter it tries to setup

line of code for making datafile: static DataFile Config = new DataFile("ProgramConfig"); error:

Uploading Crash Report NotImplementedException: The method or operation is not implemented. at System.IO.FileSystemWatcher..ctor (System.String path, System.String filter) [0x00006] in :0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher..ctor(string,string) at SUCC.DataFileBase.SetupWatcher () [0x0000d] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\SUCC\SUCC\DataFiles\DataFileBase.cs:180 at SUCC.DataFileBase..ctor (System.String path, System.String defaultFile, System.Boolean autoReload) [0x000f8] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\SUCC\SUCC\DataFiles\DataFileBase.cs:41 at SUCC.DataFile..ctor (System.String path, SUCC.FileStyle style, System.String defaultFile, System.Boolean autoSave, System.Boolean autoReload) [0x0000b] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\SUCC\SUCC\DataFiles\DataFile.cs:39 at SUCC.DataFile..ctor (System.String path, System.String defaultFile, System.Boolean autoSave, System.Boolean autoReload) [0x00000] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\SUCC\SUCC\DataFiles\DataFile.cs:29 at Game.DataSystem..cctor () [0x00000] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\Scripts\SaveLoad\DataSystem.cs:8 Rethrow as TypeInitializationException: The type initializer for 'Game.DataSystem' threw an exception. at Game.SavingSystem.Start () [0x00022] in C:\Users\tfeij\Documents\Unity\The Kingdom\Assets\Scripts\SaveLoad\SavingSystem.cs:19

JimmyCushnie commented 4 years ago

Which version of Unity are you on, and which .NET runtime are you using? (Project Settings -> Player -> Configuration -> API Compatibility Level)

Vanderlolbroek commented 4 years ago

Which version of Unity are you on, and which .NET runtime are you using? (Project Settings -> Player -> Configuration -> API Compatibility Level)

I am using unity 2019.2.9f1 and .net standard 2.0

JimmyCushnie commented 4 years ago

SUCC only supports .NET 4.x. Try switching to that and see if it fixes the issue.

JimmyCushnie commented 4 years ago

I just checked and this requirement wasn't already on the wiki. Sorry about that, I've added it.

Vanderlolbroek commented 4 years ago

It worked! thanks for the help (and making this saving system :D)

JimmyCushnie commented 4 years ago

Cheers, I hope it is useful to you :)

If you release a project that uses SUCC, be sure to add it to the wiki.