How to get the texture XY size in a Niagara particle system for "Spawn Particles in Grid"?

The way it was working was with a custom HLSL call and using a TextureSample object:

float2 size;
TS.GetTextureDimensions(0, size);
X = size.x;
Y = size.y;