I’ve been trying for a while now, but the children components don’t seem to line up properly when I try to mimic the same properties they have when I place it in the hierarchy. As such, I think it’s a bit quicker to simply ask if there’s a prefab of the dropdown box somewhere in the built-in assets and how to access it. I mean, I COULD make a prefab of one I made in the hierarchy, but that seems a little… Tacky. I’d rather not do that if I can avoid it.
Why? Seems perfectly reasonable to do Create > UI > Dropdown, style it the way you want, and then turn it into a prefab that can be reused…that’s sort of what prefabs are for after all ![]()
If I was doing something different with the dropdown maybe, but I’m not. Apart from the options it has and the handle for onValueChanged, I don’t need anything different for the dropdown. I mean, the premade dropdown Unity gives you when you call it from the hierarchy has to come from somewhere, right? That should mean there’s should be a good chance there’s a prefab for it in the built-in resources, shouldn’t it? It just feels like there’s something about making a prefab of the default dropdown that’s… Unnecessary.
Yep, it comes from
It’s not a prefab that you just pull out of a folder.
So when you create a dropbox in the hierarchy it creates it from that script and not a prefab? So I’m going to actually have to create a dropdown prefab after all?
That is correct. Objects that are in your scene connected to a prefab have blue text and you’ll also notice the Prefab part in the inspector (you’ll see it under that tag and layer parts at the top). That’s how you’ll know there is a prefab connected to it.
So you just have to make your own.