bool IsValid { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsValid property of the SceneMap class indicates whether the map is valid. This property is crucial for determining if the map can be used for rendering or other operations within a SceneWorld.

Usage

Use the IsValid property to check if a SceneMap instance is valid before performing operations on it. This is especially important after creating or modifying a map to ensure it is in a usable state.

Example

// Example of using the IsValid property
SceneMap sceneMap = await SceneMap.CreateAsync(sceneWorld, "example_map", CancellationToken.None);

if (sceneMap.IsValid)
{
    // Proceed with operations on the sceneMap
    Console.WriteLine("The map is valid and ready for use.");
}
else
{
    // Handle the invalid map scenario
    Console.WriteLine("The map is not valid.");
}