Unity isn’t game engine; Unity is itself a whole platform.
If you need to code once and publish “everywhere”, then it’s Unity what you need; however you’ll have to buy $2000 addons or make yourself a game engine on top of Unity; a large portion of Unity jobs are related to game engine (tools) development.
If you’d rather publish on core platforms and focus on making a very advanced game instead, then Unreal is millions of times a better choice because all the tools you need are already in there.