keijiro / KlakSpout

Spout plugin for Unity
The Unlicense
651 stars 97 forks source link

UnityPluginLoad 插件注册 #109

Closed GongKuiJun closed 1 month ago

GongKuiJun commented 2 months ago

When I use the plug-in, I don't have automatic registration, I hope to register manually by myself: But there are no other manual registration methods

keijiro commented 2 months ago

Sorry, I can't understand what you're trying to ask. Could you rephrase it?

GongKuiJun commented 1 month ago

Hello, thank you for your reply. I use "https://github.com/Lunfeng/SharpMonoInjector" to inject a script into the main camera of the published program, and copy "KlakSpout.dll" to the "_Data\Plugins\x86_64" directory Now, I can find the spout sender through SpoutReceiver.exe, but there is no image rendering. The query data says that the UnityPluginLoad method is not called. Is there a way to manually call UnityPluginLoad in the mono code on the Windows platform, such as "https:/ /github.com/Unity-Technologies/NativeRenderingPlugin/blob/master/PluginSource/source/RenderingPlugin.cpp".

if UNITY_WEBGL

typedef void (UNITY_INTERFACE_API PluginLoadFunc)(IUnityInterfaces unityInterfaces); typedef void (UNITY_INTERFACE_API * PluginUnloadFunc)();

extern "C" void UnityRegisterRenderingPlugin(PluginLoadFunc loadPlugin, PluginUnloadFunc unloadPlugin);

extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API RegisterPlugin() { UnityRegisterRenderingPlugin(UnityPluginLoad, UnityPluginUnload); }

endif

keijiro commented 1 month ago

Your use case is not the intended use of Unity.

(Sorry but I'm an employee of Unity. I must strictly follow the terms of use.)