Quality matters— From Prototype to Unity Assets!

3D to 2D

What is Sprite?

  • Sprite is a simple 2d object that is essentially a graphic image(texture). You can turn any png or jpeg image into Sprite, but usually, we would want to use png as png can have transparency — meaning we won’t see the square edges.
Difference between png (left) and jpeg (right) — image source: vectorstock.com

How to convert png image into sprite in Unity?

  1. drag and drop in the png file that you want to use into the Unity project folder window.
  2. Go to Inspector window → change the texture type from ‘Default’ to ‘Sprite(2D and UI)’
  3. Unity will ask you to confirm — click ‘Apply’.
  • You will also need to add Box Collider and Rigidbody to these gameobjects, HOWEVER, since we are converting from 3d to 2d, we need to make sure that we are adding Box Collider 2D and Rigidbody 2D.
  • In Enemy script, we will also need to convert OnTriggerEnter Method to 2D type as shown below.
Make sure that you are not missing anything such as variable value or tag from the previous gameobject.

Sprite Layers

In ‘order In layer’, the higher number is the closer is to the Top layer.
  1. To create a new sorting layer, you can click on ‘Default’ → Add sorting layer…
  • Please note that, in this ‘sorting layers’ window, the lowest row represents the highest sprite layer, so name them accordingly.
  • Player, Enemy, and laser = Foreground
  • Background sprite = background

--

--

--

XR Unity Developer / Designer / Architect

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

QGIS — Connecting Two points Perfectly

QGIS Logo

Rough Start - What Happened?

Service providers — please, stop being sleazy! (logz.io sort-of review)

The Inner Workings of Server-side Swift

DIY: How to buy a domain name, hosting and set up WordPress Manually

How to Set-up AWS S3 with Django REST like a Beast

How big MNC’s manages their Big Data?

Ka Boom goes the Enemy

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
Du Young Yoon

Du Young Yoon

XR Unity Developer / Designer / Architect

More from Medium

Adding a burst laser powerup

2.5D Platformer — Improving the Ledge Grab #10

Creating An fbx Emission Layer For Unity Using Photoshop & Blender

From Prototype to Work of Art