Support export VideoClip

This commit is contained in:
Perfare
2017-11-10 22:00:09 +08:00
parent 38f1f068d2
commit 96c7aaabb0
5 changed files with 128 additions and 4 deletions

View File

@ -312,6 +312,12 @@ namespace Unity_Studio
ab = new AssetBundle(asset);
break;
}
case 329: //VideoClip
{
var m_VideoClip = new VideoClip(asset, false);
exportable = true;
break;
}
case 21: //Material
case 74: //AnimationClip
case 90: //Avatar
@ -1809,6 +1815,14 @@ namespace Unity_Studio
File.WriteAllText(exportPath, sb.ToString());
}
public static void ExportVideo(VideoClip m_VideoClip, string exportFilename)
{
if (m_VideoClip.m_VideoData != null)
{
File.WriteAllBytes(exportFilename, m_VideoClip.m_VideoData);
}
}
public static bool ExportFileExists(string filename)
{
if (File.Exists(filename))