Jump to content

.NET Integration Sample


photo

Recommended Posts

Hi Simon,

 

You're right, hosting Unigine inside WinformsHost is a good idea for start. However, it's not ideal because it has its own input handling apart from WPF input.

Link to comment

So we have to use sockets to communicate with unigine correct?

 

Well it's not ideal but I can't see any other way to combine WPF and unigine.  If you have any ideas I'm all ears.

Link to comment

But how does unigine then capture mouse clicks on wpf buttons etc.?  There's no way to tell unigine when a WPF/winforms button has been clicked (other than interprocess communication) right?

Link to comment

First of all, here's a good article explaining differences between WPF and Winforms as well as integration & mixing guide: https://www.simple-talk.com/dotnet/.net-framework/mixing-wpf-and-winforms.

 

Once you'll be familiar with that knowledge it's just a matter of using our engine (or wrapping App class methods) inside WindowsFormsHost and send callbacks back to engine. For example, you can call App.setKeyState or App.setMouseButton when WPF button was clicked.

Link to comment
×
×
  • Create New...