https://wiki.unrealengine.com/Recommended_Hardware
This is a page I found on the UE wiki.
They recommend at least a quad core, but for higher performance they did suggest an i7. My guess is that you will be able to run UE4 nicely on the i5, however you might see performance gains by using an i7. It will be up to you and your budget to decide. If I were you I would save some money and just go with the i5 since your primary use will be gaming.