Exemplo n.º 1
0
 static string GetPath(string filename)
 {
     if (saver == null)
     {
         saver = GameObject.FindObjectOfType <CustomLevelSaver>();
     }
     return(saver.OutputDirectory + "/" + saver.LevelName + "/" + filename);
 }
Exemplo n.º 2
0
 public static void ExportPlaceables()
 {
     saver = GameObject.FindObjectOfType <CustomLevelSaver>();
     if (saver == null)
     {
         Debug.LogError("Save definition could not be found");
     }
     else
     {
         _ExportPlaceables();
     }
 }
Exemplo n.º 3
0
        public static void ExportGLTF()
        {
            saver = GameObject.FindObjectOfType <CustomLevelSaver>();

            var exportOptions = new ExportOptions {
                TexturePathRetriever = RetrieveTexturePath
            };

            var exporter = new GLTFSceneExporter(saver.GLTFRoot, exportOptions);

            var path = GetPath("");

            if (!string.IsNullOrEmpty(path))
            {
                exporter.SaveGLTFandBin(path, saver.LevelName);
            }
        }