weapon switching

so basicaly im making a simple game to test some stuff ive made and get more experience and then just continue building on it, I have five different weapons total for the player to use (a sword, a dagger, an axe, a spear, and a bow). I have them all attached to the players camera (using the first persom controller prefab) how do I make it so only one appears at a time and only that weapon can be used but the player can switch to a different weapon at any time? any help with this will be greatly appreciated.

Probably as many ways as your imagination can come up with. Here is one

// Create a var of that type on your weapons and assign them correctly
public enum WeaponType{ Sword, Dagger, Axe, Spear, Bow }

// inside the class that does the switch
public void SwitchTo( WeaponType wt )
    // I suppose they are stored in an array in WeaponType's order
    for(int i = 0; i < weapons.Length; i++) weapons*.gameObject.active = false;*

weapons[ (int)wt ].gameObject.active = true;