AssetType Shader { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Shader property of the Editor.AssetType class represents the asset type for shader files, typically with the .shader file extension. This property is static and provides a way to identify and work with shader assets within the editor environment.

Usage

Use the Shader property when you need to reference or manipulate shader assets in your project. This can be useful for tasks such as loading, categorizing, or filtering assets based on their type.

Example

// Example of using the Shader property to find a shader asset type
Editor.AssetType shaderAssetType = Editor.AssetType.Shader;

// Use the shaderAssetType to perform operations specific to shader assets
// For example, loading a shader resource
var shaderResource = Editor.Asset.LoadResource(shaderAssetType, "path/to/shader");

// Check if the asset type is a game resource
bool isGameResource = shaderAssetType.IsGameResource;

// Get the friendly name for UI purposes
string friendlyName = shaderAssetType.FriendlyName;

// Access the primary file extension for shader assets
string fileExtension = shaderAssetType.FileExtension;