"What modifications can I make to the source code?"
"You can extend it, modify it, fork it, or integrate it with other software or libraries, with one exception: You can’t combine the Unreal Engine code with code covered by a “Copyleft” license agreement which would directly or indirectly require the Unreal Engine to be governed by terms other than the EULA."
https://www.unrealengine.com/faq
"What modifications can I make to the source code?"
"You can extend it, modify it, fork it, or integrate it with other software or libraries, with one exception: You can’t combine the Unreal Engine code with code covered by a “Copyleft” license agreement which would directly or indirectly require the Unreal Engine to be governed by terms other than the EULA."