private static void LoadContentManifest() { ContentManifest newManifest = JsonIO.Load <ContentManifest>(PathUtils.GetLocalPath(content_path, "content.json")); bool reloading_manifest = false; if (manifest != null) { reloading_manifest = true; StageNewResources(newManifest); } manifest = newManifest; FillContentMapsFromCurrentManifest(); if (reloading_manifest) { foreach (var new_res_id in newResourcesToAdd) { ConsoleUtils.ShowInfo($"Found new resource to Add: {new_res_id}"); UpdateResourceOnPak(new_res_id); } newResourcesToAdd.Clear(); } }
public static void Build(string project_root_path) { var content_path = PathUtils.GetLocalPath(project_root_path, Constants.CONTENT_FOLDER); if (!Directory.Exists(content_path)) { throw new Exception("Invalid Project : Missing Content Folder"); } ContentManifest manifest; var manifest_path = PathUtils.GetLocalPath(content_path, "content.json"); if (!File.Exists(manifest_path)) { throw new Exception("Invalid Project : Missing content.json"); } manifest = JsonIO.Load <ContentManifest>(manifest_path); var root_path = Path.GetDirectoryName(manifest_path); var paks = BuildPaks(root_path, manifest); foreach (var pak in paks) { pak.SaveToDisk(root_path); } }
public ProfileData LoadLastUsedProfile() { return((ProfileData)JsonIO.Load(SavePath)); }
public ProfileData LoadProfile(string profileName) { ChangeFileName(profileName); return((ProfileData)JsonIO.Load(SavePath)); }