Both Unity and Unreal Engine offer their source code on Github...
Both engines have bugs, and one of the biggest complaints about Unreal Engine is that any feature not used by Fortnite is half-baked until Fortnite uses it. With Unity, the biggest complaints are about the relatively transitory lifetimes of some of their biggest-marketed features, like rendering pipelines or networking code.