The concept of being 'transported' into the world of a storybook, video game, or novel that the protagonist is reading has, shockingly enough, been done quite a bit across multiple mediums. Typically, the protagonist of the anime or manga is transported into the body of the main character to live out the story themselves, twisting the known events however they can for their own benefit.