Before heating, mix sugar and cornstarch in a medium saucepan.
Add egg yolks, milk add half-and-half. Whisk to combine.
Place the saucepan on the stove and heat over medium-low heat, constantly stirring the mixture for about 15 minutes until it thickens and comes to a boil. once the mixture comes to boil, let it bubble for one minute while whisking.
Remove the pan from heat and stir in butter and vanilla extract.
Spoon mixture into a container and cover. Place in fridge to cool for about 2 hours.