- Home /
List of non-MonoBehavior objects exposed to editor
Hello,
If I make a C# class
public class Foo { public int p; }
And a script with a list of this class exposed
public class script : MonoBehavior { public foo[] foos; }
It does not show up in the Unity editor to be populated with data,
I can have foo inherit from MonoBehavior, but now the class has to be placed into an entire object before it is accepted.
How can I go about this?
Comment
Best Answer
Answer by asafsitner · Oct 05, 2012 at 08:39 PM
Try to add the Serializable tag to your class.