UnityEditor.PopupWindowContent.GetWindowSize C# (CSharp) Method

GetWindowSize() public method

The size of the popup window.

public GetWindowSize ( ) : Vector2
return Vector2
        public virtual Vector2 GetWindowSize()
        {
            return new Vector2(200f, 200f);
        }

Usage Example

 private void Init(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder)
 {
   this.m_WindowContent = windowContent;
   this.m_WindowContent.editorWindow = (EditorWindow) this;
   this.m_ActivatorRect = GUIUtility.GUIToScreenRect(activatorRect);
   this.m_LastWantedSize = windowContent.GetWindowSize();
   this.m_LocationPriorityOrder = locationPriorityOrder;
   Vector2 vector2 = windowContent.GetWindowSize() + new Vector2(this.m_BorderWidth * 2f, this.m_BorderWidth * 2f);
   this.position = PopupLocationHelper.GetDropDownRect(this.m_ActivatorRect, vector2, vector2, (ContainerWindow) null, this.m_LocationPriorityOrder);
   this.ShowPopup();
   this.Repaint();
 }
All Usage Examples Of UnityEditor.PopupWindowContent::GetWindowSize