Search Issue Tracker
Won't Fix
Votes
2
Found in
5.4.1f1
Issue ID
834056
Regression
No
Camera renders every object instead of the specific layer object
Reproduction steps:
1. Open the attached project in Unity
2. Open the Bug Example scene
3. Select the Default Camera gameObject.
4. In Camera Preview observe that it shows all of the Canvas objects, while some of them have different layers than the Default Camera gameObject
5. Select the Camera1 or Camera2 gameObject and observe that they don't display Canvas objects with respective layers.
Expected result: Default Camera, Camera1 and Camera2 only render those objects, which are on their layers.
Actual result: Default Camera renders all images, even if some of them are on different layers.
Workaround:
1. In the Hierarchy, create three Canvas gameObjects;
2. Attach UI images to each of them;
3. Change their layers to Default, Camera1 and Camera2;
4. In the Inspector, set Render camera to particular camera, which has to render the image.
5. OR open the attached project https://fogbugz.unity3d.com/default.asp?ixAttachment=152528&pg=pgDownload&pgType=pgFile&sFilename=UIRender.zip
The bug could be reproduced on 5.2.4f1, 5.3.6p5, 5.4.1f1 and 5.5.0b4 Unity versions.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
nitz
Dec 12, 2016 13:24
Still reproducing in 5.5.0p1.
Fastgamedev's summary is spot on.
I'm also seeing the behavior with the canvas set as a world space canvas.
fastgamedev
Nov 27, 2016 00:46
I am reproducing this in 5.4.3f1.
To summarize the bug succinctly, - GameObjects inside Canvas ignore their own layer settings and use Canvas' layer setting.
(Camera is set to Screen Space.)