Get DynamicMaterialInstance from Mesh?

Arty McLabin
Mon, 22 Jan 2018 00:24:18 +0000
Asset Creation

Is there a way to get DynamicMaterialInstance from a mesh instead of a regular Material? I need to read one of it’s scalar values i am often setting.

The mesh material is a Dynamic Instance for sure, there is just no obvious way to get or cast it. (cast fails)

Please do not post answers like “save it in a variable”! I care about my RAM performance and would avoid any unnecessary variables.

13 posts - 1 participant