Scripting API

Shader

class in UnityEngine · UnityEngine.CoreModule · inherits from Object

20 of 60 of Unity's membersUnity's documentation
In Tassix

A built-in shader by name. Each maps to how Tassix draws it (lit or unlit, opaque, cutout or transparent) and Unity's render queue and properties for it, as recorded in conformance/recordings/rendering_2d.jsonl. URP's common shaders are included so URP projects find them.

Properties 2

bool isSupported { get; }
int renderQueue { get; }

The shader's default render queue.

Methods 18

static Shader? Find(string name)

A built-in shader by name, or null (as in Unity) if there is none.

static Color GetGlobalColor(string name)
static Color GetGlobalColor(int nameID)
static float GetGlobalFloat(string name)
static float GetGlobalFloat(int nameID)
static int GetGlobalInt(string name)
static int GetGlobalInt(int nameID)
static int GetGlobalInteger(string name)
static int GetGlobalInteger(int nameID)
static Matrix4x4 GetGlobalMatrix(string name)
static Matrix4x4 GetGlobalMatrix(int nameID)
static Texture? GetGlobalTexture(string name)
static Texture? GetGlobalTexture(int nameID)
static Vector4 GetGlobalVector(string name)
static Vector4 GetGlobalVector(int nameID)
static int PropertyToID(string name)
static void SetGlobalColor(string name, Color value)
static void SetGlobalColor(int nameID, Color value)
static void SetGlobalFloat(string name, float value)
static void SetGlobalFloat(int nameID, float value)
static void SetGlobalFloatArray(string name, float[] values)
static void SetGlobalFloatArray(int nameID, float[] values)
static void SetGlobalInt(string name, int value)
static void SetGlobalInt(int nameID, int value)
static void SetGlobalInteger(string name, int value)
static void SetGlobalInteger(int nameID, int value)
static void SetGlobalMatrix(string name, Matrix4x4 value)
static void SetGlobalMatrix(int nameID, Matrix4x4 value)
static void SetGlobalTexture(string name, Texture? value)
static void SetGlobalTexture(int nameID, Texture? value)
static void SetGlobalVector(string name, Vector4 value)
static void SetGlobalVector(int nameID, Vector4 value)
static void SetGlobalVectorArray(string name, Vector4[] values)
static void SetGlobalVectorArray(int nameID, Vector4[] values)

Not in Tassix yet 40

DisableKeyword EnableKeyword FindPassTagValue FindPropertyIndex FindSubshaderTagValue FindTextureStack GetDependency GetGlobalFloatArray GetGlobalMatrixArray GetGlobalVectorArray GetPassCountInSubshader GetPropertyAttributes GetPropertyCount GetPropertyDefaultFloatValue GetPropertyDefaultIntValue GetPropertyDefaultVectorValue GetPropertyDescription GetPropertyFlags GetPropertyName GetPropertyNameId GetPropertyRangeLimits GetPropertyTextureDefaultName GetPropertyTextureDimension GetPropertyType IsKeywordEnabled SetGlobalBuffer SetGlobalConstantBuffer SetGlobalMatrixArray SetGlobalRayTracingAccelerationStructure SetKeyword WarmupAllShaders enabledGlobalKeywords globalKeywords globalMaximumLOD globalRenderPipeline keywordSpace maximumChunksOverride maximumLOD passCount subshaderCount