private void AddScreenResolution(string rezName, int xSize, int ySize) { if (string.IsNullOrEmpty(rezName)) { Error = "Name is null or incorect. " + Environment.NewLine; } else if (rezName.Contains(xSize.ToString()) || rezName.Contains(xSize.ToString())) { Error = "Not allowed to contain Width and Height in the elementName." + Environment.NewLine; } else if (rezName.Contains(AndroidViewType.ToString()) == false) { Error = "You must have the ViewType(ex: Landscape)," + Environment.NewLine; } else { Error = null; } if (string.IsNullOrEmpty(Error) == false) { return; } if (AndroidViewType == AndroidViewType.Landscape && xSize > ySize && xSize > 280) { foreach (var vs in EditorUtils.ViewSizes) { if (vs.Width == xSize && vs.Height == ySize) { Error = vs.Width + ":" + vs.Height + "ViewSize allready exists."; } } if (string.IsNullOrEmpty(Error)) { EditorUtils.AddCustomSize(GameViewSizeType.FixedResolution, GameViewSizeGroupType.Android, xSize, ySize, rezName); } } }