unclebob Posted July 3, 2015 Author Share Posted July 3, 2015 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
Simon.Anderson Posted July 3, 2015 Share Posted July 3, 2015 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
unclebob Posted July 3, 2015 Author Share Posted July 3, 2015 No, sockets are used for networking. All you need to do is just implement your custom WinformsHost with Unigine inside. Link to comment
Simon.Anderson Posted July 3, 2015 Share Posted July 3, 2015 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
unclebob Posted July 6, 2015 Author Share Posted July 6, 2015 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
Recommended Posts