void DrawLayouts() { headerRect.x = 0; headerRect.y = 0; headerRect.width = Screen.width; headerRect.height = 30; GUI.DrawTexture(headerRect, headerTexture); float h = 3; for (int i = 0; i < infoTextures.Length; i++) { infoRects [i].x = 0; infoRects [i].y = 35 + h; infoRects [i].width = Screen.width; infoRects [i].height = 30; GUI.DrawTexture(infoRects [i], infoTextures[i]); h = infoRects [i].y; GUILayout.BeginArea(infoRects[i]); GUILayout.BeginHorizontal(); GUILayout.Label(adNetworkTitles[i].ToUpper(), EditorStyles.boldLabel); GUILayout.EndHorizontal(); GUILayout.EndArea(); } footerRect.x = 0; footerRect.y = 60 + h; footerRect.width = Screen.width; footerRect.height = 25; GUI.DrawTexture(footerRect, footerTexture); GUILayout.BeginArea(footerRect); GUILayout.BeginHorizontal(); if (GUILayout.Button("Download Patch")) { try { PackageDownloader.downloadAndInstallAIP(); EditorUtility.DisplayProgressBar("Downloading Patch", "Downloading in Progress...", 0.1f / 100f); } catch (System.Exception exp) { EditorUtility.ClearProgressBar(); } } if (GUILayout.Button("Adnetwork plugins")) { Application.OpenURL("https://portal.consoliads.com/download/adnetworksdk"); } if (GUILayout.Button("Cancel")) { EditorUtility.ClearProgressBar(); this.Close(); } GUILayout.EndHorizontal(); GUILayout.EndArea(); }