public bool drawInspector()
		{
			ErrorReporter errorReporter = new ErrorReporter();
			
			// -------------------
			// Product parameters
			// -------------------
			ProductParametersRenderer productParametersRenderer = new ProductParametersRenderer(m_advancedBuilder.getProductParameters());
			productParametersRenderer.checkWarningsAndErrors(errorReporter);

			if (GUIUtils.DrawHeader("Product Parameters", "ab_product_parameters"))
			{
				GUIUtils.BeginContents();
				productParametersRenderer.drawInspector();
				GUIUtils.EndContents();
			}
			
			
			
			// --------------
			// Release Types
			// --------------
			ReleaseTypesRenderer releaseTypesRenderer = new ReleaseTypesRenderer(m_advancedBuilder.getReleaseTypes());
			releaseTypesRenderer.checkWarningsAndErrors(errorReporter);

			if (GUIUtils.DrawHeader("Release Types", "ab_release_types"))
			{
				GUIUtils.BeginContents();
				releaseTypesRenderer.drawInspector();
				GUIUtils.EndContents();
			}
			
			
			
			// ----------
			// Platforms
			// ----------
			PlatformsRenderer platformsRenderer = new PlatformsRenderer(m_advancedBuilder.getPlatforms());
			platformsRenderer.checkWarningsAndErrors(errorReporter);

			if (GUIUtils.DrawHeader("Platforms", "ab_platforms"))
			{
				GUIUtils.BeginContents();
				platformsRenderer.drawInspector();
				GUIUtils.EndContents();
			}



			// ------------------
			// Advanced Settings
			// ------------------
			AdvancedSettingsRenderer advancedSettingsRenderer = new AdvancedSettingsRenderer(m_advancedBuilder.getAdvancedSettings());
			advancedSettingsRenderer.checkWarningsAndErrors(errorReporter);

			if (GUIUtils.DrawHeader("Advanced Settings", "ab_advanced_settings"))
			{
				GUIUtils.BeginContents();
				advancedSettingsRenderer.drawInspector();
				GUIUtils.EndContents();
			}



			// ------------------
			// App Configuration
			// ------------------
			ProjectConfigurationsRenderer projectConfigurationsRenderer = new ProjectConfigurationsRenderer(m_advancedBuilder, m_advancedBuilder.getProjectConfigurations());
			projectConfigurationsRenderer.checkWarningsAndErrors(errorReporter);

			if (GUIUtils.DrawHeader("Project Configurations", "ab_project_configurations"))
			{
				GUIUtils.BeginContents();
				bool wasBuildProcessLaunched = projectConfigurationsRenderer.drawInspector(platformsRenderer, errorReporter);
				if (wasBuildProcessLaunched)
				{
					return true;
				}
				GUIUtils.EndContents();
			}



			// ------------------
			// Perform Build
			// ------------------
			if (GUIUtils.DrawHeader("Perform Build", "ab_perform_build", true))
			{
				GUIUtils.BeginContents();
				{
					if (errorReporter.getWarningCount() > 0 || errorReporter.getErrorCount() > 0)
					{
						foreach (string iMessage in errorReporter.getErrorList())
						{
							EditorGUILayout.HelpBox(iMessage, MessageType.Error, true);
						}

						foreach (string iMessage in errorReporter.getWarningList())
						{
							EditorGUILayout.HelpBox(iMessage, MessageType.Warning, true);
						}
					}


					bool isBuildAllowed = m_advancedBuilder.getProjectConfigurations().getTotalBuildCount() != 0 && errorReporter.getErrorCount() <= 0;
					
					
					/*
					 * Perform the build
					 */
					GUI.enabled = isBuildAllowed;
					
					if (GUIUtils.DrawBigButton("Perform a total of " + m_advancedBuilder.getProjectConfigurations().getTotalBuildCount() + " builds", Color.green))
					{
						if (m_advancedBuilder.getProjectConfigurations().getTotalAutoRunBuildCount() > 3)
						{
							if (EditorUtility.DisplayDialog("Launch build?", "You have selected the 'Autorun Build' option and you are making multiple builds, are you sure you want to continue?", "Yes", "Cancel"))
							{
								AdvancedBuilder.PerformBuild();
							}
						}
						else
						{
							AdvancedBuilder.PerformBuild();
						}

						return true;
					}
					
					GUI.enabled = true;
						
						
					/*
					 * Button to open build folder
					 */
					if (GUIUtils.DrawBigButton("Open Build folder"))
					{
						string buildFolderPath = Application.dataPath.Replace("Assets", "Builds");
						
						if (!Directory.Exists(buildFolderPath))
						{
							Directory.CreateDirectory(buildFolderPath);
						}
						
						EditorUtility.OpenWithDefaultApp(buildFolderPath);
					}
					
					GUILayout.Space(5f);
				}
				GUIUtils.EndContents();
			}

			return false;
		}
		public bool drawInspector(PlatformsRenderer platformsRenderer, ErrorReporter errorReporter)
		{
			List<Configuration> configurationList = m_projectConfigurations.getAvailableConfigurationList(m_advancedBuilder.getReleaseTypes(), m_advancedBuilder.getPlatforms());
			drawAvailableConfigurationList(configurationList);
			return drawSelectedConfigurationList(platformsRenderer, errorReporter);
		}
		private bool drawSelectedConfigurationList(PlatformsRenderer platformsRenderer, ErrorReporter errorReporter)
		{
			EditorGUILayout.HelpBox("Here you can switch to a configuration, so you can directly test your game inside the Editor in the configuration you want. Of course if you decide to build, every build will have the configuration you specified. You can click on a configuration to see details and apply specific parameters.", MessageType.Info, true);
			GUILayout.BeginVertical();
			{
				for (int i = 0; i < m_projectConfigurations.configurationList.Count; i++)
				{
					Configuration configuration = m_projectConfigurations.configurationList[i];
					
					// If we could not find the texture compression, it's because we loaded AdvancedBuilder with an older version of Unity used to create the AdvancedBuilder data
					if (configuration.textureCompression == null)
					{
						m_projectConfigurations.configurationList.Remove(configuration);
						return false;
					}
					
					EditorGUILayout.BeginHorizontal();
					{
						configuration.isEnabled = EditorGUILayout.Toggle(configuration.isEnabled, GUILayout.Width(15f));

						GUI.backgroundColor = m_projectConfigurations.selectedConfigurationIndex == i ? Color.green : Color.white;
						if (GUILayout.Button(configuration.ToString()))
						{
							ConfigurationSceneRenderer.ComputeProjectSceneList();
							m_configurationSceneRenderer.updateAvailableSceneList(configuration);

							if (m_projectConfigurations.selectedConfigurationIndex == i)
							{
								m_projectConfigurations.selectedConfigurationIndex = -1;
							}
							else
							{
								m_projectConfigurations.selectedConfigurationIndex = i;
							}

							GUI.FocusControl(null);
						}
						GUI.backgroundColor = Color.white;

						GUI.backgroundColor = Color.red;
						if (GUILayout.Button("x", GUILayout.Width(25f)))
						{
							m_projectConfigurations.selectedConfigurationIndex = -1;
							m_projectConfigurations.configurationList.Remove(configuration);
							return false;
						}
						GUI.backgroundColor = Color.white;
					}
					EditorGUILayout.EndHorizontal();

					if (m_projectConfigurations.selectedConfigurationIndex == i)
					{
						GUILayout.Space(5);

						bool hasPressBuild = drawConfigurationDetail(platformsRenderer, errorReporter);
						if (hasPressBuild)
						{
							return true;
						}
						
						GUILayout.Space(10);
					}
				}
			}
			GUILayout.EndVertical();

			return false;
		}
		private bool drawConfigurationDetail(PlatformsRenderer platformsRenderer, ErrorReporter errorReporter)
		{
			if (m_projectConfigurations.selectedConfigurationIndex >= m_projectConfigurations.configurationList.Count)
			{
				m_projectConfigurations.selectedConfigurationIndex = -1;
				return false;
			}

			Configuration configuration = m_projectConfigurations.configurationList[m_projectConfigurations.selectedConfigurationIndex];

			if (GUIUtils.DrawHeader("Configuration information", true))
			{
				GUIUtils.BeginContents();
				
				GUILayout.BeginHorizontal();
				{
					GUILayout.BeginVertical();
					{
						configuration.name = EditorGUILayout.TextField("Name:", configuration.name);

						EditorGUILayout.LabelField("Default Defines:", configuration.getDefines());
						configuration.customDefines = EditorGUILayout.TextField("Custom Defines:", configuration.customDefines);

						if (configuration.platformType == PlatformType.WindowsStore)
						{
							if (PlatformWindowsStore.IsUniversal(configuration.platformArchitecture.name))
							{
								configuration.wsaBuildAndRunDeployTarget = (WSABuildAndRunDeployTarget)EditorGUILayout.EnumPopup("Build and Deploy Target", configuration.wsaBuildAndRunDeployTarget);
							}
						}

						/*if (configuration.platformType == PlatformType.Android)
						{
							configuration.appendProject = EditorGUILayout.ToggleLeft(new GUIContent("Append project", "(Used when building Eclipse project) This setting will create a new Eclipse project. Existing Eclipse project setting changes will be discarded."), configuration.appendProject);
						}
						else */if (configuration.platformType == PlatformType.iOS)
						{
							configuration.appendProject = EditorGUILayout.ToggleLeft(new GUIContent("Append project", "This setting will append an existing Xcode project. Existing Xcode project setting changes will be preserved."), configuration.appendProject);
						}
						else if (configuration.platformType == PlatformType.WindowsStore)
						{
							configuration.appendProject = EditorGUILayout.ToggleLeft(new GUIContent("Append project", "This setting will append an existing project instead of replacing it."), configuration.appendProject);
						}

						configuration.openBuildFolder = EditorGUILayout.ToggleLeft("Open build folder after build", configuration.openBuildFolder);
						configuration.isDevelopmentBuild = EditorGUILayout.ToggleLeft("Development build", configuration.isDevelopmentBuild);
						configuration.shouldAutoconnectProfiler = EditorGUILayout.ToggleLeft("Autoconnect Profiler", configuration.shouldAutoconnectProfiler);
						configuration.allowDebugging = EditorGUILayout.ToggleLeft("Allow script debugging", configuration.allowDebugging);
						configuration.shouldAutoRunPlayer = EditorGUILayout.ToggleLeft("Autorun Build", configuration.shouldAutoRunPlayer);

						m_configurationSceneRenderer.drawInspector(configuration);

						if (GUIUtils.DrawHeader("Build information"))
						{
							GUIUtils.BeginContents();
							{
								PlatformRenderer platformRenderer = platformsRenderer.getPlatformRendererFromPlatform(configuration.platform.getPlatformProperties().platformType);
								platformRenderer.drawBuildSummary(m_advancedBuilder.getAdvancedSettings(), configuration, m_advancedBuilder.getProductParameters().bundleVersion);
							}
							GUIUtils.EndContents();
						}
						
						GUILayout.BeginHorizontal();
						{
							if (GUILayout.Button("Apply this config" + (m_projectConfigurations.isCurrentConfig(configuration) ? " (Current)" : "")))
							{
								configuration.applyConfiguration();
							}

							GUI.enabled = errorReporter.getErrorCount() == 0;
							if (GUILayout.Button("Build"))
							{
								AdvancedBuilder.PerformBuild(configuration);
								return true;
							}
							GUI.enabled = true;
						}
						GUILayout.EndHorizontal();
					}
					GUILayout.EndVertical();
				}
				GUILayout.EndHorizontal();
				
				GUIUtils.EndContents();
			}

			return false;
		}