Skip to main content

MaterialService

Description

The MaterialService aims to provide programatic access to materials for you user interface at runtime.

tip

GetMaterial defaults to searching in "/Assets/Resources/Materials/", however you can change the default parent folder to not be "Materials/" by passing the name of a folder as a second parameter.

Examples

Material Service
// load material and apply it to an image
Material glowMaterial = MaterialService.GetMaterial("glow");

UI.Image(_blobSprite).Material(glowMaterial);

Implementation