The visualizer for TSparseArray in the Unreal.natvis file only works for TSparseArrays that use the default allocator. This is the section that we needed to add to visualize TSparseArrays that use TInlineSparseArrayAllocator (I added it above the general-case TSparseArray visualizer, but I don’t think the order matters):
<Type Name="TSparseArray<*,TInlineSparseArrayAllocator<*,*>>">
<DisplayString Condition="(Data.ArrayNum - NumFreeIndices) <= 0 && Data.ArrayMax == 0">Empty</DisplayString>
<DisplayString Condition="(Data.ArrayNum - NumFreeIndices) <= 0 && Data.ArrayMax > 0">Empty, Max={Data.ArrayMax}</DisplayString>
<DisplayString Condition="Data.ArrayNum <= Data.ArrayMax">Num={Data.ArrayNum - NumFreeIndices}, Max={Data.ArrayMax}</DisplayString>
<Expand>
<IndexListItems>
<Size>(Data.ArrayNum > 0 && Data.ArrayNum <= Data.ArrayMax) ? Data.ArrayNum : 0</Size>
<!-- in some cases, the allocator will have a valid SecondaryData, even though the AllocationFlags indicate that it should be using InlineData -->
<ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) && (reinterpret_cast<uint32*>(AllocationFlags.AllocatorInstance.InlineData )[$i/32]>>($i%32) & 1) && (Data.AllocatorInstance.SecondaryData.Data != 0)">*reinterpret_cast<ElementType*>(&(reinterpret_cast<FElementOrFreeListLink*>(Data.AllocatorInstance.SecondaryData.Data)[$i]).ElementData)</ValueNode>
<ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) && (reinterpret_cast<uint32*>(AllocationFlags.AllocatorInstance.InlineData )[$i/32]>>($i%32) & 1) != 0">*reinterpret_cast<ElementType*>(&(reinterpret_cast<FElementOrFreeListLink*>(Data.AllocatorInstance.InlineData)[$i]).ElementData)</ValueNode>
<ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) && (reinterpret_cast<uint32*>(AllocationFlags.AllocatorInstance.InlineData )[$i/32]>>($i%32) & 1) == 0">"Invalid",sb</ValueNode>
<ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data != 0) && (reinterpret_cast<uint32*>(AllocationFlags.AllocatorInstance.SecondaryData.Data)[$i/32]>>($i%32) & 1) != 0">*reinterpret_cast<ElementType*>(&(reinterpret_cast<FElementOrFreeListLink*>(Data.AllocatorInstance.SecondaryData.Data)[$i]).ElementData)</ValueNode>
<ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data != 0) && (reinterpret_cast<uint32*>(AllocationFlags.AllocatorInstance.SecondaryData.Data)[$i/32]>>($i%32) & 1) == 0">"Invalid",sb</ValueNode>
</IndexListItems>
</Expand>
</Type>