Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Camera culling breaks in IOS build

Discussion in 'General Graphics' started by ScuffedCD, Apr 17, 2022.

  1. ScuffedCD

    ScuffedCD

    Joined:
    Feb 4, 2020
    Posts:
    41
    I set up cameras to exclude certain GameObjects from receiving post-processing effects. In scene view everything works fine, but once I build to IOS it breaks.

    The overlay camera renders the "No Bloom" layer, while the Base (main) camera renders everything except for that layer.
    - The sprites in the background are NoBloom, while the player, road, obstacles, etc are all on default layer
    - The sprites are located very far behind the other objects
    - In editor and game view, the sprites render correctly: Behind the rest of the game with no post processing
    - Once I build to IOS, the NoBloom sprites are rendered ontop of the rest of the game, as if they are UI

    Here are my problems:
    - Why does the camera culling work correctly in Scene/game view, but once I build to IOS it breaks?
    - Based off what the documentation says, the overlay cameras render their layers ontop of the base camera. If this is true, it makes sense that the IOS build is broken, but then why does Game view work?
    - Is it possible to make the overlay render behind the Base camera. Or even better, have these cameras render based on actual location and sorting of GameObjects

    Referring to the last problem, how would I handle this: I have an object being rendered with Bloom, along with an object infront and behind of it without Bloom. Currently it just renders the NonBloom objects ontop of the middle one, but how would I make it correctly render them in order?

    Also, I am using URP and Cinemachine if that matters.
     
  2. ScuffedCD

    ScuffedCD

    Joined:
    Feb 4, 2020
    Posts:
    41
    Bump and Update: Tested the exact same build on Windows & IOS. Cameras render correctly on Windows, but completely break on IOS. Anyone know if theres some sort of IOS setting that messes with camera culling and layer rendering?