I would personally go first for Unity and then for programming. You will first learn how it works and how to make some simple games. You will get to know the components and be able to make something very simple. So you will feel pretty restricted though and so you will have more motivation to learn the code since you will want to make something more complex.