Can you give me detailed reasons for why Unreal 4 is better than Unity?

I would not say it is a pain… but when you compare the easy material editor and this is all you know, shaders (HLSL) becomes harder, but its sintax is C++ or C# like, but for you to integrate it into the engine you need not only the HLSL knowledge but also C++ knowledge and to know the Unreal API for the wrappers to access it and enabling optimizations and reuse in another platforms. Besides this, you can put small HLSL nodes inside the material editor, so it is not painfull, but it has limits on their usage extent. There are few blogs, some even made by Epic’s employees which teaches how to create shaders inside Unreal with C++ etc.