Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iPhone UI elements

Discussion in 'iOS and tvOS' started by Arges, Nov 8, 2008.

  1. Arges

    Arges

    Joined:
    Oct 5, 2008
    Posts:
    359
    Hi,

    I have a quick question for those of you already creating iPhone games with Unity: how easy is it to retain the iPhone UI look and feel? There are a lot of little details that give off an application's "iPhone-ness", like tab pages sliding left and right out of the screen, or being able to show a standard iPhone OS page with sliders for options.

    How easy is it to retain these sort of UI elements in an Unity application, while still using Unity for scene and game code? Is one limited only to the Unity GUI?

    Thanks!
     
  2. Grind

    Grind

    Joined:
    Oct 22, 2008
    Posts:
    21
    Coming from iPhone development, I think that the way Unity creates the xcode project, you're not supposed to do any development on that side (yet).

    Still, I have managed to refactor my app into using a TableView with NavigationController stuff. I also send CoreLocation and some config data to the Unity side, I have some iPhone GUI elements and would probably be able to utilize the keyboard if necessary. All this is still an "assault" on the exported project and I have to insert my changes into the project after each change and build in Unity.

    I am hoping for supported ways of doing all this, also I have not found a way to communicate data back from Unity (no need for it yet though).
     
  3. kusako

    kusako

    Joined:
    Jun 30, 2008
    Posts:
    33
    +1 on a real interface between Cocoa and Unity code.
    How did you pass Data to Unity? Saving a file on the iPhone and reading it from Unity afterwards, or did you find a better way?
    Also, did you find a way to go back from Unity to Cocoa world?

    -markus
     
  4. Grind

    Grind

    Joined:
    Oct 22, 2008
    Posts:
    21
    I'm using the "accelerometer-channel", no need for the timestamp in my app so I use that parameter as a message type id. Reading the "timestamp" in Unity, I'm able to tell the difference between acceleration, location, etc. There's have room for three floats so it's just a matter of setting up a protocol around that packet format limitation :)

    I didn't think of using a file, maybe that would be a good solution for some data as well. Worth looking in to.

    The app can move back from Unity to Cocoa, but trying to enter Unity again will result in a crash. I haven't pursued the problem, but probably there's some clean-up of Unity stuff that's missing.