GAME OVER – How to make a Video Game in Unity (E08)

What happens when we lose?

● Download the Project Files:

♥ Support my videos on Patreon:


This video is part of a mini-series on making your first game in Unity.


♥ Donate:
♥ Subscribe:

● Website:
● Facebook:
● Twitter:


Edited by the lovely Sofibab.


► All content by Brackeys is 100% free. I believe that education should be available for everyone. Any support is truly appreciated so I can keep on making the content free of charge.

♪ Baby Plays Electro Games


Xem thêm bài viết khác:

Top 10 Stocking Stuffer Board Games
Peanuts Movie: Snoopy's Grand Adventure Walkthrough Part 1 (PS4, X360, WiiU) World 1: Jungle
Citra 3DS Emulator – Snoopy's Grand Adventure ingame 1080p
  • Hello everyone!

    I've addressed this a few places (we talked about it in one of livestreams) but I probably haven't been clear enough to people who don't watch all the videos 🙂

    I've decided to focus more on standalone videos and smaller series. The reason for this is that I found that both the Tower Defense and the Multiplayer FPS series were getting too long which meant that only a very small fraction of the people who started watching actually got to the later videos. And this is a shame because a lot of the videos covered later in the series aren't harder to understand than the first ones and might be just as important.

    So instead I want to create videos that can apply to as many games as possible while still tackling some of the more advanced subjects. I think the Scope, Bullet Time and Volumetric Lights tutorials are good examples of this because they both cover subjects requested for the FPS and Tower Defense series but in a way that makes it usable to people working on other games as well.

    On top of that I had been getting request for a looong time to remake the Make a Game course because it was getting outdated. So I thought this would be a good opportunity to create a smaller series for beginners.

    I think overall since I started this new approach that the comments and feedback has been way more positive and the videos are getting way more views on average. I've also found that I have way more fun creating videos this way because it can be much more varied.

    I hope you guys understand and I'm just excited to bring you new interesting videos – Especially once we wrap up this short series 😀

    Thanks for being awesome!

  • HeyBrackeys i got an error on the game it says AssetsscriptsPlayercollision.cs(16,44): error CS1061: 'GameManger' does not contain a definition for 'EndGame' and no accessible extension method 'EndGame' accepting a first argument of type 'GameManger' could be found (are you missing a using directive or an assembly reference?) do you know how to solve this

  • We started with 4 Million. Now we are down to 650,000.

  • I'm kinda proud. I didn't be like 60% of people when using tutorials, I introduced sprinting on my own no tutorials no Google, I twisted versions of tutorials to create enemies and movable, yes movable by the player not already moving platforms

  • Can someone tell me how do I know when to put = or ==? I see sometimes he puts 2 == and just for testing I try put it just once and it doesn't work. So how do I know if I need to put one or two? Thanks for the videos!

  • So another nuub question here:
    @08:04 'then press dot'
    When i press dot, nothing comes up. Also, it seems to autocorrect to a load of random shit i dont need. Like, when i type in 'Transform' after public, it autofills 'CryptoAPITransform'
    Must be correcting for some different libraries(?) or something. Anyone know how to make it Unity freindly? 🙂

  • question: @05:27
    Why do we use rb.position? Surely we should use the Transform right? I cant even see a position on the RigidBody Component, its all just speeds.
    It works, but im confused. Anyone care to explain? <3

  • Assets/Scripts/Gamermanager.cs(2,19): error CS0234: The type or namespace name `SceneManagement' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

    i am getting this error!!!
    Help Please

  • when the player hits the ground i get the end game message how do i prevent that
    never mind there was a bracket i didn't place that for some reason caused it

  • How to fix this?
    Assets/Scripts/PlayerCollision.cs(12.45): error CS0122: 'GameManager.EndGame()' in inaccessible due to its protection level.
    Also under every script there reads "The associated script cannot be loaded. Please fix any compile errors and assign valid script"

  • DimerDimer

    Author Reply

    can somebody help me?Im getting a message saying "Trying to Invoke method: GameManager.Restart couldn't be called."

  • Me not having a game manager script after I make one and save it

  • Digital Karen wants to speak to the game manager

  • Thanks so much for these great videos!

    I ran into a snag by entering a small mistake in the code, in the playermovements script I accidentally wrote
    if (rb.position.x < -1f)
    instead of
    if (rb.position.y < -1f)

    so my game was restarting using data from the wrong axis.
    Anyway I didn't notice this at first, and I thought the problem was that my player was colliding with the ground at the start of the game over and over again. To check this I wrote a Debug.Log checking the y position to see if my player was dropping and colliding with the ground without me realising. It wasn't.

    ANYWAY, the point is, I wrote the debug.log code without even thinking about it and even though it wasn't the problem, I realised I had learnt how to problem solve and troubleshoot on my own!

    soon after i realised the actual problem but anyway, just wanted to share that cool little thing. You're an amazing teacher!

  • I did everything right, but why does his game look much cooler than mine?

  • Are you a Persion or a American?

  • why cant i create using UnityEngine.SceneManagement; ?

    it acts like there is no SceneManagement

  • As soon as I press play the game begins the restart process. How do I make it so I hit the obstacle and not the ground that enables restart?

  • help

  • Im gonna make this game 100 times till my stupid head remembers it… this episode was sure difficult..

  • How do I stop counting the score once the cube goes off the ground? Currently it just continues.

  • Which is scarier? Getting an error when the tutorial doesn't, or not getting an error when the tutorial does?

  • Kid:*dies*
    Karen:i want to see the Game Manager

  • How to make code tell u the score that u achive when game is ended

  • Good Morning Gentlemen .
    I followed Every single step of this tutorial , except the " Game has ended" if statement .
    I did not need it , Do not ask me how , it just worked without it, The " GAMEOVER" displayed once.
    BTW i have Viasual studio 2008 version which is a crap , i needed to type every single thing , No accessing menu + no variable helper , NOTHING . just the error.
    Thank you Brackeys , you are really helping me after quieting coding for 2 years after graduating.

  • for me it says "the local function Restart is declared but never used" can anyone pls help me

  • All yours game it's so beautiful and good I want download them


  • i don't know to make a video game using graphics .?what to buy or free download.

  • Can somebody explain the bool gamehasended = false and if (gamehasended=false)
    Gamehasended= true

  • i could'nt get anything to work what should i do

  • "We probably geting some Errors"

    Danm i didnt get one does this make me good or bad because i somehow messed up but it worked for me?

  • Make panel show player if he want to go if he unlock the next level somthing like that next ,replay and back if there is a level before that not replay or make him in infinty loop

  • Thanks @brackeys for putting your scripts for download,i didn t know why i get like instantly gamveover in my console,but the problem was that this ; was at the end of a command that didn t need it,and this almost destroyed my project,cool thing that i watched my script and your and could find the problem,thanks again.

  • when i added public float restartDelay = 1f i got a massive preformance hit with frames. can anybody help me? i think it might also be the lighting thing he was talking about but i have 0 evidence of anything. it just makes the game really unplayable. any help is appreciated

  • Who's here after watching Avengers Endgame….

  • no lightning in window

  • Pls help I have this error and I can;t figure out what is wrong with my scripts

    The error:
    Assets/Scripts/PlayerCollision.cs(15,45): error CS1061: 'GameManager' does not contain a definition for 'EndGame' and no accessible extension method 'EndGame' accepting a first argument of type 'GameManager' could be found (are you missing a using directive or an assembly reference?)

    Player Collision Script:
    using UnityEngine;

    public class PlayerCollision : MonoBehaviour {

    public PlayerMovement movement;

    void OnCollisionEnter (Collision collisionInfo)

    if (collisionInfo.collider.tag == "Obstacle")
    movement.enabled = false;


    Game Manager Script:
    using UnityEngine;

    public class GameManager : MonoBehaviour {

    public void Endgame()
    Debug.Log("GAME OVER");


    Note: I have not yet finished the video, waiting to solve this issue, and I can't seem to figure it out. If you choose to help, thanks in advance.

  • slow down holy shit lmao. way way too fast, u need to give us time to relise where tf your talking about.