I am trying to make an online game that also uses realworld data from an external (not unity) source. The external data server is using DDE links to update data in real time. I can write a CSharp program in visual studio that connects to the data server correctly, however I am having trouble porting that CSharp code to work inside of unity as a script.
The code requires an additional library NDde which can be found here https://ndde.codeplex.com/
. It is my understanding that moving the ndde dll into the unity project is sufficient to then reference it from my own scripts. All scripts compile without errors in unity.
**In visual studio:** the code runs continuously and when a variable is changed on the external server an EventHandler is used to then execute other functions. This works perfectly.
**In Unity:** since the code should be constantly running I have tried putting it in Update(). However when I try and run the game the editor freezes and must be force closed from the task manager. I have also tried using a co-routine but it gives the same result.
Any ideas why unity is freezing and how to fix it? Is something like this possible inside of unity only? Or does my code need to be in a separate csharp application that then sends its data to unity in some other way?
Thanks
↧