Hi everyone, this seems pretty basic stuff, but I can't seem to get it to work for the life of me so I hoped maybe someone could show me the silly little thing I'm doing wrong to fix it.
I want to build a doubly-linked-list of GameObject nodes that can be placed in the world. Each node has a next node, and a previous node. When I set an objects "Next Node" or "Prev Node" I want both objects to automatically point to each other (the user shouldn't have to go and change both nodes to correctly point to eachother). I can do this by hiding my NextNode and PrevNode members behind accessors, like so:
Now, I do want these nodes editable in the inspector. No worries, I can write an editor script. So I do:
But here's the problem, I'm expecting this (look at the highlighted Test)
But what I get is this:
Now I've seen other questions on the forums that ask this question too, and people recommended a TextField? But that's not really what I want here. Surely this is a reusable component right? How did the Unity developers do it?
Thanks for your time,
It seems that the
In the mean time, you can work around it by using a
First of all, note that you have to make your variables serialized in order for them to be stored. All
Now, use a PropertyField to show the object field:
I have confirmed that to work fine. The scene objects are displayed.
Note that using