How to pass a uniform variable to a base pass shader?

My goal is to send a simple variable (int or bool) as a uniform buffer to the pixel base pass shader. (BasePassPixelShader.ush).

I’m familiar with how constant buffers work in HLSL but I can’t figure out how to fill a simple constant buffer with data and bind it to this particular shader from gameplay code.

I was thinking about adding struct members to already existing uniform buffers, like FOpaqueBasePassUniformParameters, and then filling their values in the CreateOpaqueBasePassUniformBuffer function, which takes a FViewInfo struct, but I can’t figure out how I could write to a FViewInfo from gameplay code.