AMGroup.cs 568 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. [Serializable]
  5. public class AMGroup : ScriptableObject
  6. {
  7. public void init(int group_id = 0, string group_name = null)
  8. {
  9. this.group_id = group_id;
  10. if (group_name == null)
  11. {
  12. this.group_name = "Group" + Mathf.Abs(this.group_id);
  13. }
  14. else
  15. {
  16. this.group_name = group_name;
  17. }
  18. }
  19. public void destroy()
  20. {
  21. UnityEngine.Object.DestroyImmediate(this);
  22. }
  23. public string group_name;
  24. public int group_id;
  25. public List<int> elements = new List<int>();
  26. public bool foldout = true;
  27. }