Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Grouping variables in inspector with a serailized class not working

$
0
0
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; } }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>