private void SetProject(ProjectSettings projectSettings, string serializationPath = null) { this.ProjectSettings = projectSettings; this.SerializationPath = serializationPath; if (this.ProjectSettings != null) { this.ProjectSettings.EntityComponentTypesChanged += this.OnEntityComponentTypesChanged; // Setup project explorer this.ProjectExplorerViewModel = new ProjectExplorerViewModel(); foreach (var blueprintFile in this.ProjectSettings.BlueprintFiles) { // Add project file. var projectFileViewModel = new ProjectFileViewModel(blueprintFile); this.ProjectExplorerViewModel.ProjectFiles.Add(projectFileViewModel); } } else { this.ProjectExplorerViewModel = new ProjectExplorerViewModel(); this.BlueprintManagerViewModel = null; } // Load localization data. this.localizationContext.LoadLanguages(); // Raise events. this.OnPropertyChanged("ProjectSettings"); this.OnEntityComponentTypesChanged(); }