/*// Update is called once per frame
     * void Update () {
     *
     * }*/


    public void SetReagent(string name, GameObject r)
    {
        nameReagent.text = name;

        prefabReagentPot = r.GetComponent <ReagentPot>();

        if (r.GetComponent <ReagentPot> ().isSolid)
        {
            gameObject.GetComponent <Image>().sprite = bg[0];
        }
        else
        {
            gameObject.GetComponent <Image>().sprite = bg[1];
        }


        //Copies the ReagentClass component

        /*if (r.isSolid) {
         *      if (UnityEditorInternal.ComponentUtility.CopyComponent (r.GetComponent<ReagentsBaseClass> ())) {
         *              if (UnityEditorInternal.ComponentUtility.PasteComponentValues (prefabReagent)) {
         *              }
         *      }
         * } else {
         *      if (UnityEditorInternal.ComponentUtility.CopyComponent (r.GetComponent<ReagentsLiquidClass> ())) {
         *              if (UnityEditorInternal.ComponentUtility.PasteComponentValues (prefabReagent)) {
         *              }
         *      }
         * }*/
    }
    /// <summary>
    /// Adds the reagent to inventory.
    /// </summary>
    /// <param name="reagent">Reagent to be added.</param>
    /// <param name="r">The component info.</param>
    public void AddReagentToInventory(ReagentPot reagent, Compound r)
    {
        ItemInventoryBase item = new ItemInventoryBase();

        item.HoldItem(reagent);
        item.addReagent(r);
        addItem(ref item);
    }