Is "verticalOrientation" broken in 2.2/Unity iPhon

// set up default setting for iPhone
static var verticalOrientation;
static var screenCanDarken;

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

Set on an empty GO that doesn’t get destroyed in the first loaded scene, that bit of code should set the game’s orientation to horizontal, but it keeps coming up vertical when built in the latest version of Xcode set to OS 2.2.

IE, the game builds in Xcode fine, displays the vertical Made with Unity screen (indie license), but then remains in vertical mode even as shown …

Is anyone else experiencing this?

You need to do it more like this:

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

That help?

Nope. :frowning: Still showing as above in the Xcode build.

That’s weird. I’m using the latest versions of everything, and I have not had this problem. I’m willing to test out part of the project if you’re interested.

I’m am PMing you with a download link (it’s just the framework exported as a package and under 1MB) and am also on iChat right now (WidgetMonkeys). Thanks!

Solved. Jessy got it in the end.

The problem for me is the .js file I had attached to the GameManager was named “iPhoneSettings.js”

A no-no apparently.