Heat oven to 350° F. In a large ovenproof skillet, over medium heat, melt the butter. Add the sugar and cook, stirring constantly, for 1 minute. Remove from heat. Arrange the pineapple slices in a single layer in the skillet. Top each slice with half a bun, cut-side down. Bake for 30 minutes. Let cool 5 minutes. With a spatula, invert each cake onto an individual plate. Serve with the ice cream, if desired.