- Home /
Windows Messaging
I was wondering whether there is anyway to implement Windows Messaging so that they can be received during game play. I'm wanting to send a message from another program to indicate when to start a level and after the level is done I want to send back a message to that same program to indicate the level is over. I've looked at using wndproc for receiving messages, however, as far as I know you need a form to be able to use these and that means inheriting your code from something other than Monobehaviour.
Thanks!
You may also need a plugin (dll) to utilize something like that, which only Unity Pro supports.
What's the problem with inheriting from something other than $$anonymous$$onoBehaviour? Ah, you mean "you have to inherit from System.Windows.Forms" - yeah, you can't do that with Unity/$$anonymous$$ono.
Answer by Waz · Aug 25, 2011 at 03:33 AM
You could use a local server socket instead of Windows messages.
I had looked into using sockets ins$$anonymous$$d of Window $$anonymous$$essages except they had already implemented the other program using Windows $$anonymous$$essaging. We never found a way to get the Windows $$anonymous$$essaging working between the two programs so we ended up writing to a file. Although this isn't the best way of doing things, it was the simplest and users weren't allowed access to these files to tamper with them.
Had I been able to implement both programs I would have probably gone with the socket route though.
Your answer
Follow this Question
Related Questions
The application icon is always 32x32 - why? 1 Answer
Unity editor stuck/halted on Console (Error) on Windows 7 2 Answers
Compile a game for iOS, Mac, PC - how much adjustment? 2 Answers
Unity Window Locked in Place 1 Answer
iOS development on PC 1 Answer