-1
\$\begingroup\$

I'm making a home screen for my game. I don't know how to transfer a 2d image from Photoshop into a game that's on Unity. How do I import the image and make it visible in game? It’s a 3D game. I don't know what other information is relevant.

\$\endgroup\$
1
0
\$\begingroup\$

There are a number of ways of using a bitmap image as a backdrop in Unity, but the most straightforward way is to use the Unity UI system with an Image component.

  1. Add a Canvas to your scene (GameObject -> UI -> Canvas). This will also add an EventSystem game object to your scene's hierarchy:

Heirarchy with Canvas & EventSystem

  1. Add an Image as a child of your Canvas (GameObject -> UI -> Image):

Heirarchy with Image

  1. Adjust the image to fill the entire screen, by setting the image's RectTransform component Anchor Preset to stretch/stretch, and setting the Left, Right, Top and Bottom to zero.

Image settings in inspector

  1. Import your background image from Photoshop (or any other image editing program) into your Unity project. Unity supports many different filetypes, including Photoshop native (.psd) but also .png, .jpg, .tif, .tga and on and on. Pro tip: Layered .psds imported into Unity remain fully editable as such in Photoshop.

To use a texture as an Image component source image, its Texture Type must be set to Sprite (2D and UI) in import settings.

import settings for UI Image

  1. Set the Source Image field of the Image component in your Canvas to this newly created sprite:

Image complete

Violá:

Viola. And Oboe.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.