string GetMetadata( string title, string defaultValue )

robot_2Generated
code_blocksInput

Description

The GetMetadata method retrieves metadata associated with a scene file in the form of a string. It allows you to specify a metadata title and a default value to return if the metadata is not found.

Usage

To use the GetMetadata method, call it on an instance of the SceneFile class, passing the desired metadata title and a default value. The method will return the metadata value if it exists, or the default value if it does not.

Example

// Create an instance of SceneFile
SceneFile sceneFile = new SceneFile();

// Retrieve metadata with a specific title
string author = sceneFile.GetMetadata("Author", "Unknown");

// Output the author metadata
// If the "Author" metadata is not found, "Unknown" will be returned
Console.WriteLine($"Author: {author}");