WEBVTT 00:00:00.500 --> 00:00:02.993 Layers are used to indicate some functionality 00:00:02.993 --> 00:00:05.815 across many different game objects in Unity. 00:00:06.465 --> 00:00:09.820 For instance, layers can be used to indicate 00:00:09.820 --> 00:00:11.820 which object should be drawn in the 00:00:11.820 --> 00:00:14.436 scene view, should ignore raycasts, 00:00:14.436 --> 00:00:16.813 or are invisible to the camera. 00:00:18.013 --> 00:00:20.502 Here we have a scene with 2 orbs in it. 00:00:21.069 --> 00:00:24.897 We can see that both orbs are on the layer Default. 00:00:26.530 --> 00:00:29.671 If we wanted to change the layer of 1 of the orbs 00:00:29.671 --> 00:00:32.555 we could click the Layer drop-down in the inspector 00:00:32.555 --> 00:00:34.555 and select a new layer. 00:00:35.373 --> 00:00:37.878 We can see that this orb is now on the 00:00:37.878 --> 00:00:39.878 Ignore Raycast layer 00:00:39.878 --> 00:00:43.499 and will not be hit by any raycasts that pass through it. 00:00:44.902 --> 00:00:48.296 We also have the ability to define our own layers. 00:00:48.296 --> 00:00:52.415 We can do so using the Tag And Layer Manager window. 00:00:53.026 --> 00:00:56.144 To access the tag and layer manager window 00:00:56.144 --> 00:00:59.843 either select Add Layer from the Layers drop-down 00:01:01.093 --> 00:01:06.248 or click Edit - Project Settings - Tags And Layers. 00:01:07.748 --> 00:01:10.432 Here we can see all of the built-in layers 00:01:10.432 --> 00:01:12.432 as well as add our own. 00:01:13.182 --> 00:01:17.195 Let's create an Ignored By Camera layer. 00:01:18.292 --> 00:01:20.292 We can place our other sphere 00:01:20.292 --> 00:01:22.292 on this newly created layer 00:01:22.292 --> 00:01:27.586 by selecting it and choosing the New Ignored By Camera layer 00:01:27.586 --> 00:01:29.586 from the Layers drop-down. 00:01:30.600 --> 00:01:33.143 This sphere is now on the 00:01:33.143 --> 00:01:35.143 Ignored By Camera layer. 00:01:36.005 --> 00:01:39.115 The layer has no inherent functionality however 00:01:39.115 --> 00:01:41.716 so let's modify our camera to ignore it. 00:01:43.557 --> 00:01:47.041 In the Culling Mask property of a camera 00:01:47.041 --> 00:01:49.745 we can select which layers are seen by the camera 00:01:49.745 --> 00:01:51.745 and which are not. 00:01:52.515 --> 00:01:54.515 By clicking the drop-down and 00:01:54.515 --> 00:01:57.885 unselecting the Ignored By Camera layer 00:01:58.295 --> 00:02:00.295 all objects on that layer will no longer 00:02:00.295 --> 00:02:02.807 be visible to that camera. 00:02:04.285 --> 00:02:05.743 Let's run our scene. 00:02:06.295 --> 00:02:08.773 We can see that only a single orb appears. 00:02:09.618 --> 00:02:13.843 The other orb, the one on the Ignored By Camera Layer 00:02:13.843 --> 00:02:15.843 is not rendered to the screen. 00:02:16.972 --> 00:02:19.397 We can also use layers to determine 00:02:19.397 --> 00:02:21.701 what appears in the scene view. 00:02:22.677 --> 00:02:25.320 By clicking on the Scene Layers drop-down 00:02:25.320 --> 00:02:27.897 at the top right of the Unity editor 00:02:27.897 --> 00:02:30.610 we can select and deselect layers. 00:02:31.982 --> 00:02:34.392 Doing so will cause all objects 00:02:34.392 --> 00:02:36.517 on those layers to disappear.