Adding support for editor preview on non-windows platforms

- forgot Net4.cs
This commit is contained in:
sator 2020-02-17 14:08:06 +09:00
parent 74006824f8
commit 6d7314e14e

View File

@ -96,6 +96,8 @@ namespace VRM.Samples
{
#if UNITY_STANDALONE_WIN
var path = FileDialogForWindows.FileDialog("open VRM", ".vrm");
#elif UNITY_EDITOR
var path = UnityEditor.EditorUtility.OpenFilePanel("Open VRM", "", "vrm");
#else
var path = Application.dataPath + "/default.vrm";
#endif
@ -134,6 +136,12 @@ namespace VRM.Samples
{
LoadBvh(path);
}
#elif UNITY_EDITOR
var path = UnityEditor.EditorUtility.OpenFilePanel("Open BVH", "", "bvh");
if (!string.IsNullOrEmpty(path))
{
LoadBvh(path);
}
#else
LoadBvh(Application.dataPath + "/default.bvh");
#endif