Git Product home page Git Product logo

unity-tilemap's Introduction

Unity Tilemap

Tested on Unity 5.4.0f3      

A simple yet highly customisable tile mapping tool made for the Unity Engine.

About
      Features
      Things I Would Like
Help
Contributing

alt tag

About

This tilemap system is a robust system that allows users to customise the tile types and brushes to enable them to be able to easily paint tiles in the Unity Editor as well as in realtime.

Features

  • Scriptable tiles, allows custom behaviour. Including:

    • SimpleTile
    • RandomTile
    • AutoTile
    • TODO: AnimatedTile
    • TODO: ConditionalTile
  • Tile Editor

    • Scriptable tools, allows custom behaviour. Including:
      • Pencil
      • Brush
      • Fill
      • Eraser
      • Eyedropper
      • Line
      • Rectangle
      • Ellipse
    • Proper Undo/Redo (@nickgirardo)
    • Export/Import to ScriptableObject
  • Access the tilemap through a clean API

     //Get tiles by using
     GetTileAt(Vector2 worldPosition);
     GetTileAt(int x, int y);
     //Set tiles by using
     SetTileAt(int x, int y, ScriptableTile to);
     //Invoke a callback to update tiles
     UpdateTileAt(int x, int y);
     UpdateTiles();
     UpdateNeighbours(int x, int y);
     UpdateType(ScriptableTile type);
     [... and more]
  • Different rendering modes

    • Single Sprites
    • Multiple Quads
  • TODO: TileMapCollider2D (Use PolygonCollider2D underneath)

Things I Would Like (But have been put on the back burner)

  • Good documentation
  • More rendering modes
    • Single Quad
    • Chunked Quads
  • Infinite or limited tilemap size (only available on chunked quads?)
  • Layers
  • In-Game tilemap editor

How do I make my own tiles?

In the project window click on Create > Tilemap > Tiles and select a scriptable tile type to create. You can edit the tiles variables by just clicking on it, like anyother asset.

If you want to create your own scriptable tiles (Like the RandomTile or AutoTile) then click on Create > Tilemap > Create C# Tile Script and edit like anyother script. Alternatively create a C# class that inherits ScriptableTile

Can I make custom tools?

Yes. If you want to create your own tools (Like the Pencil or Eyedropper) then click on Create > Tilemap > Create C# Tool Script and edit like anyother script. Since all tools (even the included ones) inherit from ScriptableTool you can also simply create a C# class that inherits from ScriptableTool. Any class that inherits ScriptableTool will automatically be able to use in the Edit Mode tile editor, any public variables will also be exposed in the tile editor toolbar.

Contributing

Feel free to contribute, I will accept pull requests if I think it will benefit the tool. If you want to help but are not sure with what have a look at the TODOs as well as the Things I Would Like sections for ideas.

Special thanks to the following for their contribution:

unity-tilemap's People

Contributors

nickgirardo avatar paullj avatar gitter-badger avatar

Watchers

 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.