Merge pull request #2304 from shino-a/fix/sample-file-util

Fix compile errors at build time
This commit is contained in:
ousttrue 2024-06-04 15:52:34 +09:00 committed by GitHub
commit b8e7fb6ed0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ namespace VRM.SimpleViewer
#elif UNITY_WEBGL
// Open WebGLFileDialog
// see: Assets\VRM_Samples\SimpleViewer\Plugins\OpenFile.jslib
WebGLFileDialog();
WebGLUtil.WebGLFileDialog();
// Control flow does not return here. return empty string with dummy
return "";
#elif UNITY_EDITOR
@ -19,8 +19,8 @@ namespace VRM.SimpleViewer
return UnityEditor.EditorUtility.OpenFilePanel(title, "", extensions[0]);
#else
// fall back constant path
Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
return Application.dataPath + "/default.vrm";
UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
return UnityEngine.Application.dataPath + "/default.vrm";
#endif
}
}

View File

@ -9,7 +9,7 @@ namespace VRM.SimpleViewer
#elif UNITY_WEBGL
// Open WebGLFileDialog
// see: Assets\VRM_Samples\SimpleViewer\Plugins\OpenFile.jslib
WebGLFileDialog();
WebGLUtil.WebGLFileDialog();
// Control flow does not return here. return empty string with dummy
return "";
#elif UNITY_EDITOR
@ -19,8 +19,8 @@ namespace VRM.SimpleViewer
return UnityEditor.EditorUtility.OpenFilePanel(title, "", extensions[0]);
#else
// fall back constant path
Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
return Application.dataPath + "/default.vrm";
UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
return UnityEngine.Application.dataPath + "/default.vrm";
#endif
}
}