Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class OrderArray : MonoBehaviour
- {
- List<Order> orders;
- public class Order
- {
- public string company{ get; set; }
- public string date{ get; set; }
- public int quantity{ get; set; }
- public string deliverdate{ get; set; }
- }
- void Start()
- {
- orders= new List<Order>();
- orders.Add(new Order
- { company = "Woodpecker Corp",
- date = "21.11.2014",
- quantity= 250,
- deliverdate= "29.11.2014" });
- // To access the Data in the list Im using:
- Order order1= orders[0];;
- Debug.Log(order1.company)
- }
- public class menu : MonoBehaviour
- {
- OrderArray orderarray;
- Orderarray.Order orderclass;
- void start()
- {
- orderarray= gameObject.GetComponent<OrderArray>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement