🧱materials

Functions:

get_material_by_name

materials.get_material_by_name(path: string): material

NameTypeDescription

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

NameTypeDescription

mat

material

-

Returns the next material.

get_material

materials.get_material(mat: material): material

NameTypeDescription

mat

material

-

Returns the material.

get_material_name

materials.get_material_name(mat: material): string

NameTypeDescription

mat

material

-

Returns the name of the material.

set_material_var_flag

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

NameTypeDescription

mat

material

-

flag

number

-

state

boolean

-

Sets the value of the material var flag.

color_modulate

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

NameTypeDescription

mat

material

-

clr

color

-

Sets the material color modulation value.

set_alpha

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

NameTypeDescription

mat

material

-

alpha

number

-

Sets the material alpha modulation value.

Last updated