Managing a project

What is a “project” ?

A projet is a reflection of the InstantTerra status.

For example, save to a file and reload later to continue your work.

// Create an instance of InstantTerra
InstantTerra instantTerra = new InstantTerra();

// Get the current project
Project project = instantTerra.GetProject();

Creating a new project or a project “by default

Note

When you start an instance of InstantTerra, a new project is created automatically.

// Create a new project (default project)
project.NewProject();

The NewProject() method replaces the current project with a new default project.

Warning

If you have made changes to your project and are trying to open another project, these changes will be lost!

Saving a project

// Save the current project
project.SaveProject("my_project.terrain");

The SaveProject(filename) method saves the current project to a file.

Note

The saved file does not have a default extension;

you must add .terrain to the end of the file name.

Opening a project

// Open a project
project.OpenProject("my_project.terrain");

The OpenProject(filename) method opens an InstantTerra project from the specified file.

Warning

If you have made changes to your project and are trying to open another project, these changes will be lost!

Closing a project

// Close the current project
project.CloseProject();

The CloseProject() method closes the current project.

Warning

If you have made changes to your project and are trying to open another project, these changes will be lost!