Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Screen orientation locking

Discussion in 'Project Tiny' started by ujebegu, May 15, 2019.

  1. ujebegu

    ujebegu

    Joined:
    Apr 29, 2013
    Posts:
    3
    I need to lock landscape orientation. I found some code in api and wrote the next:

    let tmp = new ut.PlayableAd.OrientationProperties();
    tmp.allowOrientationChange = false;
    tmp.forceOrientation = "landscape";
    ut.PlayableAd.Service.setOrientationProperties(tmp);

    In mobile device browser it doesn't work.There is a way to ensure that it is a right way and it works ??
     
  2. gamayun

    gamayun

    Joined:
    Nov 20, 2012
    Posts:
    34
    In my fbapp-config.json I have:
    {
    "instant_games": {
    "navigation_menu_version": "NAV_FLOATING",
    "orientation": "LANDSCAPE",
    }
    }
    It does lock to Landscape