Rules Concerning Prefabs

What are the hard and fast rules when using prefabs?
Ever since I changed everything to prefabs I keep getting situations where I have objects that are not referenced or the ball and paddle keep “breaking”, meaning the ball is not “attached” to the paddle anymore. I can launch the ball but when the ball comes back down it hits the paddle and then dies. I fixed it once and am working to remember what i did but I just had it happen again in the Win The Level & Load video and I cannot figure out what I am doing.

I scrapped the game once and restarted and then had the Object not reference error again and realized it happened once I made the prefab folder. I found I was dragging from the prefab to the screen and not Hierarchy window (I believe) and once I pulled the prefab to the Hierarchy screen and then made sure I used that it fixed the Object reference.

So again question is: What are the hard and fast rules when using prefabs? Are there dos and don’ts? If this was in the video I have frustrated myself enough were I am not seeing it.

Thank you
Scott

I finally got the ball reconnected to the paddle in both scenes by deleting the prefab multiple times and dragging the Ball from the Level 1 (which worked) back to prefab.
On the prefab the Ball script has the field for Paddle 1 but I cannot select the Paddle script. Is this normal?

Privacy & Terms