Baking cubic worlds materials

Hey guys, is there a way to bake the cw procedural material into a texture? In theory, this would require uv unwrapping the model, but doing that would mess the gradient (since we do “U” → “Reset” to make it look good). Is there another way? I would like to export the model to unreal engine

Just the default gradient edge and gradient bottom nodes are enough in my case, the emission and specular material i can create them in unreal engine