When I click the parent prefab in the Hierarchy, its children (and the arrow which shows and hides children) disappear in the Hierarchy.
I’m new to Unity and I’m sure this is a feature, but after some searching, I can’t work out how to stop them disappearing.
If I switch scenes, the children along with the arrow appear again, although it’s a pretty terrible workaround.,I am new to Unity so I am sure I am just misunderstanding a feature, but whenever I click on a Prefab in the Hierarchy, its children disappear from the hierarchy (along with the arrow next to the prefab to hide and show children).
If I change to another scene and change back, they appear again (along with the arrow).
Is there any way to stop them from disappearing?
This actually does sound like a bug. I’ve never experienced that. What version of Unity are you using, and what operating system?
When you select a GameObject in the hierarchy, its children are supposed to remain visible. Does this happen with all GameObjects or only ones with a certain script? It may be that a custom editor script you’re using causes this behavior.
Create a new project, and add no scripts or assets to it. Create an empty in a new scene, and add a cube to it as a child. If it still happens there, it’s a Unity bug. If it doesn’t happen, it’s likely an editor script in your project with a bug. Editor scripts are able to delete or alter GameObjects when your selection changes, so it’s possible that one that’s improperly written is doing that.
Let me know what you find out.
Yep, I think it’s an editor script bug as I can’t seem to replicate the issue elsewhere.
It’s not my script, so tracking that down is probably out of my league at this stage (in terms of skill). But thanks for the heads up, I guess I’ll try without the script and work around it.