Shia LaBeouf has admitted hooking up with Megan Fox on the 'Transformers' set.

The 25-year-old actor - who has dated Carey Mulligan and Hilary Duff - is unaware whether the 25-year-old brunette beauty was with her then-fiance 'Beverley Hills, 90210' actor Brian Austin Green at the time of their fling during filming of the movie in 2006.

Asked if Megan and Brian - who married last year after getting engaged in 2006 before splitting in 2009 and reuniting in 2010 - were together during Shia and Megan's fling, the 'Wall Street: Money Never Sleeps' actor said: "I don't know, man. I don't know. I don't know. I don't know. It was what it was."

Shia revealed people can see the "chemistry" between him and Megan on 'Transformers', which also starred Josh Duhamel, Tyrese Gibson and Rachael Taylor.

He added to Details magazine: "Look, you're on the set for six months, with someone who's rooting to be attracted to you, and you're rooting to be attracted to them. I never understood the separation of work and life in that situation.

"But the time I spent with Megan was our own thing, and I think you can see the chemistry onscreen."