Search Unity

Parallax background not working on mobile

Discussion in '2D' started by blastedw, May 18, 2019.

  1. blastedw

    blastedw

    Joined:
    Apr 29, 2019
    Posts:
    13
    Hi all,

    I have a Scene where I added 4 backgrounds to be used as parallax. The backgrounds are empty game objects to which I added the relevant sprites. The sprites were copied multiple times to spread along the x-axis of the Scene.

    I then added the ParallaxElement script to each Background game object and ParallaxCamera script to the camera. The Background game objects have a scale greater than 1(2 or 2.5) because the textures themselves are somewhat small.

    When I move the camera in the Editor, I can see the parallax Background working fine in the Game tab. It also works fine when I run the Scene in the Editor.

    However, when I create the APK and run the game on mobile, the Backgrounds are fixed. There is no parallax whatsoever.

    This is not a Problem with the Corgi-Engine and I didn't modify the scripts. It's the vanilla asset as downloaded from the store. But I was wondering if someone encountered such an issue or Maybe even has a fix for this.
     
  2. mistaluai

    mistaluai

    Joined:
    May 10, 2020
    Posts:
    3
    Same Here
     
  3. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Is ParallaxElement and ParallaxCamera something that is part of Corgi specifically? I don't recall this in any Unity API that I'm familiar with, but could just be a result of me being behind on something. I did see some parallaxing in Cinemachine, is that what is being used to achieve the effect?