UInstancedStaticMeshComponent

Hi,

How do you hide 1 instance so it doesn’t render anymore?

Like the function UInstancedStaticMeshComponent->RemoveInstance(0)
But I want UInstancedStaticMeshComponent->HideInstance(0)

I don’t want to remove because that causes a lag spike.

Thank you

I’ve been having the same need/problem.

I started updating the instance transforms and hiding them in an obscure place in the world. Then I reuse them as needed. Here’s the code to update a transform:

UInstancedStaticMeshComponent* u_mesh= ...;
u_mesh->UpdateInstanceTransform(
	index,
	despawnLocation,
	false,
	false,
	true
);