- Home /
Planes not instantiating properly on gameobject location
Hi folks, I'm currently doing a 2D mario tutorial for Unity.
So basically, I'm trying to show an image whenever mario kills a gumba. The image is a prefab sprite, built on a Plane. I'm using:
Instantiate(sign, gumbaLastPos, gumbaLastRot
)
The object appears to instantiate at the right location. However, it doesn't actually appear in the scene or game view. The clone shows up in the hierarchy, and has the right textures and properties of the prefab. However, the actual object is just invisible in the scene and game view. I can rotate and move it, but see nothing. Why isn't the prefab actually showing up, despite being Instantiated at the right location?
Answer by Dreamblur · Jun 20, 2011 at 05:05 AM
A plane can only be seen if the normal of the plane is facing the camera. Try using Quaternion.identity instead of gumbaLastRot.
Hi Dream, thanks for your reply. Quaternion.identity doesn't seem to work, still have the same result (invisible object). Any other ideas? Thanks
Hi Dreamblur, thanks for your help! It was actually an issue with my code, using transform.renderer.enabled = false. I think I've resolved it. Thanks for your time!
Answer by chenklein · Aug 11, 2012 at 06:39 PM
hi corly
im having the same poblem u had and i didnt understood haw you solved it, can you please explain?
thank you
chen