void OnExportClicked()
        {
            //#if UNITY_STANDALONE_WIN
#if false
            var path = FileDialogForWindows.SaveDialog("save VRM", Application.dataPath + "/export.vrm");
#else
            var path = Application.dataPath + "/../export.vrm";
#endif
            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            var vrm   = VRMExporter.Export(m_model);
            var bytes = vrm.ToGlbBytes();
            File.WriteAllBytes(path, bytes);
            Debug.LogFormat("export to {0}", path);
        }
Ejemplo n.º 2
0
        void OnExportClicked()
        {
            //#if UNITY_STANDALONE_WIN
#if false
            var path = FileDialogForWindows.SaveDialog("save VRM", Application.dataPath + "/export.vrm");
#else
            var path = Application.dataPath + "/../export.vrm";
#endif
            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            var vrm   = VRMExporter.Export(UniGLTF.MeshExportSettings.Default, m_model, (Texture _) => false, TextureExporter.GetTextureBytesWithMime);
            var bytes = vrm.ToGlbBytes();
            File.WriteAllBytes(path, bytes);
            Debug.LogFormat("export to {0}", path);
        }