tjheldna Posted December 11, 2014 Share Posted December 11, 2014 If I create a prefab that has prefabs as children, then add the main prefab to the map, the child prefabs don't appear. I've tested by changing a setting and breaking the prefab connection, the child appears again. I've tested with numerous prefabs. e.g Root ->House.pfb->Fridge.pfb The fridge wont appear. Cheers 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted December 18, 2014 Share Posted December 18, 2014 Prefabs within prefabs are not supported. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted December 19, 2014 Share Posted December 19, 2014 Oh come on man . It's just some recursion. This means when we build each house configuration for our game we have to break each prefab prop we place in the house for no real good reason. 2 Quote Link to comment Share on other sites More sharing options...
Olby Posted December 19, 2014 Share Posted December 19, 2014 Nested prefabs are quite useful, I can agree. +1 Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
tjheldna Posted December 19, 2014 Author Share Posted December 19, 2014 This is really surprising and thought it was a bug for sure. Is it a possibility to make it so? [edit] Or at the very least have the prefab link broken when you run the world so it appears if it is nested. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted December 22, 2014 Share Posted December 22, 2014 This don't exist in Unity too, but they are some plugins simulating it in some way. The simplest way is to have in your scene hierarchy : - Root --------> pivot (house) ---------------> Roof.pfb ---------------------> Fridge.pfb This is the same result at final. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted December 22, 2014 Share Posted December 22, 2014 You have nested prefabs there too YouGrove so it wouldn't work. The Fridge prefab is a child of the Roof prefab and that's the issue at hand that LE can't handle correctly in multiple ways. I'm not sure what you are getting at with your comment here. With what you have listed 2 things will happen when you load the house: 1) The Fridge prefab won't have it's script's Start() function called (the work around currently is me doing what LE should be doing, which is looping over all children of the house prefab and if it has a script attached call it's Start() function) 2) The Fridge prefab won't be drawn. (the workaround currently is when we build the house prefab and add the fridge prefab we change 1 setting on it to break the prefab link which will then cause it to be draw). These both are things LE could easily do for us to save us time. That's the point we are trying to make here. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted December 22, 2014 Share Posted December 22, 2014 The Fridge prefab is a child of the Roof prefab and that's the issue at hand that LE can't handle correctly in multiple ways. I'm not sure what you are getting at with your comment here. I misunderstood the problem. So if i understand well, you have two models saved as one prefab : a parent and a child. And when you use that prefab, you don't see the child ? 2) The Fridge prefab won't be drawn. (the workaround currently is when we build the house prefab and add the fridge prefab we change 1 setting on it to break the prefab link which will then cause it to be draw). It's useless as you will loose the prefab advantages. But just not using prefabs it will work ? If it's not implement, it must be because it must not be so easy Ask Josh to make some parts of the engine open source like Unity is doing, and put in it the prefab system Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted December 22, 2014 Share Posted December 22, 2014 It's useless as you will loose the prefab advantages. Not 100%. 2 benefits to prefabs would be being able to save the assembly of something, which is still there. However, yes, the big benefit of changing the original prefab and having all those prefab instances getting those changes is gone. It's not complex to give us what we ask here. It just has to go up against is it worth Josh's time or not. 1 Quote Link to comment Share on other sites More sharing options...
tjheldna Posted January 7, 2015 Author Share Posted January 7, 2015 Hi Josh, Just wondering if these two things above are going to be added? I would like to know either way as I would hate to have to redo all the prefabs if the feature is added and I'll hold off. At the very least some sort of error/warning if this occurred as it is possible to do it in the editor. Cheers!!! Quote Link to comment Share on other sites More sharing options...
Josh Posted April 7, 2015 Share Posted April 7, 2015 Can you please be more specific? There is a long thread and then you are asking about support for "two things above". Which two things are you talking about? The prefab system itself is the source of many complexities. Nested prefabs would make things even more complicated. It is my experience that more than one level of dependencies usually causes more problems than it solves (Linux dependencies are an example of this). Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.