Giter VIP home page Giter VIP logo

com.mitay-walle.extendable-tile's Introduction

Extendable Tile

control Unity Tilmap Tile's Color, Sprite, Transform, with optional modules - TileExtensions

alt text

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

alt text

Contents

  1. Demo Scene, tiles, extensions
  2. unitypackage to direct import
  3. full source code on Github to explore
  4. if your project contains Odin Inspector - ExpandableTile will use it, if not
  5. 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:
  1. AnimateSpriteEx - analogue to Animated Tile
  2. WeightRandomSpriteEx - analogue to Weight Random Tile
  3. TerrainEx analogue to Terrain Tile
  4. PipelineTileEx - analogue to Pipeline Tile
  5. ColorOutlineEx - evaluate Gradeint based on same-tile-neibhours-count, smooth sides
  6. PositionMapEx - Remap tile position with split random MinMaxCurves for X and Y
  7. RandomColorEx - Multiply tile color to MinMaxGradient.Evalute(), has Perlin module
  8. RotateMapEx - Remap tile rotation with random MinMaxCurve for Z
  9. ScaleMapEx - Remap tile localScale with random MinMaxCurve for XYZ
  10. ScriptableObjectEx - refers to TileExtensionSO and execute it's TileExtension

How To

Create Tile or TileExtensionSO?
  • Project Window -> RMB -> Create/2D/Tiles/Extendable Tile / Extension alt text
Change type of already created extension in Collection or in TileExtensionSO ?
  • TileExtension property title -> RMB -> set to [Extension] alt text

Requriments

  • Unity 2020.2 Array became reordable at this version

Known issues

  • #3 some TileExtensions need Enter / Exit PlayMode to Refresh
  • #4 at this moment position rerandomized after any changes in any listed ExtendableTile.Extensions
  • #5 โ›” Error log 'Use RegisterCompleteObjectUndo' - not braking anything
  • #6 โ›” MinMaxGradient dropdown almost not clickable - problem in Unity own realization, if you use Odin - it works fine, either you write own CustomPropertyDrawer, or you can switch Inspector to Debug mode, and switch gradient-type there

Planned

  • #3 RefreshTile() Implementation
  • #4 Seed-based Randomization
  • #2 SiblingRuleEx (Existing Rule Tile has rigid Inspector, i've ported it to PropertyDrawer for RuleEx, but it's not ready-to-use)

com.mitay-walle.extendable-tile's People

Contributors

mitay-walle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.