Matt Cain pitched just one inning in Sunday's Cactus League game against the Chicago Cubs. (AP IMAGES)

MESA, Ariz. – The games don’t count in spring training, but the risks are just as real as the regular season.

Ask the Yankees, who lost outfielder Curtis Granderson for 10 weeks after he sustained a fractured arm when hit by a pitch on Sunday.

The Giants had their own scare when right-hander Matt Cain was struck by a comebacker, but the consequences aren’t nearly as dire. Cain said he was OK after taking Alfonso Soriano’s line drive off the side of his right knee in the first inning at HoHoKam Park.

Cain hobbled around in obvious pain but made two warmup pitches and was allowed to complete the four-run inning. He said he could have returned for the second inning, but the Giants decided he’d thrown enough pitches.

Cain iced his knee and said he expected to be stiff, but did not anticipate missing his next start on Tuesday.

“Nothing to worry about,” Cain said. “It was just the initial shock of getting hit. It takes a little while to get the feeling back.”

Former Giant Nate Schierholtz complicated the situation when he hit a nubber to the right side on Cain’s next pitch.

The rest of the inning didn’t go any better. Cain missed his spot with a 2-1 fastball that Dioner Navarro hammered for a three-run homer to complete the four-run inning. All of the runs were unearned because first baseman Brandon Belt threw wide to second base for an error earlier in the inning.

This is the second consecutive spring when Cain’s reflexes were tested early. Last year, Hector Sanchez gave him a welt near the left knee with a line drive during live batting practice.

Cain said he felt fortunate after hearing of Granderson’s injury.

“You’ve got all the same risks,” he said. “Guys are sliding, doing different things. But you’ve got to play spring training and you’ve got to go full bore.