/// <summary> /// Sets up the current scene and creates a new training course for this scene. /// </summary> /// <param name="courseName">Name of the training course.</param> public static void SetupSceneAndTraining(string courseName) { TrainingSceneSetup.Run(); string errorMessage = null; if (CourseAssetUtils.DoesCourseAssetExist(courseName) || CourseAssetUtils.CanCreate(courseName, out errorMessage)) { if (CourseAssetUtils.DoesCourseAssetExist(courseName)) { CourseAssetManager.Load(courseName); } else { CourseAssetManager.Import(EntityFactory.CreateCourse(courseName)); AssetDatabase.Refresh(); } SetCourseInCurrentScene(courseName); } if (string.IsNullOrEmpty(errorMessage) == false) { Debug.LogError(errorMessage); } try { EditorSceneManager.SaveScene(SceneManager.GetActiveScene()); } catch (Exception ex) { Debug.LogError(ex); } }
public void Setup() { if (RuntimeConfigurator.Exists) { return; } TrainingSceneSetup.Run(); }
public static void SetupScene() { TrainingSceneSetup.Run(); }