Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

ipad stumped

Discussion in 'iOS and tvOS' started by xixac, Apr 30, 2010.

  1. xixac

    xixac

    Joined:
    Mar 27, 2009
    Posts:
    59
    I am having 2 issues I can't seem to figure out when trying to get a project converted to the iPad. It would be really cool if someone could share some insights.

    1. The game is in horizontal mode. So to overcome the portrait only restriction I rotate the camera 270º. Works, but no matter what I try, I can't get guiTexts to appear in landscape format. I thought those are linked to the camera ...

    2. It seems that some have successfully used the simulator for testing iPad projects. That's great news - finally to have that possibility even if it is only for the iPad. All I get however are tons of warnings (mostly regarding ForeIncludes) no matter what configuration of the built project I use.

    TIA : )
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can't rotate GUITexts or GUITextures. However, you don't need to rotate the camera at all, just use iPhoneSettings.screenOrientation.

    --Eric
     
  3. xixac

    xixac

    Joined:
    Mar 27, 2009
    Posts:
    59
    Yeah - i know you can't rotate guitexts - that's why I tried rotating the camera instead of using the script solution. Unfortunately the game uses timers, scores etc with guiTexts, guiTextures. I misunderstood the docs I guess:
    "A GUI Layer Component is attached to a Camera to enable rendering of 2D GUIs."

    Thanks anyway - looks like anything w/ guiTexts will have to wait for some future version of the editor.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Rotating the camera or rotating GUITexts would still involve rotating them either way, which can't be done.

    No...you seem to have missed my second sentence: "However, you don't need to rotate the camera at all, just use iPhoneSettings.screenOrientation."

    --Eric
     
  5. xixac

    xixac

    Joined:
    Mar 27, 2009
    Posts:
    59
    @Eric

    Thanks so much ; ) I had tried iPhoneSettings.screenOrientation and kinda given up, but after your post I re-examined my implementation and was able to fix it. Looks like this might become a valid iPad project after all - thanks to you ; )