Hold on. In the last few years, some scientists studying consciousness have been working on a promising hypothesis called Attention Schema Theory (AST). (Note: I wish scientists would stop using "theory" inappropriately: how can we expect the public-at-large to understand science doing such?)
The AST covers a lot of ground, from simple nervous systems to simulations of self and others.