The Issue with (Fixed) Landscape-Orientation

Hello Everyone. I develop my Mobile App for landscape only (Fixed) Screen-Orientation, but for Some reason, it Auto-rotates even with the Next Properties, in build.settings

Build.settings:

settings = {
	orientation = {default = "landscapeLeft",
		supported = {"landscapeLeft", "landscapeRight"},
	},
},

I rewatched a lot of Topics, but it didn’t solved my Problem.
Is it Possible to make Fixed-Orientation (Landscape-Orientation) ? (Without Any Plugins)

I have an app with fixed landscape orientation, and my settings below work fine and only rotate the app to landscape left or landscape right. The only difference I see between yours and mine is the one extra comma I have after “landscapeLeft” in the second line. Not sure why that would make a difference, but try the below and see if it works.

orientation =
{
default = “landscapeLeft”,
supported = { “landscapeRight”, “landscapeLeft”,},
},

1 Like

@mikulskn, a trailing comma after the last element in a table is valid, but it works the same as not having one. :slight_smile:

@PaulDev, I don’t see anything wrong with the code and it should work as intended. So, when you say it auto-rotates, does it rotate to portrait mode?
With the given code it would auto-rotate landscape both ways, left and right.

1 Like

My App has the Introduce-Video, which Auto-rotates for Some reason. I tried run Game without Video, and It really worked, so it was the Reason of Video.

1 Like

I used (before) media.playVideo() function, to run Intro, so I replaced it to: native.newVideo() and it solved my Problem.

1 Like