Scriptable Tiles, Scriptable Brushes, Using 2D Tilemap Extras

Unity’s Tilemap is very extendable.

Scriptable Tiles

I can create my own Tile types by using Scriptable Tiles. This allows me to do all kinds of things like create auto tiling feature to Animating Tiles.

Scriptable Brushes

I can create my own Brushes by using Scriptable Brushes. I can create circle fill brushes, line fill, or brushes that paint prefabs.

2D TilemapExtras

These things take a lot of time to implement and get right. Luckly for us is Unity already did the work for us. They have a Preview Package called 2D Tilemap Extras which comes loaded with useful Brushes and Tiles. …

Creating Tilemaps, Tile Palettes, and Tiles

To use Tilemaps in Unity requires some things. I need Tiles to paint, I need a Tile Palette that contains the Tiles that I will be using, I also need a Grid Game Object that contains a Tilemap (think of this as a layer) Game Object. If I want the tile palletes to interact with Physics I will also need to use Tilemap Collider 2D, which means that it will only interact with 2D Physics. For more information and details on Tilemaps refer to the Unity Manual, I will only be touching on a small portion of using it.


Custom Property Attributes

I have already used Unity’s Built in attributes to make the Inspector look more organized.

To see the code for Unity’s Attributes

I also have a custom Property Drawer for my ScriptableObject Reference types.

Unity recently had a sale on some of its assets and one of them was the Odin Inspector. I am a big fan of using already made assets to assist in my work flow, instead of reinventing the wheel. …

Using Scriptable Objects

Scriptable Objects make it easy to pass data between Game Objects, this is especially useful for global variables that are used in your game and helps to keep your Game Systems Modular. For example you have a spawning system that only spawns objects if the player is alive. Your UI System displays the Score, the Players Lives and other data. You can’t use the spawning system or the UI system without the player.

This is inspired by 2 Unite talks Unite Austin 2017 — Game Architecture with Scriptable Objects and Unite 2016 — Overthrowing the MonoBehaviour Tyranny in a Glorious…

Creating Rewarded Video Ads in Unity.

I have a Button in my Shop Panel to Watch an Add for 100 G

Using On Screen Controls

Set Up

Since the Game I am developing is for Mobile I need a for the Player to be controlled. The Easiest way to do this is by Using the New Input System On Screen Controls. I have an Image on my HUD that represents the Left Thumb stick on a game controller. I also have 2 Buttons to represent the Jump Button and Attack Button.

Using Unity UI Buttons to Interact with the Player

When Creating a UI in Unity you can add a Button.

In order to Interact with the Button Unity Provides a On Click Unity Event that you can register to.

An Unity Event can run any public Method or Change any public Property on any GameObject Components in the Scene.

I have a method for Selecting an Item in my Shop and For Buying an Item in my Shop in my Unity Manager on my Canvas.

Using ScriptableObjects and Prefabs

I create a Gem ScriptableObject to keep track of how many Gems that my Player has. See my Core Framework on GIT hub for more information on ScriptableObject Variables.

James Lafritz

Excited about changing my hobby into a new carer with GameDevHQ course.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store