So after you have built the project, we need to fulfil the Contract we have created using the platform specific elements, for example:įigure 3: Windows 10 Interop implementation Once we have the behaviors we want in our game, we apply this to our project on the platform. This pattern affords a couple of benefits, most notably we know exactly what data we need from the platform and what actions we can perform all in one place (defined as a Contract between Unity and the platforms it’s deployed on), regardless of which script or scene uses them. Any data that your Unity project needs from Windows, it will get from this Interop class and any action that needs to be kicked off on the Windows platform will be performed by the Interop class, as shown here:įigure 2: Unity Interop interface definition In Unity we need to declare an Interop class to manage the boundary between Unity and the Windows UWP platform. Here’s what the layout of the full implementation looks like:įigure 1: Unity to Windows Interop architecture NET based we don’t need to build a plugin to do it (as is required for other platforms such as Android or iOS), we simply need to build an interop bridge between Unity and the UWP platform to give bidirectional access to all of these (and any other) capabilities we need. With the introduction of Windows 10 / UWP support we can make full use of these platform features, however, because Unity doesn’t have native support for speech or Cortana, we need to build our own bridge between the two platforms. The sample project built using Unity version 5.3 accompanying this post can be found here: This article is all new and improved, updated for Windows 10 and a few extra bells and whistles. I wrote an original article for implementing Cortana and Unity with Windows Phone 8.1 which you can read here ( ). There’s a lot more, but this is the crux of what article is going to cover. Integrate with the notification center for alerts and notices.Voice commands, allowing you to perform actions and start your game using voice.Robust voice-to-text or voice recognition system.A full text to speech system, complete with custom grammar.Using the power of Cortana, we can bring the full power of speech to our games, providing such features as: With Windows 10, Cortana has been released from the confines of the Windows Phone platform to all UWP (Universal) projects, putting our sultry temptress in the hands of all consumers whether they use a phone, desktop or tablet, even on an Xbox One in the future.Ĭortana gives us the best personal assistant money can buy, but the system also offers a very extensive speech system that is available to us humble developers. It’s certainly a missed opportunity for games and applications where a little human interaction could do with a boost to make it stand out. Sure, you have recorded audio for NPCs and a few non-silent protagonists, but it is very rare for the player to interact with speech themselves. True speech interaction is something we do not see very often in gaming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |