While the dough is in the stand mixer or bread machine, beat the butter and vanilla together for the filling. Then, chop the white chocolate into chunks.
When the dough is ready, divide it into two roughly equal parts (this makes it easier to work with). Put one half aside.
Take the other half, and on a floured surface, work on the dough, rolling it out into a long, fairly thin, strip (around 23cm x 40cm / 9" x 15").
Spread half of the butter mixture almost all over the dough, but just leaving a thin edge all the way round.
Sprinkle half of the chopped chocolate over the top.
Carefully roll the dough up as tight as you can, and then place the roll with the seam facing down.
Grease a dish or line an oven tray.
Using a sharp knife, cut into fairly think chunks (around 1½cm thick) and place close to each other in a buttered pan or dish (the closer you put them, the more squished they become, causing them to rise up rather than spread).
Repeat the above with the second half of the dough, placing on the same tray or in the same dish as the others.
Beat an egg and wash the tops of the buns, then sprinkle some pearl sugar (if using).