- Home /
Question is no longer necessary as the bug was fixed by the user
2D SpriteRenderer not becoming disabled in Build but will work in Editor
Hello, The sprite I'm using is a animation of the player character teleport to the next level. It's is own sprite and it's only to appears and plays it's animation then the next level loads. I don't know if this is something caused by my code or something with Unity I've never came across this before.
This is my code it's in the Start()
this.mySpriteRenderer = GetComponent<SpriteRenderer>();
this.mySpriteRenderer.enabled = false;
After that I have a OnTriggerEnter2D() where I make the mySpriteRenderer enabled true. Thank You.
O$$anonymous$$ I fixed the Issue I was having. I just had to delete the old sprite an place a new one in the scene with the animation and script on it rebuilt it and it worked I guess it was something in the editor.
Follow this Question
Related Questions
My sprite does not change 1 Answer
Distribute terrain in zones 3 Answers
How to nine slice a 2D SpriteRenderer? 0 Answers