A camera system has an optical unit having an image-taking optical system and a camera main unit to which the optical unit is detachably attached. The camera main unit has a detection section which detects attachment and detachment of the optical unit; a data processing section which has two or more modes including a shooting mode for obtaining image data; a mode setting section which sets a mode according to an operation; and a mode switching section which switches a mode to a mode other than the shooting mode thereby entering a standby state when detachment of the optical unit is detected by the detection section during the shooting mode being set by the mode setting section, and which switches a mode back to the shooting mode when attachment of the optical unit is detected by the detection section during the standby state.