public static void FindAndRemoveSwapBack <T>(this DynamicBuffer <T> buffer, T value) where T : struct, IBufferElementData, IEquatable <T> { int idx = buffer.Find(value); if (idx != -1) { buffer.RemoveAtSwapBack(idx); } }