After an extensive search, Ryan Hansen has been tapped to guest star as Drew, the male lead opposite Rebecca Rittenhouse in Real Life, CBS’ half-hour hybrid comedy pilot written/executive produced by Bad Teacher creator Hilary Winston and executive produced by How I Met Your Mother creators Carter Bays and Craig Thomas.

The pilot, written by Winston and directed by Pam Fryman, chronicles the relationship of two twentysomethings, Nora (Rittenhouse) and Drew (Hansen), who go from being co-workers on opposite coasts to working in the same office.

Rittenhouse, touted as a potential breakout star, was cast early, more than a month ago. As the search for an actor to play Drew went on, I hear an idea emerged to possibly reconfigure the series going forward, focusing on Nora and her dating life. I also hear that there will be no immediate changes, with the pilot filmed as originally written and discussions about the project’s creative direction going forward tabled until May.

To keep options open, Hansen was cast as a guest star with a potential to recur. I hear there is a possibility for him to transition to a permanent position following a potential series order, subject of availability on his part and what the producers and the network ultimately decide about the long-term future of his character.

Sony TV is co-producing with CBS Television Studios.

This marks Hansen’s return to CBS where he recurred on 2 Broke Girls. In features, he co-stars in the CHIPS movie reboot, he was in Central Intelligence and Bad Santa 2 and next will be seen in the indie Literally, Right Before Aaron, which will premiere at the Tribeca Film Festival. Hansen is repped by Gersh.