I believe you are mistaken:
- There is a free version of unity, but Unity Pro costs money
- Ue4 is 100% free, except “once you ship your game or application, you pay Epic 5% of gross revenue after the first $3,000 per product per calendar quarter.”
In other words, you’ll only need to pay (a very small amount) if you sell a good game. “We succeed when you succeed”.
Good luck!