Dynamic Instance Materials memory problem

Hello, I am creating a Block Base Game, each block has 6 Dynamic Instance Materials as each side can look different. But if I now create 10000 blocks in the game (60000 Dynamic Instance Materials) and then end the simulation (stop simulation in the editor) I get an out of memory (16GB Ram installed)

In the picture you can see the function where each block is executed.

Is there a limit for Dynamic Instance Materials?

I -think- you can use just 6 instances and put them on all cubes, no?

In any event, I don’t think there’s a limit, you just ran out of RAM.

But I want each block to be individual, different colors, textures, etc.

Out of memory only comes after the simulation is finished.

Yup, but it is memory, and hardly surprising :wink:

If you want to do this kind of thing, you could try looking at manipulating data primitives:

thx

1 Like