Table of Contents

Class MaterialPresets

Namespace
S1MAPI.Utils
Assembly
S1MAPI_Mono.dll

Standardized material creation for common use cases. Provides consistent visual styling across S1MAPI-generated objects.

public static class MaterialPresets
Inheritance
MaterialPresets
Inherited Members

Properties

DefaultShader

Gets or sets the default shader used for material creation. Falls back to URP Lit, then Standard, then Internal-Colored.

public static Shader DefaultShader { get; set; }

Property Value

Shader

Methods

ApplyStandardProperties(Material)

Apply standard S1MAPI properties to a material.

public static void ApplyStandardProperties(Material material)

Parameters

material Material

The material to configure

ClearGlass(float, Color?)

Creates a clear, transparent glass material with minimal tint. Perfect for windows, display cases, and architectural glass elements.

public static Material ClearGlass(float alpha = 0.3, Color? tint = null)

Parameters

alpha float

The alpha transparency (0-1, default 0.3 for visible but clear glass)

tint Color?

Optional subtle color tint (defaults to very light blue)

Returns

Material

A clear glass material optimized for transparency

CreateFromShader(Shader, Color)

Creates a material from a shader with a base color.

public static Material CreateFromShader(Shader shader, Color color)

Parameters

shader Shader

The shader to use

color Color

The base color

Returns

Material

A new material with the specified shader and color

Emissive(Color, float)

Creates an emissive (glowing) material with the specified color.

public static Material Emissive(Color color, float intensity = 1)

Parameters

color Color

The emission color

intensity float

The emission intensity (default 1.0)

Returns

Material

A new emissive material

FindExistingMaterial(string)

Finds an existing material in Resources or memory by name.

public static Material? FindExistingMaterial(string materialName)

Parameters

materialName string

Name of the material to find (partial match supported)

Returns

Material

The found material or null

FromTextureName(string, Color?)

Creates a material using a texture found by name (Resources or Memory).

public static Material FromTextureName(string textureName, Color? color = null)

Parameters

textureName string

Name or path of the texture

color Color?

Optional tint color

Returns

Material

A textured material

Glass(Color, float)

Creates a glass-like material with the specified color and transparency.

public static Material Glass(Color color, float alpha = 0.3)

Parameters

color Color

The base color tint of the glass

alpha float

The alpha transparency (0-1)

Returns

Material

A new glass material

Metal(Color, float, float)

Creates a metallic material with the specified color.

public static Material Metal(Color color, float metallic = 0.8, float smoothness = 0.9)

Parameters

color Color

The base color of the metal

metallic float

The metallic value (0-1, default 0.8)

smoothness float

The smoothness value (0-1, default 0.9)

Returns

Material

A new metallic material

Opaque(Color, Shader?)

Creates an opaque material with the specified color.

public static Material Opaque(Color color, Shader? shader = null)

Parameters

color Color

The base color of the material

shader Shader

Optional shader to use (defaults to Standard shader)

Returns

Material

A new opaque material

Transparent(Color, float)

Creates a transparent material with the specified color and alpha.

public static Material Transparent(Color color, float alpha = 0.5)

Parameters

color Color

The base color of the material

alpha float

The alpha transparency (0-1)

Returns

Material

A new transparent material