Search Unity

Bug Camera stack in URP causes 2d lights to behave incorrectly in Unity 2021.2.0f1-2021.2.8f1

Discussion in 'Editor & General Support' started by bioticste, Jan 18, 2022.

  1. bioticste

    bioticste

    Joined:
    Aug 11, 2014
    Posts:
    37
    When using a camera stack in URP with 2d lights in Unity 2021.2.0f1-2021.2.8f1 the 2d lights behave incorrectly. In the Scene View they appear correctly positioned but in the Game View they are wrongly positioned even though their transform values are no different. When playing the game 2dlights do not move with their parent objects. You can check out a project I created in Unity 2021.2.8f1 to demo this issue on GitHub here: https://github.com/BKDSte/unity-202128f1-CamStack2dLightBug/tree/main/Bug.

    I have uploaded images showing the correctly positioned 2d lights in the Scene View and wrongly positioned 2d lights in the Game View when not in play mode and when in play mode. The issue only occurs when there is a camera stack. In the GitHub demo you can turn on and off various types of camera to see how they affect the issue. Both static and follow cameras without a stack display 2d lights correctly but static, follow and Cinemachine follow cameras with stacks display 2d lights incorrectly.

    This issue was not present in Unity version 2021.1.28f1. We really need a fix for this as Unity 2021.1.28f1 will be too old of a version to submit to certain platforms by the time our game is ready for launch.

    I have submitted a bug report via Unity (Case 1395949).

    Thanks for your help.

    Please disregard the thread (https://forum.unity.com/threads/2d-lights-not-moving-correctly-with-parent-transform.1226196/) I created yesterday as after further research I have found more info about the problem and this thread describes it better.
     

    Attached Files:

    Last edited: Jan 18, 2022
  2. bioticste

    bioticste

    Joined:
    Aug 11, 2014
    Posts:
    37
    Just to keep anyone informed who may be experiencing this bug. Unity responded to my error report and said they are aware of the issue which can be tracked here: https://issuetracker.unity3d.com/is...erlay-camera-is-moving-in-the-wrong-direction.

    They said it is fixed in URP 13.1.0 which is currently in Unity 2022.1.0a13 and above. Hopefully the fix will make its way into Unity 2021 but if not I'll have to wait until the official stable release of Unity 2022 before updating the project.
     
  3. banjolasse

    banjolasse

    Joined:
    Feb 13, 2016
    Posts:
    11
    Would very much like to see this fix make it into the 2021 LTS. Stacked cameras are really unusable until then.