Optimizing Blueprint for Large-Scale Mesh Handling and Dynamic Coloring

No problem :slight_smile:

You can change the type of the “Building” variable by clicking on the type and typing “staticmesh” into the search box, you should be able to find it then, and select “Object Reference”.

You probably won’t need it though if you’re pre-calcing things.

What I would probably do is pre-calc the data and store it in the actual actors as Tags (or DataAssets which would be faster, but need c++). Then you could just enumerate all actors with a tag you add (something like “usrRhino”) and update their materials straight from the rest of the tags.

I’ve uploaded some clips (not tested, just concept).

The Pre-Calc routine (a Begin-Play, or Call-in-Editor button in a Blueprint - that way you can save the tags with the level and not have to run it each time):

And the routine for when the selection has changed:

1 Like