bool SingleThreaded { get; set; }

robot_2Generated
code_blocksInput

Description

The SingleThreaded property of the ShaderCompileOptions struct indicates whether the shader compilation process should be executed on a single thread. This can be useful in scenarios where multi-threading might cause issues or when debugging to simplify the execution flow.

Usage

To use the SingleThreaded property, create an instance of the ShaderCompileOptions struct and set the property to true if you want to enforce single-threaded compilation. By default, this property is set to false, allowing multi-threaded compilation.

Example

// Example of using ShaderCompileOptions with SingleThreaded property
ShaderCompileOptions options = new ShaderCompileOptions();
options.SingleThreaded = true; // Enforce single-threaded shader compilation

// Use options in shader compilation process
ShaderCompiler.Compile(shaderSource, options);