I’ve been trying to solve this problem for a couple of days now, Im working in an inventory System.
1.- The name ‘ItemType’ does not exist in the current context
And the main one:
‘ItemHandler’ is a ‘type’ but is used like a ‘variable’
I think if I solve this one I will solve the other.
(The line of //Items Start is using another class) just pointing out.
Here’s the code:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Items : MonoBehaviour
{
public List<ItemHandler> itemsList = new List<ItemHandler>();
private Texture2D item1Icon;
private Texture2D item2Icon;
private Texture2D item3Icon;
void start()
{
//Icons start
//This loads the Icon Information
item1Icon = Resources.Load("Icons/Wood_Icon") as Texture2D;
//Items Start
itemsList.Add(ItemHandler(1, item1Icon, "Wood", "A wooden Log description", false, ItemType.Material));
}
}