System.Nullable<EmbeddedResource> GenerationData { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The GenerationData property of the Texture class provides data used by the generator to create the texture. This property is of type System.Nullable<Sandbox.Resources.EmbeddedResource>, meaning it can hold a value of EmbeddedResource or be null if no generation data is available.

Usage

Use the GenerationData property when you need to access or modify the data that was used to generate a texture. This can be particularly useful when working with dynamically generated textures where you might need to inspect or alter the generation parameters.

Example

// Example of accessing the GenerationData property
Texture myTexture = new Texture();
var generationData = myTexture.GenerationData;

if (generationData.HasValue)
{
    // Do something with the generation data
    var resource = generationData.Value;
    // Use resource as needed
}
else
{
    // Handle the case where there is no generation data
}