public static Clothing CreateChest() { Clothing chest = new Clothing(ArmorSlot.Chest); //private string _name; string[] chestNames = new string[1]; chestNames[0] = "Chest Test"; chest.Name = chestNames[Random.Range(0, chestNames.Length)]; chest.Value = Random.Range(1, 101); chest.Rarity = RarityTypes.Legendary; chest.MaxDurability = Random.Range(50, 65); chest.CurDurability = chest.MaxDurability; chest.Stackable = false; chest.Icon = Resources.Load(CHEST_PATH + chest.Name) as Texture2D; chest.IconSprite = Resources.Load <Sprite>(CHEST_PATH + chest.Name); chest.AddBuff(GameObject.Find("pc").GetComponent <PlayerCharacter>().GetPrimaryAttribute(0), Random.Range(0, 4)); chest.AddBuff(GameObject.Find("pc").GetComponent <PlayerCharacter>().GetPrimaryAttribute(1), Random.Range(0, 2)); return(chest); }