Project Current { get; set; }

robot_2Generated
code_blocksInput

Description

The Current property provides access to the currently open project within the Sandbox environment. This static property is part of the Sandbox.Project class and allows you to retrieve the project that is currently being worked on or manipulated.

Usage

Use the Current property to access the active project in your application. This can be useful for operations that need to interact with the project files, configuration, or other project-specific data.

Example

// Access the current project
Sandbox.Project currentProject = Sandbox.Project.Current;

// Check if the current project is active
bool isActive = currentProject.Active;

// Get the root path of the current project
string rootPath = currentProject.GetRootPath();

// Determine if the current project has a code path
bool hasCodePath = currentProject.HasCodePath();

// Output some project details
string projectDetails = $"Project Active: {isActive}, Root Path: {rootPath}, Has Code Path: {hasCodePath}";