public WorldSource() { BlueprintReader = new BlueprintResource(); BlueprintReader.OverrideVersionMap(this.versionMap, this.componentMap); WorldDefinitionReader = new WorldDefinitionResource(); WorldDefinitionReader.OverrideVersionMap(this.versionMap, this.componentMap); ClusterReader = new ClusterDefinitionResource(); ClusterReader.OverrideVersionMap(this.versionMap, this.componentMap); }
protected override void CustomFileExport(ExportParameters exportParameters) { var worldDefinition = WorldDefinitionResource.Create(); worldDefinition.InitFromRecord(exportParameters.BagStream, exportParameters.FileRecord); var outputPath = Path.GetFullPath(Path.Combine(exportParameters.OutputDirectory, exportParameters.FileRecord.Name + exportParameters.FileExtension)); var text = JsonConvert.SerializeObject(worldDefinition, Formatting.Indented); File.WriteAllText(outputPath, text); exportParameters.OnProgressReport?.Invoke(exportParameters.FileRecord, 0); }