WebGL Build Changing Game Object Positions
Hi all, I am having trouble with a WebGL build and I have yet to find a solution on here. I have been working on a 2D platformer that I recently posted a WebGL build of to github which is accessible via github io (link is here if you are interested in viewing this build firsthand: https://rossstarific.github.io/csc470-fall2020/WWAGMO/web/).
Here is a screenshot of the game in the game view in unity (I recently moved the little enemy to the platform, so its not in that location in the build):
Looks great, definitely no objective problems with this image (although, please give any feedback you have on artwork and I'll be sure to pass it on to my team).
Here is a screenshot of the build when I open the github io link:
As you can see, the objects in the background (the mountains, clouds, far background, and eye sun) are all moved to the right. My guess is that this has something to do with the parallax scripts I am using, but I have no idea what the exact problem is. I found the scripts from an instructional video by the creator of Pinstripe that he found on another post. The purpose is so that I can keep the camera set to orthographic and not have to worry about z positioning. The scripts are at this link: https://answers.unity.com/questions/551808/parallax-scrolling-using-orthographic-camera.html (NOTE: I have separated the two scripts shown into three scripts: ParallaxCamera, ParallaxBackground, and ParallaxLayer).
Each of the purely aesthetic foreground, midground, and background elements are separate layers used with the ParallaxLayer script to set specific values for the speed at which they scroll. The level (i.e. the interactive elements like the platforms and ground) do not scroll at all and are not supposed to, so they don't have any parallax scripts attached to them. This is what is leading me to the conclusion that these scripts must be the cause. However, I'm not entirely sure because they work perfectly in the unity editor game view.
Please help! I will provide any further information if necessary. I have googled all over the place and I haven't found anything yet, so this is a last resort effort to get this working. Thanks guys, hope y'all can help me out!
Your answer
![](https://koobas.hobune.stream/wayback/20220613014750im_/https://answers.unity.com/themes/thub/images/avi.jpg)