Ejemplo n.º 1
0
        public void ExportMapDescription()
        {
            var payload    = InitializePayload();
            var inputSetup = GetInputTask();

            var pipelineItems = new List <IPipelineTask <DungeonGeneratorPayload> > {
                inputSetup
            };

            PipelineRunner.Run(pipelineItems, payload);

            var levelDescription = payload.LevelDescription.GetLevelDescription();

            levelDescription.Name = "Test";
            var wrappedLevelDescription = GetWrappedLevelDescription(levelDescription);

            var filename = "exportedMapDescription.json";

            wrappedLevelDescription.SaveToJson(filename);
            Debug.Log($"Map description exported to {filename}");
        }