Hi
I'm trying to organize my variables into groups by making a serialized class and then using them in another, but it gives me errors saying the variables I declared in the serialized class don't exist. Here's the code I'm using
[System.Serializable]
public class DisplayOptions
{
public bool ViewInGame = false;
public bool ViewInEditor = false;
}
public class NewGameObject : MonoBehaviour {
public DisplayOptions displayOptions;
protected void Update()
{
GetComponent().enabled = ViewInGame;
}
}
↧