/// <summary>
        /// Creates a scene in the current project that acts as a loading scene until assetbundles are
        /// downloaded from the CDN. Takes in a loadingScreenImagePath, a path to the image shown in the loading scene,
        /// and an assetbundle URL. Replaces the current loading scene with a new one if it exists.
        /// </summary>
        public static void GenerateScene(string assetBundleUrl, string loadingScreenImagePath)
        {
            if (string.IsNullOrEmpty(assetBundleUrl))
            {
                throw new ArgumentException("AssetBundle URL text field cannot be null or empty.");
            }

            if (!File.Exists(loadingScreenImagePath))
            {
                throw new FileNotFoundException(string.Format("Loading screen image file cannot be found: {0}",
                                                              loadingScreenImagePath));
            }

            // Removes the loading scene if it is present, otherwise does nothing.
            EditorSceneManager.CloseScene(SceneManager.GetSceneByName(Path.GetFileNameWithoutExtension(SceneName)),
                                          true);

            var loadingScreenScene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Additive);

            var loadingScreenGameObject = new GameObject(CanvasName);

            AddImageToScene(loadingScreenGameObject, loadingScreenImagePath);

            AddScript(loadingScreenGameObject);

            LoadingBar.AddComponent(loadingScreenGameObject);

            bool saveOk = EditorSceneManager.SaveScene(loadingScreenScene, SceneFilePath);

            if (!saveOk)
            {
                // Not a fatal issue. User can attempt to resave this scene.
                var warningMessage = string.Format("Issue while saving scene {0}.",
                                                   SceneName);

                Debug.LogWarning(warningMessage);

                DialogHelper.DisplayMessage(SaveErrorTitle, warningMessage);
            }
            else
            {
                //TODO: investigate GUI Layout errors that occur when moving this to DialogHelper
                if (EditorUtility.DisplayDialog("Change Scenes in Build",
                                                "Would you like to replace any existing Scenes in Build with the loading screen scene?", "Yes",
                                                "No"))
                {
                    SetMainSceneInBuild(SceneFilePath);
                }
            }
        }