Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Layers pbs when culling with 2 cameras

Discussion in 'General Graphics' started by ERisine, Aug 10, 2017.

  1. ERisine

    ERisine

    Joined:
    Mar 3, 2017
    Posts:
    7
    Hi guys,

    not sure it's the right place for this, but here it is :
    I have 2 cameras, each rendering one different canvas (one in a rendering texture):
    Say, canvas1 with layer1 and canvas2 with layer2.
    But I want that some children objects of canvas1 to be rendered in cam2, so I set those objects layer to layer2.

    But it does not work, layer2 objects of canvas1(layer1) are still rendered in cam1, not cam2.
    Is it a bug or something I missed?
    Is there some workaround to this problem?

    Thanks!
     
  2. ERisine

    ERisine

    Joined:
    Mar 3, 2017
    Posts:
    7
    Ok, I found a (the) solution to this particular pb, for those having the same problem :
    The children of Canvas1 with Layer2 must ALSO have a canvas component attached to them. This way, these children (and their children too) will be properly rendered on Camera2.
     
  3. ERisine

    ERisine

    Joined:
    Mar 3, 2017
    Posts:
    7
    Ok,
    That solution works but only with a world camera, not with a screenspace camera.
    If someone has a solution for screenspace camera...
     
unityunity