UnityEditor.GameViewSizeGroup.GetBuiltinCount C# (CSharp) Method

GetBuiltinCount() public method

public GetBuiltinCount ( ) : int
return int
        public int GetBuiltinCount()
        {
            return this.m_Builtin.Count;
        }

Usage Example

示例#1
0
        public void Replace(int index, object obj)
        {
            GameViewSize newResolution = CastToGameViewSize(obj);

            if (newResolution == null)
            {
                return;
            }

            if (index < m_GameViewSizeGroup.GetBuiltinCount())
            {
                Debug.LogError("Only custom game view sizes can be changed");
                return;
            }

            GameViewSize gameViewSize = m_GameViewSizeGroup.GetGameViewSize(index);

            if (gameViewSize != null)
            {
                gameViewSize.Set(newResolution);
                GameViewSizes.instance.SaveToHDD();
            }
        }
All Usage Examples Of UnityEditor.GameViewSizeGroup::GetBuiltinCount