Add more data to InstancedStaticMeshData. Best way?

Hey there,

i’m currently trying to add more data to each instance of an InstancedStaticMesh.
While i could make an array with a new Struct and just make sure the indices match, i would rather prefer to
merge the new data into the old.

My current attempt is to create a child of the original “FInstancedStaticMeshInstanceData” struct
and override “AddInstance(…)” in my child component of the “InstancedStaticMeshComponent”.

And in the override, i create the child struct instead of the original one and pass that to “SetupNewInstanceData”.

BUT, “SetupNewInstanceData” is private. While writing this, i’m compiling source and made that function protected.

Though it feels like i should not do that. Is there a different solution to this? The data i want to add would be a few floats, an FVector and an ENUM. :confused:

Ok so i create a second array now, cause i couldn’t find a way to successfully override AddInstance without a lot of source changes.
Now i only override AddInstance to call Super and add an entry to the second array.

If someone knows another solution for this, feel free to tell me :X