MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OpenProject

Method OpenProject

Source/Editor/Editor.cs:819–830  ·  view source on GitHub ↗

Closes this project with running editor and opens the given project. The project file path.

(string projectFilePath)

Source from the content-addressed store, hash-verified

817 /// </summary>
818 /// <param name="projectFilePath">The project file path.</param>
819 public void OpenProject(string projectFilePath)
820 {
821 if (projectFilePath == null || !File.Exists(projectFilePath))
822 {
823 MessageBox.Show("Missing project");
824 return;
825 }
826
827 // Cache project path and start editor exit (it will open new instance on valid closing)
828 _projectToOpen = StringUtils.NormalizePath(Path.GetDirectoryName(projectFilePath));
829 Windows.MainWindow.Close(ClosingReason.User);
830 }
831
832 /// <summary>
833 /// Ensure that editor is in a given state, otherwise throws <see cref="InvalidStateException"/>.

Callers

nothing calls this directly

Calls 5

GetDirectoryNameMethod · 0.80
ExistsMethod · 0.45
ShowMethod · 0.45
NormalizePathMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected