我开发了一个 Winform 软件,它有一个 UnityWebplayer 模块。首先我尝试通过套接字在它们之间进行通信,但是,我搜索了一个可以方便地为我做到这一点的api :
axUnityWebPlayer1.SendMessage( "Sphere", "Down", null );//called in winform
只需使用上面的代码片段,我们就可以将消息从 winform 发送到其嵌入的 unitywebplayer 模块。
axUnityWebPlayer1_OnExternalCall_1(object sender,AxUnityWebPlayerAXLib._DUnityWebPlayerAXEvents_OnExternalCallEvent e)
通过使用上面的代码片段,我们可以在 winform 中接收来自 unitywebplayer 的消息。
我很好奇api背后的机制。它是否将unity3d导出的文件“* .unity3d”视为类似.dll
,这使得通信成为函数调用,并在运行时加载它?