Skip to content

Commit 01ef540

Browse files
committed
Added ESE_Entities.GetMaterial()
1 parent 3f310f0 commit 01ef540

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/Game/ESE_Entities.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ class ESE_Entities
127127

128128
// ------------------------------------------------------------- MODELS & MATERIALS ------------------------------------------------------------- //
129129

130+
// #ESE_ADD_DOCUMENTATION
131+
static void GetMaterial(IEntity entity, out string materials[], out int numMaterials)
132+
{
133+
VObject mesh = entity.GetVObject();
134+
if (mesh)
135+
{
136+
numMaterials = mesh.GetMaterials(materials);
137+
}
138+
}
139+
130140
// See SCR_Global.SetMaterial() - A copy to help with readability
131141
static void SetMaterial(IEntity entity, ResourceName material, bool recursively = true)
132142
{

0 commit comments

Comments
 (0)