Unity-ZeroMQ-Example
Unity-ZeroMQ-Example copied to clipboard
Where do you learn about unity ZeroMQ?
There is learning for ZeroMQ Python and C# but they are not specific to unity and I saw you use AsyncIO as well which is confusing for me because I'm not good at network programming. If I want to build a request-reply model but I want python to be the server instead of C#, how do I accomplish this task?
Python = server
C# = client
The idea is, I want to make some computation in python and return value to caller from C#. E.g. run machine learning model on an image sent by unity webcam and return the prediction to unity. The time it takes to run the computation might be long so unity should not wait for python to finish. Python have to callback unity later. Please give materials for me to learn about ZeroMQ request-reply model in unity. Any suggestions are appreciated!
I suggest you learn the concept of ZeroMQ from here: Learn ZeroMQ
Then, you find the corresponding functionality in NetMQ, and implemented. Note that Unity engine works very badly with NetMQ, so you may need to watch out a few tricks that I'm doing here, such as open a new thread, AsyncIO.ForceDotNet.Force();
, and NetMQConfig.Cleanup();
. Even then, there is not guarantee that it will work.
Can you clarify what those 2 commands exactly do?