Voltray Engine Docs
Loading...
Searching...
No Matches
Workspace Struct Reference

Represents a workspace with its metadata and settings. More...

#include <Workspace.h>

Public Member Functions

std::string ToJson () const
 Serialize workspace to JSON string.
 
bool IsPathValid () const
 Check if the workspace path is valid and exists.
 

Static Public Member Functions

static Workspace FromJson (const std::string &json)
 Deserialize workspace from JSON string.
 

Public Attributes

std::string name
 
std::string description
 
std::filesystem::path path
 
std::chrono::system_clock::time_point lastOpened
 
std::chrono::system_clock::time_point created
 
bool isValid = true
 

Detailed Description

Represents a workspace with its metadata and settings.

A workspace is a project directory that contains user-specific content like scenes, custom materials, scripts, and models. Global assets (primitives like cube, sphere) are stored separately and shared across all workspaces.

Workspace structure:

  • Scenes/ - Scene files (.scene)
  • Scripts/ - User scripts
  • Materials/ - Custom materials
  • Textures/ - Custom textures
  • Models/ - Custom 3D models
  • Audio/ - Custom audio files
  • Prefabs/ - Reusable objects
  • .voltray/ - Internal engine data

Member Function Documentation

◆ FromJson()

Workspace Workspace::FromJson ( const std::string &  json)
static

Deserialize workspace from JSON string.

Parameters
jsonJSON string to parse
Returns
Workspace object

◆ IsPathValid()

bool Workspace::IsPathValid ( ) const

Check if the workspace path is valid and exists.

Returns
true if path exists and is a directory

◆ ToJson()

std::string Workspace::ToJson ( ) const

Serialize workspace to JSON string.

Returns
JSON representation of the workspace

Member Data Documentation

◆ created

std::chrono::system_clock::time_point Workspace::created

◆ description

std::string Workspace::description

◆ isValid

bool Workspace::isValid = true

◆ lastOpened

std::chrono::system_clock::time_point Workspace::lastOpened

◆ name

std::string Workspace::name

◆ path

std::filesystem::path Workspace::path

The documentation for this struct was generated from the following files: