UnityEditor.GameViewSizeGroup.GetTotalCount C# (CSharp) Method

GetTotalCount() public method

public GetTotalCount ( ) : int
return int
        public int GetTotalCount()
        {
            return (this.m_Builtin.Count + this.m_Custom.Count);
        }

Usage Example

示例#1
0
        private void EnsureSelectedSizeAreValid()
        {
            int length = Enum.GetNames(typeof(GameViewSizeGroupType)).Length;

            if (this.m_SelectedSizes.Length != length)
            {
                Array.Resize <int>(ref this.m_SelectedSizes, length);
            }
            foreach (int num in Enum.GetValues(typeof(GameViewSizeGroupType)))
            {
                GameViewSizeGroupType gameViewSizeGroupType = (GameViewSizeGroupType)num;
                GameViewSizeGroup     group = ScriptableSingleton <GameViewSizes> .instance.GetGroup(gameViewSizeGroupType);

                int index = (int)gameViewSizeGroupType;
                this.m_SelectedSizes[index] = Mathf.Clamp(this.m_SelectedSizes[index], 0, group.GetTotalCount() - 1);
            }
        }
All Usage Examples Of UnityEditor.GameViewSizeGroup::GetTotalCount