UnityEditor.GameViewSize.Set C# (CSharp) Method

Set() public method

public Set ( GameViewSize other ) : void
other GameViewSize
return void
        public void Set(GameViewSize other)
        {
            this.sizeType = other.sizeType;
            this.width = other.width;
            this.height = other.height;
            this.baseText = other.baseText;
            this.Changed();
        }

Usage Example

        public void Replace(int index, object obj)
        {
            GameViewSize gameViewSize = GameViewSizesMenuItemProvider.CastToGameViewSize(obj);

            if (gameViewSize == null)
            {
                return;
            }
            if (index < this.m_GameViewSizeGroup.GetBuiltinCount())
            {
                Debug.LogError("Only custom game view sizes can be changed");
                return;
            }
            GameViewSize gameViewSize2 = this.m_GameViewSizeGroup.GetGameViewSize(index);

            if (gameViewSize2 != null)
            {
                gameViewSize2.Set(gameViewSize);
                ScriptableSingleton <GameViewSizes> .instance.SaveToHDD();
            }
        }
All Usage Examples Of UnityEditor.GameViewSize::Set