I’m working on a Web Player application with socket networking. Apparently Unity won’t load most of System.IO on Web Player, which makes socket IO much harder.
My networking code is in a C# Managed DLL compiled against .NET 3.5 client profile.
The problem I’m running into now is that after connecting to the server and sending it a message, my program won’t receive a message back. Looking at the logs, I see the following repeatedly:
Could not load type 'System.IO.InvalidDataException' from assembly 'MyAssembly'.
But, it won’t give me a stack trace. And since it won’t load the exception, I have no idea what the problem actually is.
The worst part, though, is that this code works perfectly every time in the editor, but fails with that unloadable exception every time in any browser. Also, this same netcode has been used in a .NET WinForms application for over two years now with the same server, so it’s well tested outside of Unity, but it’s also very complex, so I can’t just guess and check or I’ll be at it for a month.
I’ve also tried adding extra try/catch blocks, but since it won’t load the exception, it can’t catch it.
So, my question is, how can I debug this? I’m hoping someone has an outside-of-the-box idea, because I’ve exhausted my store.