Landscape vs Portrait

I’ve been looking for this for 4 days, where is the setting to default the build as a landscape build vs a portrait build? Any ETA on real documentation for the iPhone version?

function Start () {
   // set screen orientation and sleep mode
   iPhoneSettings.verticalOrientation = false;
   iPhoneSettings.screenCanDarken = false;
}

Thanks, where do I get documentation that explains these more of the items?

Go to your Classes Index:
file:///Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/ScriptReference/10_reference.Classes.html

Search “iPhone”.

That’s what I did. It worked out rather well. Documentation could be more robust, but this one was pretty obvious, I thought.

I only have 2 entries for iPhone in my reference. That is for multi-touch and accelerometer. both are exteremly vague, just says it can handle them. I am missing something obviously, and that link doesn’t work on my iMac where I have Unity iPhone installed, resource not found :frowning:

Have you installed iPhone Unity version 1.0.1?

Yep, that was the version I was giving for the trial that I registered.

Then something has gone awry as you should have more entries than just the two you cited.

I’ll try to re-install it and see if the docs change any. I really need some detailed docs at this point, running across a few issues on some other applications and not sure if it has to do with using my own threading model or not. I think I will rewrite them in pure JS and get away from CS

Ok, got the script… and then what? How do you execute a script at the beginning? So far all the scripts I did had to be dropped on an asset but what about this one?

Thanks,

Robert

There is an example script that sets the needed properties on Start above, just copy/paste and attach that to a game object in your scene on content launch. Done.

thanks for this!