mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-11 05:19:14 -05:00
messageTarget and messageName
This commit is contained in:
@@ -139,7 +139,7 @@ namespace UniVRM10.VRM10Viewer
|
||||
[DllImport("__Internal")]
|
||||
public static extern void WebGL_VRM10_VRM10Viewer_FileDialog(string target, string message);
|
||||
|
||||
string FileDialog(string callbackObject, string callbackMethod)
|
||||
string FileDialog(string messageTarget, string messageName)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return UnityEditor.EditorUtility.OpenFilePanel("Open VRM", "", "vrm,glb,gltf,zip");
|
||||
@@ -148,7 +148,7 @@ namespace UniVRM10.VRM10Viewer
|
||||
#elif UNITY_WEBGL
|
||||
// Open WebGL_VRM10_VRM10Viewer_FileDialog
|
||||
// see: Assets\VRM10_Samples\VRM10Viewer\Plugins\WebGL_VRM10_VRM10Viewer.jslib
|
||||
WebGL_VRM10_VRM10Viewer_FileDialog(callbackObject, callbackMethod);
|
||||
WebGL_VRM10_VRM10Viewer_FileDialog(messageTarget, messageName);
|
||||
// Control flow does not return here. return empty string with dummy
|
||||
return null;
|
||||
#else
|
||||
@@ -163,9 +163,9 @@ namespace UniVRM10.VRM10Viewer
|
||||
var _ = LoadModelBytes("WebGL.vrm", www.downloadHandler.data, opts);
|
||||
}
|
||||
|
||||
public void OnOpenModelClicked(LoadOptions opts, string callbackObject, string callbackMethod)
|
||||
public void OnOpenModelClicked(LoadOptions opts, string messageTarget, string messageName)
|
||||
{
|
||||
var path = FileDialog(callbackObject, callbackMethod);
|
||||
var path = FileDialog(messageTarget, messageName);
|
||||
_ = LoadModelPath(path, opts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user