I followed a tutorial to make a Flappy Bird clone. At the end he gives you a premade game so everything works correctly, from jumping to going through pipes, etc.

I want to change the aesthetics though with sprites I made myself. I don't want to change any gameplay, just the sprites. This is easy for the bird, I just selected the asset I wanted and it changed in the scene and game. Easy.

Now, I want to add a building background layer to the back to go along with clouds, stars, and other background elements, and use the parallaxer to make them move. This doesn't work, however. It doesn't show up in the scene or the game when pressing play.

Next I want to make the pipes use a different sprite. So I changed the pipe sprite in the Unity menu to what I wanted, but when I hit play, it's still just pipes.

This is the tutorial project in question and it's free to DL and use, so I shouldn't be having this issue with changing its sprites. Can anyone please talk me through how to get these elements working?

Here is a screenshot of how I've tried making my changes:

Unity screenshot showing red broken prefab disabled and invisible in scene view

  • \$\begingroup\$ What have you tried? Are you using a second parallaxer or are you spawning multiple prefabs from one parallaxer? How is your Parallaxer setup in the unity editor? What code changes have you made? What is actually not working as intended? \$\endgroup\$ – Mailerdaimon Sep 5 '19 at 8:55
  • \$\begingroup\$ I haven't changed anything but the sprite. no code changes or anything. just want to take what he's done and change the pipes to a different sprite and add something else in the background. Haven't touched his code. \$\endgroup\$ – BladeoftheImmortal Sep 5 '19 at 9:11
  • 1
    \$\begingroup\$ You have changed the Sprite of the "Pipe.prefab", Saved and Started? Could you share a screenshort of the Pipe.prefab settings? \$\endgroup\$ – Mailerdaimon Sep 5 '19 at 9:14
  • \$\begingroup\$ Have you tried to drag the prefab instance into the camera rectangle? Can you see the sprite when you are in the prefab edit mode? See: docs.unity3d.com/Manual/EditingInPrefabMode.html \$\endgroup\$ – Mailerdaimon Sep 5 '19 at 10:32
  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$ – DMGregory Sep 6 '19 at 10:50

Make sure you change the sprite on the Prefab and not on an instance of the prefab in the scene. The prefab is named Pipe.prefab. Then save and run the project.

If you want to see the sprite and edit the collider it is best to use the prefab editing mode.

Entering and exiting Prefab Mode

There are many ways to begin editing a Prefab in Prefab Mode, including:

Double-clicking it in the Project window
Using the arrow button next to the Prefab in the Hierarchy window
Clicking the “Open” button in the Inspector
window of a Prefab Asset

See the docs for more information.

| improve this answer | |

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.