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.
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
- Add a Canvas to your scene (GameObject -> UI -> Canvas). This will also add an EventSystem game object to your scene's hierarchy:
- Add an Image as a child of your Canvas (GameObject -> UI -> Image):
- Adjust the image to fill the entire screen, by setting the image's
RectTransformcomponent Anchor Preset to stretch/stretch, and setting the Left, Right, Top and Bottom to zero.
- 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.
- Set the Source Image field of the Image component in your Canvas to this newly created sprite: