So I’m using Serialize on classes that I want to appear in the inspector. But for some reason when I enter a value for a certain field in the inspector it doesn’t save when I press play.
[Serializable]
public class Items{
public int cost;
public string itemName;
}
public test : Monobehavior {
public Items potion;
Debug.Log (potion.itemName);
// this shows up as blank
}