Merge pull request #1893 from ousttrue/fix/add_if_unity_editor

ビルドエラーを修正
This commit is contained in:
ousttrue
2022-10-27 16:41:33 +09:00
committed by GitHub

View File

@@ -24,7 +24,12 @@ namespace UniVRM10.Sample
GUILayout.Label("ライセンスを変更する権利のある vrm-0.x モデルをロードしてください");
if (GUILayout.Button("migrate"))
{
#if UNITY_EDITOR
var path = UnityEditor.EditorUtility.OpenFilePanel("load vrm-0.x", null, "vrm");
#else
Debug.LogWarning("no OpenFilePanel for runtime");
string path = null;
#endif
if (string.IsNullOrEmpty(path))
{
return;