Jump to content

Child prefabs not appearing


tjheldna
 Share

Recommended Posts

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

  • Upvote 1
trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

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.

Stop toying and make games

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 sleep.png

 

Ask Josh to make some parts of the engine open source like Unity is doing, and put in it the prefab system tongue.png

Stop toying and make games

Link to comment
Share on other sites

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.

  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

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!!!

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

  • 3 months later...

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).

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...