Entity/GetMaterials

From Garry's Mod
Jump to: navigation, search
 Entity:GetMaterials( )

Description

Returns all materials of the entity's model.

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

BUG

The server's values take priority on the client.

Issue Tracker: #3362

BUG

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

table

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

BUG

This table is limited to 127 materials, even if the entity has more.

Issue Tracker: #3216

Personal tools
Navigation