/// <summary>
	/// Callback method that is called before each build
	/// </summary>
	public void OnPreBuild(Configuration configuration, System.DateTime buildDate)
	{
		AdvancedBuilder advancedBuilder = (AdvancedBuilder)AssetDatabase.LoadAssetAtPath("Assets/PygmyMonkey/AdvancedBuilder/Editor/AdvancedBuilder.asset", typeof(AdvancedBuilder));

		// Print the build destination path
		string buildDestinationPath = configuration.getBuildDestinationPath(advancedBuilder.getAdvancedSettings(), buildDate, advancedBuilder.getProductParameters().bundleVersion);
		Debug.Log(buildDestinationPath);

		// You can retrieve multiple variables from the configuration class
		// Release type name: configuration.releaseType.name
		// Platform name: configuration.platformType.ToString()
		// Distribution platform name: configuration.distributionPlatform.name
		// Platform architecture name: configuration.platformArchitecture.name
		// Texture compression name: configuration.textureProperties.name
		Debug.Log("Do stuff before build");
	}
		public void performBuild(Configuration configuration)
		{
			/*
			 * Update AppParameters file
			 */
			AppParametersHelper.SaveParameters();


			/*
			 * Set Player Settings
			 */
			configuration.applyConfiguration();


			/*
			 * Get destination path
			 */
			string buildDestinationPath = configuration.getBuildDestinationPath(m_advancedBuilder.getAdvancedSettings(), m_buildDate, m_advancedBuilder.getProductParameters().bundleVersion);


			/*
			 * Perform the build
			 */
			performPreBuild(configuration, m_buildDate);
			bool success = performBuild(configuration, buildDestinationPath, configuration.platformArchitecture.binarySuffix, m_advancedBuilder.getAdvancedSettings());
			performPostBuild(configuration, m_buildDate);


			// Hack to prevent violation access when editing AppParameters.cs script
			System.Threading.Thread.Sleep(500);
			//TODO: Can we remove that now?


			/*
			 * Restore AppParameters
			 */
			if (success)
			{
				AppParametersHelper.RestoreParameters();
			}

			EditorUtility.ClearProgressBar();
		}