- Home /
Often when loading level the Layers i have on gameobjects reset to default. Please help?
Hi, I need some help again, not sure why this happens, worried it might be a unity glitch.
Anyway I generate random levels and often now the layer tags all reset to default and my level doesn't complete itself properly. Can still play it but none of the objects layers have their correct tags.
I was wondering if that's a bug in unity. It works well when it doesn't do that. Its not my generator. I'm not changing or resetting the tags anywhere myself. I wonder why its doing that and how I can get around it. Cause without those layer tags being right my level doesn't completely finish generating everything and I can't jump up walls or anything special.
Would someone know whats going on?
Answer by Kastenessen · Jan 25, 2015 at 01:55 AM
Solved it myself by doing this with everythig I spawn:
layerSet = (GameObject)Instantiate (wallBottToSpawn, new Vector2 (transform.position.x, transform.position.y - 1), Quaternion.identity);
layerSet.layer = 12;
Your answer
Follow this Question
Related Questions
Two Objects in the same position? 0 Answers
How to find one object in specific layer? 1 Answer
Right Click to Ignore All But Terrain, How? 1 Answer
Project branching into two separate projects that share no dependencies 1 Answer
Head shoot and body shoot not working with realistic fps characterDamage 0 Answers