- Home /
Unity 2D Text Mesh disappear
Hi all, currently I am working on a project which I need to spawn a certain number of text into the scene.
I created a prefab with the Text Mesh component and another Image component as the children. Everything work fine which I able to spawn in the prefab and set the canvas as the parent.
But as soon as I proceed to the next step, which when the player press the button I need to spawn in some Image into the scene, this is where the problem happened. I created another prefab for the image to spawn and set the canvas as the parent during instantiate method. But as soon as the image spawn in, Text Mesh component from the previous prefab that already spawn in will disappear or unable to be see.
I did some debug log to retrieve the text value of the Text Mesh after the image spawn in, which the text value is still correct but just unable to be seen or display on the screen. I also tried to messing around with the Layer of the prefab but still no luck.
Please provide some suggestion or guideline.
Thank you very much.
Your answer
Follow this Question
Related Questions
Make objects invisable when they are passing through 2 Answers
I'm trying to figure out how to move the Snake with only two input keys, such as left and right. 2 Answers
UI button adding existing scrip to move 2d character 0 Answers
unity 2d: scaling sprites problem. 1 Answer
Unity 5.4 beta 0 Answers