Warning
For some reason most ISMC functions are implemented in InstancedStaticMesh.cpp and not InstancedStaticMeshComponent.cpp
Physics Init
- If a Physics State was need it will be created, this will then run
UInstancedStaticMeshComponent::CreateAllInstanceBodieswhich creates a new BI for each already existing ISMC mesh instance.
Creation
UInstancedStaticMeshComponent::AddInstanceUInstancedStaticMeshComponent::AddInstanceInternal- Create a new id
- Calls SetupNewInstanceData
- …
UInstancedStaticMeshComponent::SetupNewInstanceData- This can create a new
FBodyInstancefor the new ISMC mesh instance using thenewkeyword and doing some setup. - Calls
UInstancedStaticMeshComponent::InitInstanceBody
- This can create a new
Removing
UInstancedStaticMeshComponent::RemoveInstanceUInstancedStaticMeshComponent::RemoveInstanceInternal- This will destroy the existing BI (if any) for the given ISMC mesh instance by using the
deletekeyword and callingTermBody.
- This will destroy the existing BI (if any) for the given ISMC mesh instance by using the