예제 #1
0
 private void SetDefaults()
 {
     arguments = new SnapshotGenerator.Arguments
     {
         OutputPath = Path.GetFullPath(
             Path.Combine(
                 Application.dataPath,
                 "..",
                 "..",
                 "..",
                 "snapshots",
                 "default.snapshot"))
     };
 }
예제 #2
0
        void GenerateSnapshot()
        {
            if (scene == null)
            {
                return;
            }

            var arguments = new SnapshotGenerator.Arguments
            {
                OutputPath = SnapshotGenerator.GetDefaultSnapshotPath(outputPath)
            };

            SnapshotGenerator.Generate(arguments, scene.WorldSize, scene.GetHeight, scene.Units, scene.Fields);
        }
        protected virtual void GenerateSnapshot()
        {
            if (scene == null)
            {
                return;
            }

            var arguments = new SnapshotGenerator.Arguments
            {
                OutputPath = SnapshotGenerator.GetSnapshotPath(outputPath)
            };

            var snapshot = scene.GenerateSnapshot();

            Debug.Log($"Writing snapshot to: {outputPath}");
            snapshot.WriteToFile(arguments.OutputPath);
        }