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
.
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
.
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 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."); }