|
When I instantiate a prefab, I've noticed that some parts of that object do not render. When the same prefab is dragged onto the "Hierarchy" tab, the object (and any associated rendering components) render as expected. Why is this? I instantiate the prefabs like this:
In this case, "Waypoint" is the name of the prefab. Thanks in advance!
(comments are locked)
|
|
Is this in the editor or in a build? If it's in a build then possibly the asset hasn't be included into the build as there's no visible link to it. A way to force resources to be included in a build is adding a gameobject with a simple script that has all these resources attached (script with public Transform array and in inspector add all Prefabs to it). If it's in the editor then there's something else bothering you, guess it's debugging time. Add a Debug.Break() after the statement and look if you see anything weird in Hierarchy, Scene and Inspector about the created object. So far, I've only seen this in the editor - I haven't tried it in a build.
Jan 13 '10 at 12:09 AM
james.jeffers
Ok - tried it in a build and the same problem exists there as well. I take it then there is no limitation on multiple renderer components in the same GameObject?
Jan 13 '10 at 12:35 AM
james.jeffers
(comments are locked)
|
|
Gah! It was the rotation of the object - it was rendering, but the surface was not facing the camera. Thanks!
(comments are locked)
|
