[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:01.16,0:00:03.82,Default,,0000,0000,0000,,The sprite renderer component displays images Dialogue: 0,0:00:03.82,0:00:06.38,Default,,0000,0000,0000,,that have been imported as the sprite type Dialogue: 0,0:00:06.38,0:00:09.41,Default,,0000,0000,0000,,for use in both 2D and 3D scenes. Dialogue: 0,0:00:10.11,0:00:12.14,Default,,0000,0000,0000,,The primary property of the sprite Dialogue: 0,0:00:12.14,0:00:14.14,Default,,0000,0000,0000,,renderer is sprite. Dialogue: 0,0:00:15.65,0:00:18.39,Default,,0000,0000,0000,,This is a reference to the sprite to render. Dialogue: 0,0:00:20.22,0:00:22.65,Default,,0000,0000,0000,,For more information on the sprite import type Dialogue: 0,0:00:22.65,0:00:25.14,Default,,0000,0000,0000,,please see the information linked below. Dialogue: 0,0:00:26.82,0:00:29.80,Default,,0000,0000,0000,,Colour is the vertex colour of the rendered sprite Dialogue: 0,0:00:29.80,0:00:31.80,Default,,0000,0000,0000,,and can be used to tint or recolour Dialogue: 0,0:00:31.80,0:00:33.27,Default,,0000,0000,0000,,the sprite image. Dialogue: 0,0:00:35.01,0:00:37.01,Default,,0000,0000,0000,,Colour can also be used to fade the Dialogue: 0,0:00:37.01,0:00:39.01,Default,,0000,0000,0000,,sprite's opacity by changing the value Dialogue: 0,0:00:39.01,0:00:41.01,Default,,0000,0000,0000,,of the colour's alpha channel. Dialogue: 0,0:00:42.74,0:00:44.74,Default,,0000,0000,0000,,The sprite's colour property is independent Dialogue: 0,0:00:44.74,0:00:47.87,Default,,0000,0000,0000,,of the sprite's material, so changing the colour Dialogue: 0,0:00:47.87,0:00:49.87,Default,,0000,0000,0000,,property on a sprite will only effect Dialogue: 0,0:00:49.87,0:00:51.87,Default,,0000,0000,0000,,that particular game object. Dialogue: 0,0:00:53.68,0:00:55.68,Default,,0000,0000,0000,,Material is a reference to the material Dialogue: 0,0:00:55.68,0:00:57.92,Default,,0000,0000,0000,,used to render the sprite. Dialogue: 0,0:00:59.03,0:01:01.55,Default,,0000,0000,0000,,By default a new sprite renderer component Dialogue: 0,0:01:01.55,0:01:04.83,Default,,0000,0000,0000,,will have the material sprite's default assigned. Dialogue: 0,0:01:06.05,0:01:08.76,Default,,0000,0000,0000,,When using this default material the sprite will not Dialogue: 0,0:01:08.76,0:01:11.30,Default,,0000,0000,0000,,be effected by any lighting in the scene. Dialogue: 0,0:01:12.03,0:01:14.03,Default,,0000,0000,0000,,The sprite renderer will simply render the Dialogue: 0,0:01:14.03,0:01:16.41,Default,,0000,0000,0000,,original sprite at full brightness. Dialogue: 0,0:01:17.23,0:01:19.80,Default,,0000,0000,0000,,In many cases lighting is not necessary Dialogue: 0,0:01:19.80,0:01:21.80,Default,,0000,0000,0000,,when creating a 2D game. Dialogue: 0,0:01:22.38,0:01:24.38,Default,,0000,0000,0000,,To use lights with a sprite renderer Dialogue: 0,0:01:24.38,0:01:26.38,Default,,0000,0000,0000,,a material with a shader that responds Dialogue: 0,0:01:26.38,0:01:28.38,Default,,0000,0000,0000,,to lighting must be selected. Dialogue: 0,0:01:28.92,0:01:32.58,Default,,0000,0000,0000,,Sprites Diffuse is optimised for use with sprites, Dialogue: 0,0:01:32.58,0:01:35.07,Default,,0000,0000,0000,,but many other shaders can be used. Dialogue: 0,0:01:40.35,0:01:43.02,Default,,0000,0000,0000,,Due to the nature of shaders, and the sprite renderer, Dialogue: 0,0:01:43.02,0:01:46.20,Default,,0000,0000,0000,,some shaders are incompatible with the sprite renderer. Dialogue: 0,0:01:47.90,0:01:50.50,Default,,0000,0000,0000,,Sprites use standard Unity materials, Dialogue: 0,0:01:50.50,0:01:52.50,Default,,0000,0000,0000,,however, the sprite renderer handles Dialogue: 0,0:01:52.50,0:01:55.54,Default,,0000,0000,0000,,materials differently than the mesh renderer. Dialogue: 0,0:01:56.46,0:01:58.46,Default,,0000,0000,0000,,The main difference is that the material's Dialogue: 0,0:01:58.46,0:02:00.46,Default,,0000,0000,0000,,texture property is not needed. Dialogue: 0,0:02:01.39,0:02:03.78,Default,,0000,0000,0000,,The sprite renderer will use the shader, Dialogue: 0,0:02:03.78,0:02:07.08,Default,,0000,0000,0000,,colour and other properties from a compatible material Dialogue: 0,0:02:07.08,0:02:09.08,Default,,0000,0000,0000,,but not the texture property. Dialogue: 0,0:02:11.03,0:02:14.40,Default,,0000,0000,0000,,When using a material that has a sprite shader Dialogue: 0,0:02:15.12,0:02:17.77,Default,,0000,0000,0000,,the texture property is unavailable. Dialogue: 0,0:02:20.46,0:02:22.93,Default,,0000,0000,0000,,If the attached material has a tint colour Dialogue: 0,0:02:22.93,0:02:25.81,Default,,0000,0000,0000,,it will be combined with the sprite's colour property. Dialogue: 0,0:02:33.10,0:02:37.21,Default,,0000,0000,0000,,It is important to note that lighting and shadow. Dialogue: 0,0:02:37.21,0:02:40.17,Default,,0000,0000,0000,,So when using lights and more complex shaders Dialogue: 0,0:02:40.17,0:02:44.05,Default,,0000,0000,0000,,it is best to balance the lighting with the performance of the scene. Dialogue: 0,0:02:44.91,0:02:47.62,Default,,0000,0000,0000,,For more information on materials and shaders, Dialogue: 0,0:02:47.62,0:02:50.11,Default,,0000,0000,0000,,please see the information linked below. Dialogue: 0,0:02:52.78,0:02:54.78,Default,,0000,0000,0000,,Sorting Layer and Order In Layer are Dialogue: 0,0:02:54.78,0:02:56.78,Default,,0000,0000,0000,,the systems used to define the order Dialogue: 0,0:02:56.78,0:02:58.78,Default,,0000,0000,0000,,in which sprites are drawn. Dialogue: 0,0:03:00.44,0:03:02.57,Default,,0000,0000,0000,,All sprite renderers are placed on a default Dialogue: 0,0:03:02.57,0:03:04.57,Default,,0000,0000,0000,,sorting layer when they are created. Dialogue: 0,0:03:05.80,0:03:08.17,Default,,0000,0000,0000,,Sprites are rendered by the sprite render Dialogue: 0,0:03:08.17,0:03:10.17,Default,,0000,0000,0000,,in the following order of priority. Dialogue: 0,0:03:11.13,0:03:14.39,Default,,0000,0000,0000,,The order of the sorting layer, containing the sprite, Dialogue: 0,0:03:16.11,0:03:18.11,Default,,0000,0000,0000,,the order in layer value for the sprite Dialogue: 0,0:03:18.11,0:03:20.11,Default,,0000,0000,0000,,within that sorting layer Dialogue: 0,0:03:22.28,0:03:24.28,Default,,0000,0000,0000,,and finally the sprite's transform position Dialogue: 0,0:03:24.28,0:03:26.88,Default,,0000,0000,0000,,Z compared to the other sprites being rendered Dialogue: 0,0:03:26.88,0:03:28.88,Default,,0000,0000,0000,,and the camera rendering them. Dialogue: 0,0:03:29.78,0:03:32.55,Default,,0000,0000,0000,,In the case of sorting layers and order-in-layer Dialogue: 0,0:03:32.55,0:03:34.55,Default,,0000,0000,0000,,items with lower values will be Dialogue: 0,0:03:34.55,0:03:36.73,Default,,0000,0000,0000,,behind those with higher values. Dialogue: 0,0:03:37.48,0:03:40.50,Default,,0000,0000,0000,,For more information on layers, including sorting layers, Dialogue: 0,0:03:40.50,0:03:42.94,Default,,0000,0000,0000,,please see the information linked below.