Support for LinkedLists in standard product

Issue #93 resolved
Former user created an issue

Hi,

Is it possible to add support for LinkedList<T> in your standard product? I see the attached message when using LinkedLists.

I have a use case where only a LinkedList will suffice. Unfortunately, that use case is my main job dispatcher for my AI, and I would love to be able to view the LinkedList the same way I could a regular List.

Thanks, Geoff

Comments (3)

  1. Bjarke Elias
    • changed status to open

    Linked is definitely something we want to add support for. But we can't say exactly when this will be.

    For now you could do something like this, if you simply wanted to view and edit the nodes of the linked list:

        [SerializeField, HideInInspector]
        private LinkedList<Job> Jobs;
    
    #if UNITY_EDITOR
        [ShowInInspector]
        [LabelText("Jobs")]
        [ListDrawerSettings(IsReadOnly = true)]
        public List<Job> ShowJobsInInspector
        {
            get
            {
                if (this.Jobs == null)
                    return null;
    
                return this.Jobs.ToList();
            }
            set
            {
                // Prevents it from disabling GUI
            }
        }
    #endif
    
  2. Geoff Dupuis

    That's great. Viewing is all I care to do at the moment, so I'll try this when I get home tonight. Thank you for your help.

  3. Tor Esa Vestergaard

    Full support for LinkedList<T> (and indeed anything that implements ICollection<T>) will arrive in Odin 1.1.

  4. Log in to comment