My GameObject goes invisible after I edit it in the inspector
Hello creators! I've been working on fixing this problem for a while now and finally decided to post something on the forums.
So I have a parent GameObject with a sprite under it. I am able to run the game a few times but when I want to edit the scale, layer, or anything in the inspector, the sprite goes invisible. It is still in the game it just isn't visible. I can see it selected in the scene and game tabs but I can't visibly see it. I have looked at the layers tab, checked the z coordinate, and even tried to redo the entire project but nothing worked. PLEASE HELP!!!!
Answer by tormentoarmagedoom · Aug 08, 2018 at 07:50 AM
Did you check the "Order in layer" property in the inspector?
With Canvas elements, like sprites, you can "decide" the order of them (which goes in front, wich goes behind).
Check that!
Bye!
Answer by Mancool101 · Aug 08, 2018 at 02:38 PM
Unfortunately, that didn't work. I should have mentioned that when the game starts it makes a clone of the Parent GameObject. I looked at the clone and instead of being invisible it is actually just disabled. Which is weird because before I touched anything in the inspector, the clone was enabled anytime that I ran the game. Is there some code that I can add to the script to fix this or is there something in the inspector that I need to fix.
Your answer
Follow this Question
Related Questions
Adding and swapping weapons in 2D rig animations 0 Answers
Sprite facing the wrong way while not moving,Sprite facing the wrong way when not moving 2D 0 Answers
How to change lowest Y-point? 0 Answers
When moving from main scene to new scene player character disapears 2D 0 Answers
Game (2D) not rendering at all 2 Answers