Search Unity

Custom inspector in Custom inspector?

Discussion in 'Editor & General Support' started by artman41, Nov 22, 2017.

  1. artman41

    artman41

    Joined:
    Jun 18, 2016
    Posts:
    5
    The situation I currently have is that I have already made a custom inspector for a class, we'll call it SUB, because I had an array of it in another class, we'll call it MASTER.

    Now, I want to add a button to the inspector of MASTER, meaning that I need to write a custom inspector for it, which is not difficult.

    However, when I come to the point of iterating through the array, I'm stuck as to how to add an object field to represent SUB wherein it can retain its custom inspector.

    Anybody got any thoughts?

    The closest I've come is drawing the default inspector and adding a button underneath, which is fine for now but if I desperately need a custom inspector, this method isn't going to cut it.