Hold on a second, I couldn't remember/fully interpret what happened at the end of the game. Unicorn, I agree, he did die.
I finally remember now! The explosion of the ultimate machine took the secret base with it, so Shauna, Calem/Serena and the player have to run out just in time before it...