public void FitToOrientation() // In Progress { if (Screen.width > Screen.height) { Camera.main.gateFit = Camera.GateFitMode.Horizontal; } else { Camera.main.gateFit = Camera.GateFitMode.Vertical; } maxPosition = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, 0, 77.25f)).x; wallLeft.transform.position = new Vector3(-maxPosition - wallPadding, wallHeight, -1f); wallRight.transform.position = new Vector3(maxPosition + wallPadding, wallHeight, -1f); playerController.RepositionPlayer(); background.ChangeBackgroundSize(); spawnManager.xSpawnLimit = maxPosition; spawnManager.SetSpawnRatio(); }