SpriteTile Release Notes
A compatibility update that removes any errors/warnings in SpriteTile and the demos in Unity 2017.3.
• Fixed error that occurred when applying box colliders as custom tile physics colliders.
• When importing TMX files, "Make tiles with the Collider option checked have colliders in the map after import" is now "Apply tile defaults after import". So all tile defaults, not just colliders (i.e. trigger, order, rotation) can be applied.
• Fixed error with Tile.NewLevel if AddLayer had been used but no physics colliders.
• The system beep doesn't play anymore when keyboard shortcuts are used.
• Using transparency in colors with SetColor/SetColorBlock works.
• Importing maps from Tiled is fixed so they aren't inverted.
• The , and . keyboard shortcut keys work correctly in certain setups that may involve more than one screen.
• Fixed making groups from a selection in the tile list so they aren't inverted.
• Tile.SetLight, for instantiating a light style at a specified position and setting its light intensity. Light styles can be added with AddLightStyle or loaded along with a level made in the TileEditor.
• Tile.DeleteLight, for removing a placed light.
• Tile.MoveLight, for moving a light from one tile to another.
• Tile.RefreshLight, to recompute a shadow-casting light in case any colliders in the light radius are changed.
• Tile.HasLight, which returns true if a cell contains a light and false otherwise.
• Tile.GetLightStyle, which returns the light style of the specified light instance.
• Tile.GetLightIntensity, which returns the intensity of the specified light instance.
• Tile.GetLightPositions, which returns the Int2 positions of all lights in a layer.
• Tile.AddLightStyle, for adding a light style with various properties (size, color, etc.) that can be used with SetLight.
• Tile.RemoveLightStyle, for removing a specified light style, and all lights that might be using it.
• Tile.ChangeLightStyle, which changes the properties of the specified light style, and all lights which might be using it.
• Tile.SetAmbient, which sets the ambient light (base color for all tiles) for a layer.
• Tile.UseRadiosity, which indicates whether shadow-casting lights should use a radiosity effect or not.
• Tile.AnimateTilePosition, for animating a tile at a particular (x, y) position. (Contrast with Tile.AnimateTile, which animates all tiles of a particular kind.)
• Tile.StopAnimatingTilePosition, which does what it says.
• Tile.WatchTile, for watching the position of a tile and calling a function if that position comes into or goes out of view of a camera. Similar to OnBecameVisible/OnBecameInvisible Unity functions.
• Tile.StopWatchingTile, in case you don't want to watch a tile anymore.
• Tile.GetProperty, for getting optional tile properties, namely number (float), label (string), and GameObject (prefab).
• Tile.SetProperty, for setting an optional tile property.
• Tile.RemoveProperties, for removing all optional properties a tile might have.
• Tile.HasProperty, which returns true if a cell has any optional properties and false otherwise.
• Tile.GetPropertyPositions, which gets a list of all tile positions that have an optional property
• Tile.SetColliderTrigger, for setting the isTrigger value of tile physics colliders.
• Tile.SetMapBlock now has an optional "instantiateGameObjects" parameter, which if true causes the appropriate GameObjects to be instantiated for any tiles in the block with a GameObject property.
• Files saved with SpriteTile 3.0 are version 4 now. SpriteTile 3.0 will load files from older versions, but older versions will not be able to load files saved with SpriteTile 3.0 or later.
• Tile.SetColliderLayer (and Tile.AddLayer) uses any defaults that have been set up with Tile.SetColliderMaterial, SetColliderTag, and SetColliderTrigger.
• Tile.useTrueColor is true by default.
• Tile.SetMapBlock updates physics colliders correctly.
• Fixed cursor texture console warning with Unity 5.4.
• Fixed bug that could cause visible tiles to not be updated after being changed, when using multiple cameras.
• Removed GC that would occur when using tile materials.
• Compatible with Unity 5.5.
• Lights section, for managing different styles of lights and their properties.
• Light Mode button for adding/deleting/moving lights.
• Light overlay toggle for showing lighting in the level.
• Extra overlay toggle for showing any tiles that have an optional property (number, label, GameObject).
• Redo button
• Pick tile button (does the same thing as the P shortcut key).
• The Level section has been reorganized to add a Tools box, and the Layer, Light, and Selection sections can be individually collapsed, in which case only a few of the most commonly used controls for that section are visible.
• Setting tile properties now has the ability to set extra properties (number, label, GameObject).
• Other improvements for the tile property editing area, especially when multiple tiles are selected. Most notably, multiple tiles with differing properties use multi-editing like in the Unity editor. Properties displayed as "—" aren't changed when finishing the edit, which allows applying a specific property to multiple tiles while leaving other properties alone.
• When using a selection box to select multiple tiles in the map, the info box X and Y coords change to W and H (width and height), to show the size of the selection.
• There's now a custom cursor for drawing with an active random group, to make it more obvious.
• If tiles are deleted from the project without deleting them from the TileEditor first, opening the TileEditor presents a dialog with the option of deleting them from the TileEditor.
• Prevented undo list from being added to indefinitely; oldest elements are removed if it gets huge enough.
• "Move To" button doesn't overwrite the destination layer with empty tiles, unless shift is held down while clicking, making it consistent with pasting the copy buffer. This also makes it easy to merge layers where the source layer has empty tiles.
• "Move To" button requires two undos to completely undo the action.
• Internally, the level is no longer inverted to accommodate the top-down coords of editor GUI code, but instead the drawing logic is changed to correctly handle levels without inverting them. This has no effect on usage, but anyone who has made changes to TileEditor source code should be aware.
• When loading standard groups from files that were saved with version 2.12 or earlier, groups have a tile size assigned using the tile size of the current layer, in order to prevent errors. In cases where the current layer tile size isn't the correct tile size for the group, the groups should be recreated and re-saved.
• Fixed error that could occur in certain cases when multi-selecting tiles in the Tiles section by drawing a selection box.
• Requires Unity 5.2.2 or newer.
• Due to improvements in folder handling in Unity 5.2.2, all SpriteTile assets are now located in Plugins/SpriteTile (except for Editor Default Resources, which still can't be moved). If you're upgrading from a previous version, READ THE UPGRADE GUIDE BEFORE DOING ANYTHING ELSE.
• The SceneManager class is in the SpriteTile namespace, and renamed to TileSceneManager for good measure, so it doesn't need to be disambiguated with UnityEngine.SceneManagement.SceneManager.
• Files saved with SpriteTile 2.13 are version 3 now. SpriteTile 2.13 will load files from older versions, but older versions will not be able to load files saved with SpriteTile 2.13 or later.
• Tile.SetLayerMaterial, for setting the sprite material of all tiles in a given layer.
• Tile.SetMapTileset works if the layer contains empty tiles.
• Tile.GrabSprite works with more recent versions of Unity when the specified layer is not 0.
• Fixed out of range exception that could occur when using Tile.NewLevel with a LevelData array.
• Fixed error that would occur if the number of layers in a level exceeded the number of sorting layers, even if those layers referred to existing sorting layers.
• Fixed out of range exception that could occur in certain cases when using Tile.CopyGroupToPosition.
• Flipped tiles using sprites with a pivot other than the center are displayed properly.
• Physics colliders for tiles using sprites with a pivot other than the center are positioned properly.
• Setting tile rotation/flip in code when using physics colliders updates the colliders.
• Improvements in open/import dialog handling.
• Previews for standard groups are handled differently, which includes benefits such as much smaller file sizes when saving groups, and previews that are updated if the tiles making up the group have changed. To upgrade old group files, open them in SpriteTile 2.13 and re-save them.
• When importing TMX files, the "Make tiles with the Collider option checked have colliders in the map after import" option works if there are empty tiles in a layer.
• Fixed potential issue with file name resulting in an error in the path when saving files.
• The scene preview, when using multiple layers, sets the sorting layer names appropriately.
• The scene preview shows flipped tiles.
• Fixed case where non-square tile size maps were not displayed properly after loading a file.
• Tile.LoadMapBlock can specify which layer to use, for files that have multiple layers.
• Tile.CopyGroupToPosition works if no tiles have a physics collider default.
• If a group used with Tile.CopyGroupToPosition has any tiles with a tile number of 0, they're displayed correctly.
• Sprites made with individual textures rather than atlases batch properly when using Unity's sprite packer.
• Tile.GetGroupSize function, which returns an Int2 with the specified group's X and Y dimensions.
• Attempting to drag a tile into one of the empty corner slots in a Terrain group no longer causes an error.
• Right-click multi-selecting in the Tiles section works properly when there are more than 8 tilesets (and is more accurate in general).
• Sprite importing works when using the DLL.
• Tiled file importing supports tile flipping and rotation.
• Improved robustness of loading sprites in order to work properly with Unity 5.1.
• Tile.SetFlip for flipping tiles on the X and Y axes.
• Tile.SetFlipBlock for flipping a block of tiles.
• Tile.GetFlip for getting the tile flip property.
• The Y values are inverted in Int2.downRight, downLeft, upRight, and upLeft, in order to be consistent with Int2.up and Int2.down.
• Int2 and TileInfo are in the SpriteTile namespace now. This doesn't require any code changes.
• Using Tile.SetTile where Tile.SetColor has been used previously will no longer result in an incorrect color being set in certain cases.
• Tile.SetMapBlock sets physics colliders for any tiles in the group that should have them.
• Tile.GrabSprite will work correctly if all of the tiles in the TileEditor have the default material.
• Tile.GetLevelBytes and Tile.GetMapBlockBytes include the "numsets" tag, so the number of tile sets used in the project is properly stored in the file.
• "Show tips" option, which will show tooltips (info and keyboard shortcuts) for most controls.
• Tiles can be flipped on the X and Y axes by using the X and Y keys when the mouse pointer is over a tile.
• Alt-clicking a tile has the ability to set the tile flip property.
• Tile selection can be done with Command-clicking instead of right-clicking, for Mac users with trackpads.
• When using a group made from multi-selecting tiles in the Tiles section, colliders are set for any tiles that have the collider default.
• The tile preview size slider works properly when there are more than 8 sets.
• Fixes for TMX importing.
• Tile.UseRandomGroup function, which will cause SetTile and SetTileBlock to use the specified random group (using the groups loaded with LoadGroups).
• Tile.UseTerrainGroup function, which likewise will use the specified terrain groups.
• Tile.CopyGroupToPosition sets physics colliders for any tiles in the group that should have them.
• The "Import" button for TMX files has a "Make tiles with the Collider option checked have colliders in the map after import" option, which does exactly that.
• Custom colliders work with multi-selected tiles, so the same custom collider will be applied to all selected tiles. (Also multi-selected tiles can be changed to auto colliders.)
• When creating a new level, the size of the current level is used rather than defaulting to 50x50.
• When other layers besides the current layer are visible, tile rotation is drawn correctly for those layers.
• Tile.SetLayerSorting function, which sets a SpriteTile layer to a specified Unity sorting layer (either by index or by name).
• Tile.GetMapPosition is changed to Tile.WorldToMapPosition for the sake of greater clarity and consistency with Tile.ScreenToMapPosition.
• For the same reasons, Tile.GetWorldPosition is now Tile.MapToWorldPosition.
• Tile.SetColliderMaterial, Tile.SetColliderTag, and Tile.SetColliderLayer can optionally specify a layer.
• Tile.SetLayerPosition can optionally specify whether to also set the position of colliders for that layer.
• Tile.SetColliderLayer will work in Unity 5 without having to use Tile.SetColliderTag first.
• A "Sorting" popup menu, so each layer can be assigned an arbitrary Unity sorting layer.
• In addition to the show preceding/next layer options, there's now a show all option, which shows all layers, as long as they have the same dimensions as the current layer.
• Added "All" button (next to the deselect button) for selecting all tiles in the layer. This is the same as what the alt-A keyboard command does.
• Alt-clicking on a tile in the Tiles section will add it to existing multi-selected tiles, or remove it if it's already selected. This can be used in combination with right button drag-selecting.
• Selected tiles in the Tiles section are much more obvious when using the Unity editor dark skin.
• Fixed issues with right button drag-selecting in the Tiles section.
• Tile.GetSortingLayerName function, which returns the sorting layer name for a given layer number. Useful for putting sprites on a layer numerically, since Unity doesn't include any functions for this.
• Tile.CameraRotationX, Tile.CameraRotationY, and Tile.CameraRotationZ, for applying a rotation to the camera on the X, Y or Z axes respectively.
• Due to changes in Unity 5, sorting layer names are required rather than setting the ID. Since Unity has no way of querying the list of sorting layer names at runtime, this must be done manually by using the "Assets -> Set SpriteTile Sorting Layer Names" menu item in Unity. This only has to be done once after you add sorting layers in the "Tags and Layers" project setting, or if you rename any existing sorting layers.
• The default materials for transparent unlit sprites and transparent pixel lit sprites are picked up from the SpriteTile/Resources folder automatically, namely the Default and Diffuse materials respectively. (This was already the case for non-transparent unlit and lit sprites.) So changing the Default and Diffuse materials (such as the pixel snap setting) will automatically cause all relevant sprites to use the changes.
• Tile.GrabSprite, if using "true" with the deleteTile parameter, also deletes the collider for that cell (if there is one).
• Documentation is now split into two files, SpriteTile Documentation (the standard docs) and SpriteTile Reference Guide (the docs for all the Tile functions).
• An "Import" button for importing Tiled (.tmx) maps. The importing only works with orthogonal maps using uncompressed XML format, and only imports tiles (no special objects etc.). Multiple layers are supported.
• A "Move to" button for moving selected tiles to another layer, as long as both layers are the same size. This is easier than cutting and pasting between layers, and works with multiple-selection (double-click selected) tiles.
• An "Order fill" button, which fills the selection with a range of order-in-layer values, as defined by the four corners. Useful for isometric effects and other cases where you want lots of tiles drawn in a certain order.
• "Save As" supplies the current file name (if any) by default.
• Fixed problems with deleting a tileset if there were tiles drawn that used higher tilesets.
• Fixed spurious error that could be printed when dragging the vertical divider in certain cases.
• If a tile has a default order-in-layer value of 0, drawing with the tile doesn't overwrite existing order-in-layer values in the map.
• An "Order" button for showing the order overlay, which shows any non-zero order-in-layer number for each tile (similar to the trigger overlay). This can also be toggled using the keyboard shortcut O.
• A "Sort Tiles By Atlas Position" button, for sorting all tiles in a set by their position in the atlas. (Does not work if the set contains any single tiles; all tiles must be in an atlas.)
• Double-clicking a tile in the Level section will select all cells which contain that tile. This is similar to making a selection box--the selected tiles can be filled with another tile or random tile, deleted, alt-clicked to edit trigger numbers etc.--but tiles selected this way can't be copied or made into a group.
• The "Move Tile" button has been replaced with an "Options" button, which displays a panel with options such as deleting, moving, and sorting tiles.
• Multi-selected tiles can be moved now, so groups of tiles can all be moved at once.
• Removed "delete tiles" keyboard shortcut, since deleting multi-selected tiles can be done in the options panel.
• Changed collider overlay keyboard shortcut from O to C.
• Panning the level view (with Space + mouse drag) is improved.
• If there are unsaved changes to a level, and the TileEditor window is closed or a new level is loaded, a dialog asks the user whether to save changes or not.
• If a standard group contains empty tiles, pasting that group into the level will skip the empty tiles, so they don't overwrite existing tiles. Holding shift while clicking will use the old behavior of including empty tiles when pasting. This applies to using a group when erasing as well.
• Turning on the physics collider default for a tile will also set the collider default, if it's not on already.
• Attempting to load a level that contains missing tiles will no longer fail, but will list the missing tiles in a dialog, and the missing tiles in the level will be shown as a box with an X in it.
• Multi-selecting tiles in the Tiles section with right-click dragging always works accurately.
• If tiles have been moved around, multi-selecting tiles copies the correct tiles to the copy buffer.
• Adding tiles to random groups will work correctly if they've been moved around.
• TileInfo.empty, the equivalent of TileInfo(0, -1).
• Tile.DeleteTile works if there are no tiles in set 0.
• Fixed display issues with non-square tiles.
• Fixed problem when starting for the first time with no TileManager asset.
• Tile.GetTilePositions function, which returns an array of all positions in a layer where a specified tile is found.
• Tile.GetTriggerPositions function, which is like GetTilePositions but finds all specified trigger values.
• TileInfo variables can be added, subtracted, and compared.
• A new group type, terrain groups, which is for groups of related tiles (e.g. path, water, walls). When tiles in active terrain groups are drawn, the appropriate tiles from the group are automatically placed. This is much faster than individually placing each tile.
• The number of possible tile sets can be chosen, the options being 2, 4, 8, 16, or 32. The fewer the sets, the larger the maximum numbers of tiles per set, so 2 sets can have 16,384 tiles per set, and 32 sets can have 1024 tiles per set.
• Fill Area button, for flood-filling an area with the selected tile (or with a random group). The keyboard shortcut Shift-F can be used to toggle Fill Area as well.
• There's now a vertical divider between the level area and the tiles/groups area, which can be dragged to make the tiles/groups area larger (as long as the TileEditor window is wide enough).
• The right mouse button can be used to draw a selection box in the tiles section. Any tiles in the selection box are multi-selected, and are also copied to the copy buffer (so they can be drawn in the level as a group).
• Drawing a tile, then holding shift and clicking on another tile, will create a line of tiles between the two points. (Also works when erasing tiles.)
• Re-loading a sprite atlas will work for atlases where the sprite rects may have been moved around, such as those produced by TexturePacker.
• Control-clicking will erase tiles (as an alternative to the third mouse button, which still erases tiles).
• Selecting a single texture in the tiles area will automatically deselect any copy buffer that might exist.
• Zooming with alt-scrollwheel keeps the view centered, while panning toward the mouse pointer when zooming in, similar to Photoshop.
• Some visual improvements.
• Fixed situations where tile names would be displayed even if they were toggled off.
• The "X" button (for deactivating the selection) is clickable.
• When deleting tile sets, any loaded groups containing the tiles in the set are also deleted.
• Fixed certain situations where undoing would use the wrong layer.
• Fixed case where collider overlay tile sizes could be drawn wrong if tiles had been reordered.
• If the TileEditor window is left open when quitting Unity, no errors are generated when re-starting.
• Tile.SetColliderTag function, for setting the GameObject tag of tile colliders.
• Tile.SetLayerColor has been removed, since it doesn't entirely work well with the new color functions in 2.3, and those functions make it unnecessary anyway. You can use Tile.SetColorBlock to accomplish the same thing.
• Sprites made with Tile.GrabSprite have a collider added if the tile being grabbed has a physics collider.
• Tile.PutSprite sets the tile collider if the grabbed sprite has a collider.
• Tile.SetTileScale and Tile.SetTileLayerScale work properly.
• Tile.LoadGroups can be called before creating or loading a level without causing an error.
• A "To Object" button for custom physics colliders, which copies the tile collider to the selected GameObject, so it can be edited, and copied back if desired.
• Bookmarks for the level view can be set with function keys, in order to quickly navigate to specific locations in large levels.
• Alt + Shift + Delete (or Backspace) can be used to delete the selected tile or tiles from the tiles list.
• When getting a custom physics collider from a selected GameObject, BoxCollider2D can be used in addition to PolygonCollider2D.
• Performance improvements for the Tiles list when displaying tilesets with lots of tiles.
• The "Save"/"Save As" keyboard shortcuts require Alt now (Alt-S and Alt-Shift-S).
• Using Alt-S with a new level no longer uses the previously-saved level; instead it opens the Save As dialog.
• Turning off both the name and number for the Tiles list no longer affects the Groups list.
• Tile.SetMapTileset, for changing an entire map to a given tileset. Useful for things like day/night changes when you have two (or more) tilesets that are different versions of the same thing.
• Tile.GrabSprite, which gets a tile from a specified position and converts it into a sprite GameObject which can then be moved around independently.
• Tile.PutSprite, which puts a grabbed sprite back into the level as a tile.
• Tile.GetMapBlockBytes, which gets a byte array from a map block, which can be used to save a section of a layer.
• Tile.LoadMapBlock, for loading a layer as a MapData block. So GetMapBlockBytes and LoadMapBlock, along with GetMapBlock and SetMapBlock, could be used to make a level paging system for example.
• Tile.SetColor, for making a particular tile a specified color.
• Tile.SetColorBlock, for making a defined area a specified color.
• Tile.GetColor, which returns the color of a particular tile.
• Tile.UseTrueColor, for making SpriteTile use 8-bit per channel color. The default is 4-bit per channel, which works in most cases since per-tile colors don't usually need fine control over color. This allows colors to use 2 bytes per tile, whereas truecolor uses 4 bytes per tile.
• Tile.SetCamera can be called subsequently with different cameras without causing an error.
• Tile.SetMapBlock works if the block is placed so that the topmost or rightmost edges of the block align with the topmost or rightmost edges of the map.
• Fixed potential tile animation glitch that could occur in certain cases such as zooming the camera.
• Tiles that use physics colliders can have customized polygon colliders, in addition to the standard auto-generated colliders.
• A trigger number can be set as a default for each tile, in the same way as defaults for rotation and order-in-layer. When drawing with a particular tile, the associated default trigger will be set along with the tile (as long as the default isn't 0).
• The selection box is more clearly visible, and can be changed if desired by editing the SelectionBox texture in the SpriteTile default editor resources folder.
• The tile defaults for order, rotation, etc. are shown properly for the first tile in the first set when the TileEditor window is first opened.
• Deleting tiles in the level view is possible if a new set with no tiles in it is displayed.
• Multi-camera support. An arbitrary number of cameras in any configuration can be used, and each camera will only draw as many tiles as needed, the same as with a single camera.
• Tile.AddLayer, for adding new layers to a level at runtime.
• Level layers are reversed, in order to be consistent with Unity's layer order. That is, layer 0 is now the bottom layer and higher layer numbers are on top. Existing levels can be converted easily in the TileEditor by using the layer up/down buttons.
• Tile.SetCamera can use a Camera array in addition to a single camera. Also, calling SetCamera() with no arguments will use all cameras tagged MainCamera (if there are more than one) instead of just the first.
• Tile.ScreenToMapPosition can optionally take a camera number, if multiple cameras are used.
• Tile.GetLevelBytes returns correct data if tiles have been rearranged, so levels saved in code will work properly.
• Cameras with altered viewport rects work correctly.
• "Show preceding layer" toggle, for drawing the layer underneath the current layer, if such a layer exists and has the same dimensions as the current layer. The preceding layer is drawn at 50% alpha to make it easier to distinguish from the current layer.
• "Show next layer" toggle, for drawing the layer on top of the current layer, with the same conditions as above. The next layer is drawn at 50% alpha so you can still see what you're doing.
• If a tile already exists in the current set, it won't be loaded. This means that you can add new sprites to a sprite sheet, load the sprite sheet with the "Load" button, and only the new tiles will be added. This also means that you can add a number of sprites to a folder, load them using the "From Folder" button, and again only the new tiles will be added.
• The undo queue is no longer reset when changing layers. If you undo a change that was made on a layer other than the one currently selected, you're automatically switched to that layer and the undo is performed. (Unless you're showing the preceding or next layer and the undo occurs on that layer, in which case you can see the undo occur anyway so there's no need to switch.)
• The currently-selected layer number is saved with the level, so you don't need to manually switch to the layer you were working on last when loading a level.
• The "new level" button confirmation dialog text is better worded, and won't appear if the level is saved.
• Adding and removing tiles from Random groups works correctly if the tiles have been rearranged.
• If deleted tiles are in the undo queue, undoing will work without errors.
• Tile.AnimateTile function, for animating a specified kind of tile with a given frame sequence.
• Tile.StopAnimatingTile function, for stopping the animation for the specified kind of tile.
• Tile.AnimateTileRange function, for animating a range of tiles. Useful for things like water tile animations, flickering torch animations, etc., where you don't necessarily want all the tiles to animate in sync.
• Tile.StopAnimatingTileRange function, for stopping a range of tile animations at once.
• Tile.GetMapBlock function, for getting a section of a map that contains all tile data (tile, order, rotation, etc.).
• Tile.SetMapBlock function, for putting that section somewhere in a map. So with GetMapBlock and SetMapBlock you can easily copy/paste parts of the map with code, either in the same layer or between different layers.
• Tile.SetLayerColor function, for tinting all the tiles on the specified layer with a color.
• Tile.SetColliderLayer function, for setting the GameObject layer of colliders. (Not related to SpriteTile layers.)
• Tile.SetTileScale and Tile.SetTileLayerScale functions, for setting the scale of sprites. This can be used for special effects or, if you're having issues with occasional gaps between tiles, fixing that problem by using a scale slightly greater than 1.0.
• Loading a new scene (as in Unity scene, not SpriteTile level) is handled properly.
• Tile.SetCamera works correctly when called with different cameras, subsequent to the first call.
• Tile.GetMapPosition and Tile.GetWorldPosition return correct coordinates if Tile.SetLayerPosition has been used.
• A new group type, "Random", where you can add a list of tiles to a group, and when drawing with that group, the actual tile is randomly selected from the list. Useful for quickly adding variety when you have a number of similar tiles (grass, dirt, water, etc.). Also works when filling a selection box, so every tile in the selection is randomly chosen.
• Multi-select for the Tiles section, where shift-clicking another tile will select the range of tiles, so changing the default collider/order-in-layer/rotation/etc. will be applied to all the selected tiles in the range. Also good for adding multiple tiles to Random groups with one click.
• Up and down buttons for layers, which can be used to rearrange layers easily by moving them up or down in the list.
• A "Sync ScrollView Position" toggle, which keeps the same scrollview position and preview size in the Level view, when switching between layers that have the same dimensions. Otherwise, all layers remember their own scrollview positions and preview size.
• The "Editor Preview" button is replaced by two buttons, "This Layer" and "All Layers", for making the preview show the respective layers.
• The tile "Name" and "Number" toggle states are saved in the editor preferences, along with the currently selected tileset and the grid toggle.
• Changing layers can also be done from the keyboard, using alt+up arrow and alt+down arrow.
• When using the "Replace" button, the TileManager is updated correctly.
• If the TileEditor window is kept open during play mode, it will be usable again when play mode is stopped, without having to close and re-open it.
• Changing the default order-in-layer for a tile in the Tiles section and then drawing the tile will always work correctly. Groups with various order-in-layer values are also always drawn correctly.
• After creating a group, the mouse wheel continues to work for the Tiles section.
• When clicking "Refresh" with the tile numbers displayed, the tile numbers remain correct.
• A number of things have changed--if you're upgrading, you will need to read the update note file carefully! Make sure you have a backup of your project in case something goes wrong (which it won't, but better safe than sorry)!
• The screen size/aspect ratio/orientation can be changed arbitrarily at runtime, and the tiles will be automatically updated as needed.
• Tile.LoadGroups for loading a groups file.
• Tile.CopyGroupToPosition for copying a specified group to a position in the map, with an optional offset (for adjusting the "pivot point" of the group).
• Tile.SetCameraAuto is removed, and Tile.SetCamera now does what SetCameraAuto used to do. Tile.MoveCamera and Tile.SetCameraPosition are also removed. If you were using those functions, just move the camera's transform directly. (As a side effect, the problem with using SetCamera in Awake in webplayers is apparently banished.)
• You can move the camera on the z axis (zoom in/out) for perspective cameras, or change the orthographic size for orthographic cameras, and the tiles will be automatically updated as needed. Note that zooming out can potentially create tons of GameObjects if you zoom out too far, so limit zooming to a sensible amount.
• Since camera rotation can potentially cause errors, having the camera not be rotated is enforced.
• Tile.SetTileMaterial can be used to set the material of a particular type of tile, so all instances of that tile will have a given material.
• Tile.SetTileMaterial can also be used to set the material of a specific tile in the map. These two methods can be combined, where setting a material for a specific tile in the map will override the material for a tile type.
• A non-square tile grid is possible now, so Tile.NewLevel can use a Vector2 for the tile size instead of a float. A float can still be used, in which case the X and Y tile grid sizes will be the same.
• Likewise, the LevelData class now uses a Vector2 for the tile size.
• Tile.GetTileSize returns a Vector2 instead of a float (guess why!).
• Tile.SetCamera should now be called before NewLevel or LoadLevel, instead of after. This means there's no need to track whether SetCamera has been called after loading a level, since it can just be called once in Awake or whatever and forgotten about.
• For the sake of consistency, tile layer positions are always reset when loading a level or making a new level, even if the level is the same size as the previous level.
• The level format is version 2 now. SpriteTile 2.0 will load files from earlier versions, but SpriteTile 1.2 and earlier will not be able to load SpriteTile 2.0 files.
• The Editor and Resources folders have been moved to a SpriteTile folder for better organization. (The Plugins folder is not moved, since that's a Unity limitation, sorry.)
• Fixed issue with loading a level of the same size as the previous level, where on-screen tiles could fail to update properly.
• Fixed error that could potentially occur in camera movement code with non-square levels.
• Changed use of System.Text.Encoding.ASCII to System.Text.Encoding.UTF8 for better compatibility.
• There's a ">" button next to "Tile size", which enables a non-square tile grid; the "Tile size" changes to "Tile size X" and "Tile size Y". Click the "<" button to change back to a square tile grid.
• There is a "Move" button now for the tile list (which replaces the "Delete" button, which has been moved: see below). This is useful for rearranging tiles after they've been imported, in case you want a different order for coding or other purposes. You can move tiles around in the list as desired without having to worry about messing up either the current level, or previously-saved levels or groups. They will continue to load and work as normal.
• Tiles have a "Non-transparent" checkbox, which if checked will cause them to use a non-transparent shader by default. Opaque shaders can improve performance, so it's usually a good idea to enable this for tiles that have no transparent pixels.
• Tiles also have a "Use dynamic lighting" checkbox, which if checked will cause them to use a lighting-enabled shader by default. Lighting will reduce performance, so leave this disabled unless you need the tile to react to lighting.
• Options to auto-load the most recently used level and group files whenever the TileEditor window is opened.
• The "Delete" button for tiles is changed so that it's only accessible after clicking the "Move" button first.
• The trigger overlay will also show the trigger numbers on the tiles, so they can be seen at a glance without having to hover over the tiles.
• Using the "pick tile" function (pressing the "p" key) will scroll the Tiles window to the selected tile.
• Improved path handling when loading and saving levels/groups/sprites, and the saved paths are also per-project now instead of universal.
• Fixed loaded groups being upside-down.
• Fixed issues with groups not being handled correctly when deleting a tile.
• Tiles that are part of atlases keep their number suffix when using the Refresh button or re-starting the TileEditor. They also use the Unity sprite name now, so they start with 0 instead of 1. e.g. MyTile-1 becomes MyTile_0.
• Using the "pick tile" function will work if the tile is the first tile in a set.
• Fixed editor preview displaying too large previews anyway and potentially crashing the editor.
• Colliders on empty cells are visible now in the TileEditor.
• Setting tiles with physics colliders from code will work when using SetCamera.
• Saving levels works if using the TileEditor DLL.
• Tile.UseTileEditorDefaults function, for using the per-tile defaults set in the TileEditor when calling Tile.SetTile/SetTileBlock.
• Fixed bug where levels saved from the TileEditor would not save some properties correctly.
• Fixed bug in the TileEditor where deleting the last sprite set in the list would not work correctly in the TileManager asset.
• Prevented TileEditor from loading Multiple sprites where the count was > 1024.
• Tile.SetRotationBlock and Tile.SetOrderBlock will work correctly on-screen if p2 < p1.
• The TileEditor correctly tints the collider overlay depending on whether physics colliders are used for a tile.
• Fixed small glitch with the efficiency of updating physics colliders from code.
• Sprites made with the Multiple sprite mode can be used now. For the most part they work the same as Single sprites and both can be mixed freely, with the exceptions that loading a Multiple sprite will load all the sprites in that texture at once, and the Replace button can’t be used when a Multiple sprite is selected.
• Tile.SetCameraAuto, which allows you to move the camera directly in code with transform.Translate or transform.position, or by using animation with the camera’s transform, rather than using Tile.MoveCamera/SetCameraPosition.
• Tile.ScreenToMapPosition function, which is useful for converting the mouse position to the map position of a specified layer, so you can easily do things like clicking on a tile.
• Tile.GetLevelBytes function, which is good for saving or uploading procedurally-generated levels.
• Tile.SetBorder function, for easily making a border of a given tile around a level.
• Tile.SetTile and Tile.SetTileBlock can optionally specify whether to add or remove colliders. This saves having to use both SetTile and SetCollider separately, since those functions are frequently called together.
• Likewise, Tile.DeleteTile and Tile.DeleteTileBlock can optionally specify whether to remove any collider that might exist.
• Tile.SetTile and Tile.SetTileBlock can use TileInfo variables in addition to using the set and tile variables separately.
• Significant speed improvement if many tiles with physics colliders are set procedurally.
• If no physics colliders are used, setting/removing collider cells is more efficient.
• Tile.SetCollider works when used on an empty tile.
• Fixed issue when removing colliders from tiles that previously had physics colliders.
• Tile.GetMapPosition and Tile.GetWorldPosition work properly if Tile.SetLayerPosition has been used.
• Physics colliders are correct for rotated tiles.
• Fixed issue with SpriteTile not functioning correctly after changing scenes.
• Tile.EraseLevel properly resets order in layer and rotation.
• Editor Preview button, for displaying levels (or part of a level) in the scene view.
• Delete Preview button, for removing the preview.
• Holding down the space bar and the mouse button while moving the mouse will pan the level view (like in Photoshop).
• The “collider” tile default no longer serves double duty as both the collider cell default and the way to activate physics colliders. Instead, it now only sets the collider cell default. There’s now an additional “use physics collider” setting, which is the way to activate physics colliders.
• TileEditor displays world positions for each cell in addition to cell coordinates. (If the tile size is 1.0, then the world position is the same as the cell coordinate.)
• The divider between the tiles and groups can be moved correctly if there are more than 8 tile sets.
• Tile.SetTileRenderLayer function, for setting the layer of sprites (that is, the GameObject layer used for rendering, not sorting layer).
• Tile.SetTileMaterial can be called at any time, and doesn't need to be called before SetCamera.
• Tile.SetColliderMaterial can likewise be called at any time.
• Better CharacterControl demo script.
• TileEditor buttons not cut off on Windows.
• Fixed TileEditor DLL so that loading textures works.