I feel like certain parts of Unity being built on old tech has been worse off in the long term than if a new tech stack was made.
We are definitely in agreement about that, but it’s hard to judge that before the work is completed. Sometimes you rewrite from scratch and you end up with a system that fixes the original jank, but introduces another class of jankiness.
And obviously, I’m coming at this problem from a UI perspective, where SerializedObject
/SerializedProperty
is but a small part of what we use in our own tech stack. I would definitely welcome any improvements on the base layers, and we try to make some whenever possible. It is however, far from my area of expertise and I’d prefer to stay focused on UI.
We did decide to start completely from scratch when we implemented the runtime bindings instead of enhancing the editor bindings and, in hindsight, I think that was a very good decision. I was able to convince all stakeholders that it was the right decision, which is much easier when the existing solution is more or less a black box. I doubt I would be able to do the same for rewriting a base layer of Unity.
For example, limitations such as not being able to make a serialized object out a non-UnityEngine.Object
asset, or automatic drawing of non-serialized fields? These are probably the two most egregious limitations of the old system that come to mind.
Yes, and that is because the inspector framework and overall editor workflows is directly seated on top of the serialization. I would much prefer if the two were separate, but there again, it’s a huge undertaking.
Next most painful is not being able to declare a drawer for a collection[…]
Good news, you should now be able to using PropertyAttribute.applyToCollection.
On that note, I do have to ask if you have used Odin?
I used to when I was working on games. It’s a great plugin! And unironically, Odin existing, and being a verified solution, probably makes it harder to convince everyone that we should stop doing x and y feature to do this refactor.
And I understand I made the UI Toolkit/IMGUI comparison but I don’t think a new SerializedObject system would be that disruptive in the long run.
That depends on what you want to get out of that new system. If it’s only a better API on top of the serialized data, than yeah, it might not be too much. But if you want to display non-serialized fields and properties while still retaining undo/redo during edition, then it’s already a lot more complicated and we would need to change a lot more things than SerializedObject
/SerializedProperty
.
Honestly, I agree with most of your points and I’d love to see it happen. That being said, our list of priorities is not short.