Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by defcon2006 · Jul 18, 2011 at 01:51 AM · windowsmessaging

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!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BinaryCaveman · Aug 25, 2011 at 03:23 AM 0
Share

You may also need a plugin (dll) to utilize something like that, which only Unity Pro supports.

avatar image Waz · Aug 25, 2011 at 03:30 AM 0
Share

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.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Waz · Aug 25, 2011 at 03:33 AM

You could use a local server socket instead of Windows messages.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image defcon2006 · Aug 25, 2011 at 10:35 AM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges