🧱materials

Functions:

get_material_by_name

materials.get_material_by_name(path: string): material

Name
Type
Description

path

string

Directory to the specified material

Returns the material object in the specified path.

get_first_material

materials.get_first_material(): material

Returns the first material.

get_next_material

materials.get_next_material(mat: material): material

Name
Type
Description

mat

material

-

Returns the next material.

get_material

materials.get_material(mat: material): material

Name
Type
Description

mat

material

-

Returns the material.

get_material_name

materials.get_material_name(mat: material): string

Name
Type
Description

mat

material

-

Returns the name of the material.

set_material_var_flag

materials.set_material_var_flag(mat: material, flag: number, state: boolean)

Name
Type
Description

mat

material

-

flag

number

-

state

boolean

-

Sets the value of the material var flag.

color_modulate

materials.color_modulate(mat: material, clr: color)

Name
Type
Description

mat

material

-

clr

color

-

Sets the material color modulation value.

set_alpha

materials.set_alpha(mat: material, alpha: number)

Name
Type
Description

mat

material

-

alpha

number

-

Sets the material alpha modulation value.

Last updated