- Home /
Sprite Shape completely incorrect in build.
I am stumped.
I am building an infinite runner type game, similar to Alto's Odyssey, and am using the Sprite Shape package to generate terrain. The script will instantiate a pre-made sprite shape, and will then set new spline points according to Perlin noise.
Due to performance optimizations, I don't want to generate one giant chunk of terrain (Sprite Shape will also not allow you to), which is why I generate chunks of terrain at a time.
The player object will call a function to generate additional terrain based on what piece of terrain it is on at the moment, but will also always generate 1 piece of terrain for the start which will always stay there. I should mention: I have never used Sprite Shape before so I am completely new to this.
In the editor, everything works perfectly, it generates the first piece and all additional pieces of terrain perfectly:
But in my build, the Sprite Shape seems to use incorrect coordinates for generation and looks like this:
I have determined that the origin point of the Sprite Shape is set at the wrong location, and thus messes up all consequent pieces of terrain (which don't generate btw, but I'll figure that out later).
I'm pretty confused about how something can change in the code that causes it to mess up when building rather than in the Editor. No changes are made between building and it running in the Editor, so logically it would give the same results?
Please let me know if anyone has any insight on this.
Your answer
Follow this Question
Related Questions
2d Spaceship editor? 0 Answers
Why is my sprite missing after building the project? 1 Answer
Assigning a Sprite to a Script and creating a Gameobject out of that sprite 1 Answer
Textmesh Pro Sprite Flipping Upside Down 0 Answers
Unity Build doesnt work as intended but in the editor, it works perfectly!!! 0 Answers