- Home /
List within a list problem
Hey, So I'm trying to do a list within a list thing, which I achieved in a way. The thing is that I'm trying to merge the "Element" value with the "Step" value without any luck. Iv'e tried everything and looked everywhere, didn't find an answer, I'll be more than happy if someone could help me out with this one.
Here's the Code:
public class listTest : MonoBehaviour
{
public List<Data> Data;
}
[System.Serializable]
public class Values
{
public string id_action;
public string id_part;
}
[System.Serializable]
public class Data
{
public List<Values> step = new List<Values>();
}
21.jpg
(23.5 kB)
Comment
It's not quite clear to me what you're asking for. Are you just talking about how it's displayed in the inspector?
Answer by Pangamini · Jul 30, 2019 at 09:58 AM
Create a custom PropertyDrawer for the element of the first list, make it display the content of the inner one
Your answer
