I have problem with landscape orientation.
It’s got something to do with display profiles: http://www.defold.com/manuals/layouts/#_display_profiles
I haven’t done much with mobile development in Defold, but I think you can make the game run only in portrait mode by only providing a landscape display profile.
How to remove portrait mode? When i delete one of them console give me error.
Can you post a screenshot of your setup? Show your display profiles file and the console error messages.
I think it should be enough to change some settings under [display] in game.project to achieve this. Try to set the width and height to landscape settings (e.g. width=1280, height=720, key is that width > height) and then make sure “dynamic orientation” is unchecked (otherwise it will flip when the phone is flipped).
Yup, as Ragnar said, it should be enough to set the width and height in game.project to landscape mode and disable dynamic orientation.
Note the comment on dynamic orientation: “the development app does not currently respect this setting”
Thank you, now all going normal.
Aha! Where is that comment? Because that would be an incredibly useful tooltip in the Defold Editor … because I’m currently testing with the dev app on my iPhone 8, and I’m trying to force Portrait Orientation only, and rotating the device keeps rotating to Landscape Orientation … despite me having removed the Landscape profile from my custom.display_profiles
…
It’s in the documentation for the Dynamic Orientation setting: Defold project settings
Note that you don’t need a special dev app. Bundle a debug build once of your project and install and start it. Your device will now show up as an available target in the editor.
Oh, really? That’s really cool. Once this problem gets fixed and I can produce builds again, I’ll definitely give that a try!
I’m assuming that the debug build of the project will respect the Dynamic Orientation setting, unlike the development app? Or, will it act the same if you use it as a target from the editor?
The debug build will be exactly as you specify it in game.project.