Garry's Mod Wiki

Entity:GetMaterials

Entity:GetMaterials

  table Entity:GetMaterials()

Description

Returns all materials of the entity's model.

This function is unaffected by Entity:SetSubMaterial as it returns the original materials.

The table returned by this function will not contain materials if they are missing from the disk/repository. This means that if you are attempting to find the ID of a material to replace with Entity:SetSubMaterial and there are missing materials on the model, all subsequent materials will be offset in the table, meaning that the ID you are trying to get will be incorrect.

Returns

1 table
A table containing full paths to the materials of the model.

For models, it's limited to 128 materials.

Special Pages


Wikis

?

Render Time: 20ms

DB GetPage 2
Generate Html 3
SaveChanges (1) 6
Render Body 0
Render Sidebar 8