Based on my experience.. Neither.
The reason for this, is that when learning game development I find it alot better to be looking at the back end of the code, and learn from the ground up.
I started back in the day with Game Maker, and while some people may disregard that, it allowed me to learn how programming languages work, and gave me a simple look at OOP.
About a year ago, I started to learn C#, and soon after started to mess around with XNA. The great thing about XNA is that is managed code, and takes out most of the really hard stuff, but at the same time, you can develop games really quickly without having to learn how engines like UDK and Unity work. From what I hear Unity and UDK are mostly 3D, and personally that is not a good place to start for a new game developer.
With XNA you have SpriteBatch and the Content Pipeline, which makes drawing sprites to the screen really simple. You have the Draw and Update method, which are handled by the backend of XNA to keep timing values, and the rest can be designed by you.
Once you understand how DirectX works on a very simple level, you could try looking at using Unity or UDK. But, by then, I think you would find it gives you much more control to use a framework, and much more enjoyable too.