Skip to content

Instantly share code, notes, and snippets.

@z3t0
Last active July 3, 2016 23:12
Show Gist options
  • Save z3t0/b7744fe992bd68f0062b374403567fef to your computer and use it in GitHub Desktop.
Save z3t0/b7744fe992bd68f0062b374403567fef to your computer and use it in GitHub Desktop.
void LoadMod(string mpath, string json) {
Debug.Log("Trying to load mod at '" + mpath + "'");
// Load JSON
ReadTextFile reader = new ReadTextFile();
string jsonSource = reader.Read(json);
Debug.Log(jsonSource);
string ax = JsonConvert.DeserializeObject<string>(jsonSource);
string mname;
string mdescription;
float mversion;
}
{
"Name" : "test mod",
"Version" : 1.0,
"Description" : "test mod for making sure mod loading works"
}
UnityEngine.Debug:Log(Object)
ModLoader:LoadMod(String, String) (at Assets/Scripts/ModLoader.cs:46)
ModLoader:CheckForMods() (at Assets/Scripts/ModLoader.cs:25)
ModHandling:Start() (at Assets/Scripts/ModHandling.cs:10)
{
"Name" : "test mod",
"Version" : 1.0,
"Description" : "test mod for making sure mod loading works"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment