public void SetResolution(string resolutionName, Vector2 newResolution) { UIStoryboard storyboard = (UIStoryboard)target; storyboard.SetResolution(newResolution); int width = Mathf.FloorToInt(newResolution.x); int height = Mathf.FloorToInt(newResolution.y); //gameview if (GameViewUtils.SizeExists(GameViewUtils.GetCurrentGroupType(), width, height)) { SetGameViewResolution(width, height); } else { //size doesnt exist yet, create it GameViewUtils.AddCustomSize(GameViewUtils.GameViewSizeType.FixedResolution, GameViewUtils.GetCurrentGroupType(), width, height, resolutionName); SetGameViewResolution(width, height); } }