- Home /
how can i show multiple items in one item slot in "List<>"
i need a list that shows multiple items in one item like List> list;
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Yonal · Jul 06, 2019 at 05:50 AM
Found the answer
 using System.Collections.Generic;
 using UnityEngine;
 
 public class listinsidelist : MonoBehaviour
 {
     public List<pref> list;
 }
 
 [System.Serializable]//this line is important it will show your items in inspector
 public class pref
 {
     public string value1;
     public string value2;
     public string value3;
     public string value4;
 }
Or if you need list inside a list using System.Collections.Generic; using UnityEngine;
 public class listinsidelist : MonoBehaviour
 {
     public List<pref> list;
 }
 
 [System.Serializable]
 public class pref
 {
     public List<object> ListInsideList;
 }
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                