public static void Load(string sid) { if (_lastSid == sid) { return; } var location = ProjectData.ProjectStructure.GetProjectScene(sid); if (location == null) { LogManager.GetCurrentClassLogger().Error("Location not found!"); return; } _lastSid = sid; LoaderAdapter.LoadProject(ProjectData.ProjectId, location.Id, ProjectData.ProjectConfigurationId); ProjectData.SceneCleared += ResetLastSid; void ResetLastSid() { ProjectData.SceneCleared -= ResetLastSid; _lastSid = string.Empty; } }
public void LocationChanged(ProjectSceneArguments changedLocation) { ProjectData.ProjectStructure.UpdateProjectScene(changedLocation.Scene); ProjectData.ProjectStructure.UpdateOrAddLocationPrefab(changedLocation.Location); if (ProjectData.SceneId == changedLocation.Scene.Id && ProjectData.LocationId != changedLocation.Scene.LocationId) { LoaderAdapter.LoadProject(ProjectData.ProjectId, changedLocation.Scene.Id, ProjectData.ProjectConfigurationId); } }
private void ApplyConfig() { if (LaunchArguments == null) { _launch = true; return; } LoaderAdapter.LoadProject(LaunchArguments); UpdateSettings(LaunchArguments); LaunchArguments = null; }