private void UpdateShape(HkRigidBody rigidBody, HkRigidBody rigidBody2, HkdBreakableBody destructionBody) { ProfilerShort.Begin("SetShape"); if (destructionBody != null) { ProfilerShort.Begin("SetBreakableShape"); destructionBody.BreakableShape = BreakableShape; ProfilerShort.BeginNextBlock("ConnectToWorld"); CreateConnectionToWorld(destructionBody); ProfilerShort.End(); //breakableShape.Dispose(); } else { rigidBody.SetShape(m_root); if (rigidBody2 != null) { rigidBody2.SetShape(m_root); } } ProfilerShort.End(); }