Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Inspector Nested Scriptable Objects

Discussion in 'Open Projects' started by Sangemdoko, Nov 1, 2020.

  1. Sangemdoko


    Dec 15, 2013

    Since we are going to use a lot of scriptable objects (events, state machine, etc..) I was thinking we should probably add a custom inspector / property drawer to view & edit scriptable objects within an inspector they are referenced in. Something like this:


    I was writing my own implementation but then thought people must have implemented that before.

    So here are some solutions I found:

    What do you think should we use one of those solutions, make our own, or do something else completely different?

    EDIT: One of the main hurdle is overflow exceptions when there is a loop of objects referencing each other. We could fix that by limiting the number of nested inspectors to 1, 2 or 3 (I doubt more would be useful)
    Last edited: Nov 1, 2020
  2. Neonage


    May 22, 2020
    Peek solved this problem very elegantly with this little popup:

    We can make similar thing to be by default and also have [Inline] attribute for some special cases :)