WatchKit & Unity

WatchKit & Unity 5 proof of concept prototype:

Requirements:

  WatchKitUnity.unitypackage (11.5 KiB, 816 hits)

Steps:

46,213 total views, 53 views today

8 Responses

  1. Nikos Chagialas

    Update:

    I initially had exported the WatchKitUnity.unitypackage from Unity 5.0.1 so when imported in an earlier version of Unity the prefab was corrupted. This is fixed now and the package has been exported from an earlier version of Unity 4.x. Any problems please let me know

  2. Jackson

    Great tutorial, and easy to use plug-in. Got it working with a physical watch using Unity 5, though did get caught up for a bit when I misspelled a group bundle ID haha. Keep up the good work.

  3. tim32

    How get example project with this game?

    • Nikos Chagialas

      Hi tim32, I will provide the example project soon.

  4. Matt

    Hi,

    Great article. I am trying to get this to install but its not installing. Using Unity 4.6.0 or similar, I had a question on the unity package you provided. It contains the source code to MMWormhole is that source supposed to be part of the iOS Unity target OR is it supposed to in the WatchKit Code Portion, or both?

    As the package stands its in the Plugins/iOS folder so it gets built automatically to the Unity iPhone Target. I didn’t know if you just provided the files in the package or if that’s the correct target.

    Thanks in advanced. Was just confused on.

    17. Copy MMWormhole files (MMWormhole.h & MMWormhole.m) over to the WatchApp folder.

    I was sure if “Copy” meant copy from outside the project MMWormhole like their repo, or if it meant in addition copy what’s in the unity package or if it meant move the files from the Unity iPhone target to the WatchKit App target.

    Please advise.

    • Nikos Chagialas

      Hi Matt, thanks for your comment

      The MMWormhole library is used in both the Unity iOS plugin in the UnityPackage and the WatchApp, so the 2 x MMWormhole files (MMWormhole.h and MMWormhole.m) need to be present in both places.

      In step 17 you need to copy the 2 x MMWormhole files (MMWormhole.h and MMWormhole.m) either from the UnityPackage I provided or MMWormhole’s github at https://github.com/mutualmobile/MMWormhole/tree/master/Source and paste them in WatchApp’s folder in Xcode, so the WatchApp can access the MMWormhole library.

      I have clarified this in the main post now

      Please let me know if that helped

      • Matt

        Thanks this worked. I took a bit of tinkering to get messages going back and forth because step 18 was vague in a way but I finally got it to work.

        I am using Unity 4.6.4p4. I recommend using this if you are doing Unity 4.6.

        The thing that took the longest for me was getting on the device (Apple Watch). You can build a 32 bit “Simulator SDK” build for testing, but if you want to do a “Device SDK” build if you have an Apple watch from my understanding is it HAS to be a 64bit compatible build.

        The time consuming part was making my build 64bit compatible but once it was I integrated the package and got everything setup and running in 15 mins. I was able to successfully send data back and forth from the Watch App to the Unity Client on the phone.

        The simulator is great for testing, but this is even more amazing on the device!

        Thanks again for the tutorial, you saved me a lot of time.

  5. Dilmer Valecillos

    I appreciate your feedback here and with your article I was able to get the newest version of iOS to compile with Unity3d 5.6 as well as some new tweaks I had to make to make it work. If you are ok with me posting the steps, I’ve documented the entire process in my game blog:

    http://www.dilmergames.com/blog/2017/03/29/how-create-watchos-companion-your-unity3d-game/

    If anyone has any questions feel free to let me know.

Leave a Reply to Jackson