block portrait view change unity 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;
}
}