# Best way to manage weapons as GameObject on a script in Unity with C#

I have a player game-object with a script Player. In the Player script I have a public properties weapons.

I want to have to just drag in this properties a script/prefabs. And the Player script must can get the properties of the weapons selected.

For example: imagine, we have two weapons, one is a pistol with 5 attack power, the other is a knife with 7 attack power.

Now I want to set pistol in the Player script.

What should I drag here ? A game-object with a weapon script ? Or a weapons script who instantiate a weapon ? Or maybe an another solution ...

The idea is to be able to create easily some weapons without scripting more. Just place a sprite, and modify some properties.

You can always just stuff all weapons in one big list and access them with an index.

[System.Serializable]
public class Weapon
{
public string name;
public float damage;
}

[System.Serializable]
public class Player
{
public Weapon[] weapons;
public int currentWeapon;
}

public Player player;