Adding support for editor preview on non-windows platforms

This commit is contained in:
sator
2020-02-17 00:17:40 +09:00
parent ce1c6b4646
commit 74006824f8
3 changed files with 14 additions and 0 deletions

View File

@@ -259,6 +259,8 @@ namespace VRM.Samples
{
#if UNITY_STANDALONE_WIN
var path = FileDialogForWindows.FileDialog("open VRM", "vrm", "glb", "bvh");
#elif UNITY_EDITOR
var path = UnityEditor.EditorUtility.OpenFilePanel("Open VRM", "", "vrm");
#else
var path = Application.dataPath + "/default.vrm";
#endif