Is the click from the generator or from someplace else in the RV?
It could be the isolation relay between the house and chassis batteries, which in simple setups is just wired to engage when the main engine is running (by being powered by a switched circuit on the chassis). If you have 12V power only when it's on, and not otherwise, you have some open connection or fuse related to the house batteries. Check the ground and power connections there.
If it's a relay click from within the generator, I would guess there's a loose or poor connection somewhere, but the scope of the search is a bit broader: somewhere between the generator and the rest of the RV. It could conceivably also be a control wire for the remote switch (assuming you have one) shorting out intermittently.