0:00:01.257,0:00:03.709 El editor de Sprites se usa para tomar imagenes 0:00:03.709,0:00:07.689 que contienen multiples elementos, como [br]partes de un personaje o una hoja de Sprites 0:00:07.689,0:00:10.338 y recortarlos en Sprites individuales. 0:00:14.002,0:00:16.277 It is important that the sprite mode of the image 0:00:16.277,0:00:18.277 is set to Multiple. 0:00:19.371,0:00:21.371 Images with sprite modes set to single 0:00:21.371,0:00:24.443 cannot use the sprite editor window at this time. 0:00:24.943,0:00:29.033 For more information on sprites, sprite mode and the sprite type 0:00:29.033,0:00:31.033 please see the information link below. 0:00:32.306,0:00:34.679 When sprite mode multiple is selected 0:00:34.679,0:00:37.000 the sprite editor button will appear on the 0:00:37.000,0:00:39.000 texture importer in the inspector. 0:00:40.011,0:00:43.300 Click the sprite editor button to open the sprite editor. 0:00:45.292,0:00:47.445 The sprite editor can also be opened by selecting 0:00:47.445,0:00:50.452 Window - Sprite Editor. 0:00:52.665,0:00:55.568 The sprite editor window is a standard Unity window. 0:00:55.568,0:00:58.529 It can be used and docked like any other window. 0:01:00.217,0:01:02.536 To create sprites in the sprite editor window 0:01:02.536,0:01:04.673 slice the image by clicking and dragging 0:01:04.673,0:01:06.423 over the desired elements. 0:01:06.785,0:01:10.531 This will create rectangular selections that define each sprite. 0:01:11.445,0:01:13.445 The rectangular selection can be adjusted 0:01:13.445,0:01:15.445 by clicking and dragging the rectangle. 0:01:16.567,0:01:19.856 Click and drag anywhere inside the rectangle to move it. 0:01:20.605,0:01:24.286 Click and drag any of the corners or edges to resize it. 0:01:29.095,0:01:31.095 Click and drag the pivot point gizmo to move 0:01:31.095,0:01:33.318 the pivot point for that sprite. 0:01:37.062,0:01:39.981 When a sprite is selected a sprite panel appears 0:01:39.981,0:01:41.981 in the lower right of the sprite editor 0:01:41.981,0:01:44.607 with details about the selected sprite. 0:01:45.614,0:01:47.614 Name is the name of the sprite. 0:01:48.542,0:01:51.731 The name is created from the name of the original image 0:01:51.731,0:01:54.364 and the order in which it was sliced from that image, 0:01:54.364,0:01:55.944 starting with 0. 0:01:56.615,0:01:58.203 Position defines where the sprite 0:01:58.203,0:02:00.203 is on the image, in pixels. 0:02:00.924,0:02:04.153 X and Y define the start point of the sprite. 0:02:04.153,0:02:06.153 measured from the lower left corner of the image. 0:02:06.153,0:02:08.805 to the lower left corner of the sprite. 0:02:09.606,0:02:11.955 W and H define the width and height 0:02:11.955,0:02:13.955 of the sprite, from the start point. 0:02:16.416,0:02:18.416 The trim button can be used to trim off any 0:02:18.416,0:02:20.306 excess space around the element, 0:02:20.306,0:02:22.978 creating the tightest fitting rectangle possible. 0:02:25.334,0:02:27.334 Pivot sets the pivot point for this sprite. 0:02:27.986,0:02:30.291 The pivot drop-down menu includes presets 0:02:30.291,0:02:32.995 for each corner and the centre of each edge. 0:02:34.269,0:02:36.269 Custom allows for a custom pivot point 0:02:36.269,0:02:38.890 to be set numerically under Custom Pivot. 0:02:40.496,0:02:42.300 Along the top of the sprite editor are a 0:02:42.300,0:02:43.859 number of tools. 0:02:44.552,0:02:46.203 The slice menu, 0:02:46.896,0:02:48.896 the revert and apply buttons, 0:02:49.672,0:02:51.672 the RGB alpha toggle 0:02:52.683,0:02:54.683 and the zoom slider. 0:02:56.550,0:03:00.140 The slice menu is used to automatically create sprites 0:03:00.140,0:03:02.785 by slicing the sprite elements from the image. 0:03:03.731,0:03:07.018 The slice type is either automatic or grid. 0:03:07.960,0:03:10.499 Automatic is best for slicing individual 0:03:10.499,0:03:12.499 uneven elements, like from an atlas. 0:03:13.648,0:03:15.648 Elements on the image are automatically 0:03:15.648,0:03:17.939 detected based on the empty space around them. 0:03:18.659,0:03:20.896 Each sprite will have effectively been trimmed 0:03:20.896,0:03:22.146 as a result. 0:03:23.065,0:03:26.301 With automatic selected minimum size defines the 0:03:26.301,0:03:29.123 minimum size for each individual sprite. 0:03:30.051,0:03:32.697 If this value is set too high smaller elements 0:03:32.697,0:03:34.697 that are near each other could be combined 0:03:34.697,0:03:36.780 in to 1 larger sprite to meet 0:03:36.780,0:03:38.780 the minimum size requirements. 0:03:39.667,0:03:41.667 Pivot sets the default pivot point that will 0:03:41.667,0:03:43.585 be applied to all sprites when they are 0:03:43.585,0:03:45.115 spiced from the image. 0:03:46.085,0:03:49.644 Just like the sprite panel, the pivot drop-down menu 0:03:49.644,0:03:52.683 includes presets for each corner and the centre of each edge. 0:03:54.689,0:03:57.750 To set a custom pivot, once the sprites have been sliced 0:03:57.750,0:03:59.750 select any sprite and adjust it's pivot point 0:03:59.750,0:04:01.750 in the sprite panel, 0:04:01.750,0:04:04.054 or adjust it visually in the editor. 0:04:05.645,0:04:07.825 Method lets you choose how to deal with existing 0:04:07.825,0:04:10.060 sprites in the sprite editor window. 0:04:10.988,0:04:13.334 Delete Existing will replace any sprites 0:04:13.334,0:04:15.705 that already exist with new sprites. 0:04:16.649,0:04:18.842 Smart will attempt to create new sprites 0:04:18.842,0:04:21.329 while retaining and adjusting existing ones. 0:04:22.240,0:04:24.240 Safe will add new sprites without 0:04:24.240,0:04:26.685 changing any sprites already created. 0:04:28.909,0:04:31.944 When the settings are correct select the Slice button 0:04:31.944,0:04:34.695 to slice the image in to individual sprites. 0:04:35.963,0:04:39.232 After slicing, each sprite can be edited individually. 0:04:41.486,0:04:44.094 With the sprite sheet, where each element is designed 0:04:44.094,0:04:46.784 to be a regular identical size, 0:04:46.784,0:04:49.508 if Slice Type Automatic is used 0:04:49.508,0:04:52.352 small changes in the individual sprite's shape 0:04:52.352,0:04:54.352 and the amount of empty space surrounding it 0:04:54.352,0:04:57.161 could cause the sprites to be cut out unevenly. 0:04:58.371,0:05:01.777 To evenly slice a sprite sheet made of regular elements 0:05:01.777,0:05:03.777 choose Slice Type Grid. 0:05:05.948,0:05:09.202 Pixel Size sets the size of the grid in pixels. 0:05:10.489,0:05:13.151 Pivot sets the default pivot point that will be applied 0:05:13.151,0:05:16.136 to all sprites when they are sliced from the image. 0:05:16.136,0:05:19.235 To set a custom pivot, once the sprites have been sliced, 0:05:19.235,0:05:21.595 select any sprite and adjust it's pivot point 0:05:21.595,0:05:24.956 in the sprite panel, or adjust it visually in the editor. 0:05:25.926,0:05:28.340 When the settings are correct use the slice button 0:05:28.340,0:05:30.895 to slice the image in to individual sprites. 0:05:32.017,0:05:35.341 After slicing each sprite can be edited individually. 0:05:36.199,0:05:38.990 When slicing is complete, to save any changes, 0:05:38.990,0:05:40.990 select Apply. 0:05:41.421,0:05:44.454 Or discard any change by selecting Revert. 0:05:46.487,0:05:48.487 The RGB Alpha toggle switches the 0:05:48.487,0:05:51.587 display of the sprite editor between the colour image 0:05:51.587,0:05:54.146 and it's alpha channel, making it easier to see 0:05:54.146,0:05:56.849 fine details when manually adjusting edges. 0:05:57.929,0:06:01.418 The zoom slider controls the zoom when viewing the image. 0:06:03.589,0:06:05.589 When an image has been successfully edited 0:06:05.589,0:06:07.589 and the changes applied 0:06:08.089,0:06:10.494 the asset will update in the project window. 0:06:12.164,0:06:14.566 And a new sprite, or set of sprites 0:06:14.566,0:06:17.082 can be seen as a child or group of children 0:06:17.082,0:06:18.579 under the image. 0:06:19.292,0:06:21.833 When viewing thumbnails in the project view 0:06:21.833,0:06:24.676 click the turn-down arrow to see any children. 0:06:26.639,0:06:30.136 Each child represents a useable sprite from that image. 0:06:30.981,0:06:32.662 Any of these sprites can be used in the 0:06:32.662,0:06:35.459 project independently, or grouped together 0:06:35.459,0:06:37.459 to create a character, for example, 0:06:38.139,0:06:40.776 or used sequentially as animations.