Quantcast
Channel: Questions in topic: "prefab connection"
Viewing all articles
Browse latest Browse all 103

Linking a prefab to another prefab in deep hierarchy using Inspector

$
0
0
I'm trying to figure out how to have some UI Screen Panels link to one another. I'm considering each screen to be a prefab, and then I've created a script that attaches on a button that will connect a screen to another screen. In this way the user will be able to advance through screens. The problem I'm finding is that when I drag these Panels into the scene, the prefab loses this reference. I've taken a screen shot below to indicate an example of the bolded reference (UIButton Flow Panel at the bottom right) that gets lost when the prefab enters the scene. **I suspect there is some issue with linking from deep in the object hierarchy.** I found this rather [ancient forum post][1] that suggests that such prefab-to-prefab linking only works at the top level of the hierarchy, not deep like I've done here. I've tested that and it seems to work. Is that really the only solution? I want to be clear here. I don't want prefabs to link to objects in the scene. I know that that doesn't work. I want to have a prefabs link to other prefabs so that I can organize how they're connected at the prefab level, and instantiate them or drag them to the scene at some other time. ![alt text][2] [1]: http://forum.unity3d.com/threads/8101-Showing-deeper-nested-levels-in-Prefabs-(project-view) [2]: http://i.imgur.com/EPV7pcV.png

Viewing all articles
Browse latest Browse all 103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>