Extendable Tile
control Unity Tilmap Tile's Color, Sprite, Transform, with optional modules - TileExtensions
Like it? Buy me a candy
If you like my work, you can support me on Patreon
Navigation
Problem
Existing tilemap tiles are rigid realizations with:
- lack of basic features ( color, transform, sprite manipulations ) which are allowed by TileData / AnimatedTileData
- feature set of any Tile is fixed, no customization / optional modules, that have to add repeatatively byself
- lack of Inspector Undo
- Replace Tile type is big issue (change from RuleTile to TerrainTile etc )
- lack of Copy / Paste
- Rigid custom Inspectors, disallowing use Odin, or built-in Range / Header / Space Attributes for Inspector customization
Solution
-
SerializeReference to have optional modules
- no use custom Inspector / PropertyDrawers , to allow Odin, save built-in Undo, Copy / Paste, etc
Demo
Contents
- Demo Scene, tiles, extensions
-
unitypackage to direct import
- full source code on Github to explore
- if your project contains Odin Inspector - ExpandableTile will use it, if not
- TypeToLabelAttribute and custom ContextMenu to comfortable usage
Script types:
- ExtendableTile - CustomTile, that aggregates TileExtensions
- TileExtensionSO - ScriptableObject, containing TileExtension, can be referenced from ScriptableObjectEx
TileExtension list:
-
AnimateSpriteEx - analogue to Animated Tile
-
WeightRandomSpriteEx - analogue to Weight Random Tile
-
TerrainEx analogue to Terrain Tile
-
PipelineTileEx - analogue to Pipeline Tile
-
ColorOutlineEx - evaluate Gradeint based on same-tile-neibhours-count, smooth sides
-
PositionMapEx - Remap tile position with split random MinMaxCurves for X and Y
-
RandomColorEx - Multiply tile color to MinMaxGradient.Evalute(), has Perlin module
-
RotateMapEx - Remap tile rotation with random MinMaxCurve for Z
-
ScaleMapEx - Remap tile localScale with random MinMaxCurve for XYZ
-
ScriptableObjectEx - refers to TileExtensionSO and execute it's TileExtension
How To
Create Tile or TileExtensionSO?
- Project Window -> RMB -> Create/2D/Tiles/Extendable Tile / Extension
Change type of already created extension in Collection or in TileExtensionSO ?
- TileExtension property title -> RMB -> set to [Extension]
Requriments
- Unity 2020.2 Array became reordable at this version
Known issues
Planned