In our project we have ended up with a couple of monolith scripts. Our PlayerMover is one of them.
It contains 100+ fields in the inspector containing info such as drag, turnspeed, arrays of raycast start points and so on… It’s messy, but we have managed so far.
HOWEVER: After upgrading from Unity 2020.3 to 2022.3.62f1 the inspector randomly stops drawing the property fields of our PlayerMover. Sometimes it shows only the top 3 fields of our player mover. If I select another gameobject and reselect the gameobject containing our PlayerMover it might draw the top 40 fields. Next time top 62. Top 17. etc. etc. Seemingly starting from the top, stopping at a random field.
I have tried restarting my computer, assuming it was a unity fluke. It persists.
When I select the gameobject containing the PlayerMover I see the scroll bar in the inspector shrink gradually, as if loading and drawing the fields asynchronously until it stops shrinking. I don’t remember if this was instant in previous Unity versions.
So to sum up:
It appears Unity can randomly stop drawing a component’s properties. This is a big problem as it stops me from being able to work on our project.
Have anyone experienced this, and did you find a way to fix it?
Known issue. Unfortunately, 2022.3 is out of support and will receive no further updates (except for Industry customers). Your best bet is to either downgrade to a slightly earlier patch release or update to Unity 6.0.
I can’t find the discussions link right now. Not sure if this is actually a Unity 6.0 bug come to think of it.
The async thing (where the scroll bar expands) is to be expected - the new UITK default drawer spreads spawning fields over several frames to hang Unity for a second or two when you select a very large object.
First, do you have a custom editor for your PlayerMover script? I expect not, but just to make sure.
The spawned fields not showing up is unexpected. Is this accompanied by errors, or is it just silently not showing the fields?
If you open the UITK debugger (from the dropdown when you right click the inspector tab, or with ctrl+f5), does it show the missing fields as spawned, but invisible?
Finally, do you have any general purpose editor extension packages? Odin Inspector, Naughty Attributes, something like that? Those tend to override the drawer for the basic inspector, so it might be that they have some breakage caused by the latest version.
We use the standard Unity editor (no ODIN etc). We use IUnified for serialized interface references. IUnified has a custom property drawer for its fields, and it is used in PlayerMover.
Other than that, it should be pretty standard stuff.
So it seems it has knowledge of the existence of the fields, but doesn’t render/populate them properly…
I get no errors when selecting the gameobject. Still selecting it multiple times, and it stops rendering at a seemingly random field, new every time.
This is on my work laptop. RAM consumption on laptop @ 85 %. Workstation manages to render all fields consistently (although when I first opened the project today it also failed to render all fields, had to reselect the object to make it render all, has been rendering all ever since)
Note that scrolling through the fields in the inspector also feels more sluggish than before updating, even on my workstation.
@CodeSmile posted right before me and said that it’s a known issue in 2022.3.62f1. So if that’s indeed the case, try rolling back to an earlier version or update to 6 instead of 2022.
Thanks for your tip. I would really appreciate a suggestion of how far back I would need to roll back for this issue to disappear, or a strategy on how to proceed to figure it out myself.
Or at least if you could guide me to some documentation of this being a known issue that would be really nice.
Btw: The project in question is for a released game title, and I would prefer rolling back instead of updating to unity 6, as my last attempt at updating to unity 6 completely messed up the project.