Hard time setting material with PerInstanceCustomData

I’m trying to create material for my instanced meshes using node PerInstanceCustomData. I have Atlas texture and I need to change color of certain asset by later certain condition. For example if asset will be in building process, it should be green or if asset is going to be destroyed, it should have red color.

So basically I have hard time to set my master material and get those parameters, so whenever I change index of PerInstanceCustomData, it should change color.

In this case, index 0 should be default Atlas texture.
Index 1 should be construction process(transparent and blue)
and so on …

-Used with instaced static meshes is checked

Has anybody experience with that? Thank you guys

Hi FamousColumbo,

Have you set the number of custom floats in the ISMC?

image

When you set your custom data value, check the bool there to make sure it succeeds - if the custom data index is greater than the number you’ve set for the “Num Custom Data Floats” it will fail.

Here’s how I’ve set it up:

And the material is:

Which gives: