Created
April 3, 2014 14:54
-
-
Save GRGSIBERIA/9955863 to your computer and use it in GitHub Desktop.
MMD for UnityでVMDファイルの書き出しをする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.IO; | |
public class SimpleMorphing : MonoBehaviour | |
{ | |
public GameObject pmx_model; | |
void ExportFormat() | |
{ | |
VMDFormatter formatter = new VMDFormatter(pmx_model); | |
formatter.InsertMorph(0); | |
VMDExporter exporter = new VMDExporter(formatter.Format); | |
var vmd_bytes = exporter.ExportMorph(); | |
var file = File.OpenWrite("C:/test.vmd"); | |
var bin = new BinaryWriter(file); | |
bin.Write(vmd_bytes); | |
bin.Flush(); | |
bin.Close(); | |
file.Close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment