C# help connecting Spout to UWP app using IL2CPP Build

I’ve got a new challenge, in which I’ve inherited code from a standalone Windows build, which receives video from an external application, and needs to be ported as a Universal Windows App to the Windows Store via Unity…

So, it works absolutely fine in Standalone build, but after building (testing) the UWP version, the video isn’t piped from the external, and debug version of the UWP app shows:
Code (CSharp):

NotsupportedException: To marshal a managed method, please add an attribute named “MonoPInvokeCallback” to the method definition.
The method we’re attempting to marshal is: Spout.Spout.SenderUpdate

Spout.Spout._startReceiving()(At ):0)
Spout.Spout.OnEnable()(at ):0)

So, I have put in this code (excerpt: )

Code (CSharp):

private static void _startReceiving()

and have also tried: [MonoPInvokeCallback(typeof(Spout.SpoutSenderStartedDelegate))] instead of just the “(Spout)”…

but the same error appears.

I don’t understand what “typeof” to specify, since “SenderUpdate” doesn’t seem to exist in the Spout resources… and cannot figure out what method I need to direct traffic to…

Any thoughts were I can look/try to get this pointer rightly directing method traffic?

Hi Jtok4j

“SenderUpdate” isn’t a Spout function so I don’t know where “Spout.Spout.SenderUpdate” comes from.

There is an “UpdateSender” function in SpoutSenderNames.cpp but I understand that your application is a receiver.

I have not had any experience with IL2CPP so it’s hard to suggest a solution. Perhaps it might help to look at the Unity Spout plugin by Keijiro Takahashi and his other repositories.