Editor Extension Scripting

Hey guys!

Got a simple question, I’ve just been learning how to extend the Editor for Unity and it’s actually a lot easier than I thought.
Got a problem… what I have managed to do is create an Editor which makes a list and populates that list with multiple values using a Struct.

public struct Data
{
public int maxTime;
public int Damage;
}

public ArrayList DataList

Now everything works on that end, I’m able to use the editor to add values into the list so that I can use them for later use, however what I’m trying to do is take that finished list and add to a game object while still in the Scene View, so rather than save that file externally (which you would do to load for future reference) and then load that file at runtime and decipher the values in the game, I want to be able to implement these values on to another list in an active game object in the scene (GameController). So that I can just load the game and not need to decipher the values while in the game.

I managed to actually do this to another GameObject by making the variables public and accessible via the Unity Editor, however that only seemed to work with simple data structures like float, int, vector. When I try it with a list, there’s no hope :(.

Any help would be greatly appreciated.

For anyone who actually who has the same problem or something similar. I found out that in C#, what you can do is serialize a class to have it show in the Unity Inspector.
So to solve this problem instead of using a struct, I used a class and then serialized, and it appeared in the Unity Inspector with the variables included as well.

[System.Serialize]
public class Data
{

     public int maxTime;
     public int Damage;

}

public class Object extends MonoBehaviour
{

     public List<Data> DataList;

}