Director and screenwriter James Gunn says he had "one of the most fun times" of his life, while directing iconic comic-book writer Stan Lee's Marvel cameos.

The 46-year-old filmmaker has revealed that Lee was so good that he kept giving him lines irrespective of knowing the fact that he only had a cameo in all Marvel films, reported Entertainment Weekly.

"There are few people in this world I love and admire more and have more fun with than Stan Lee. If I'm writing for Stan, why give him one line when I can give him a thousand? I just kept throwing lines at him one after the other, until we were all doubled over with laughter," Gunn said.

While Doctor Strange director Scott Derrickson earlier said Gunn had directed the next four Marvel cameos of Lee, the Guardians of the Galaxy Vol 2 director is unsure about it.

"To be honest, I think I only did 'three' cameos one was shot by someone else. And my third probably isn't what you think it is...," he said.