It’s pretty much a “develop from zero” situation. You can import assets, but will probably have to at least fix them up. If you are lucky, the two engines use the same language, but probably not. For example Unity uses C# while UE5 uses C++. And then you didn’t even get to the parts where you actually use use the engine. Everything that touches the capabilities of the specific game engine need to be rewritten. That is off the top of my head: interaction, physics engine usage, collision engine usage, AI stuff etc.