unity lock mobile rotation code example
Example: how to set a screen rotation in unity
public class Example : MonoBehaviour
{
// Start in landscape mode
void Start()
{
Screen.orientation = ScreenOrientation.LandscapeLeft;
}
}