How to make a finish line in Unity 2D/3D 2021

Поделиться
HTML-код
  • Опубликовано: 18 апр 2021
  • We show you how to make a finish line for your game in Unity. This will work for both 2D and 3D games.
    Check out Hackingtons: www.hackingtons.com/
    Buy Some Merch: teespring.com/stores/hackingtons

Комментарии • 48

  • @emilian_spielt300
    @emilian_spielt300 Год назад

    OMG THANK YOUUUUUUU!!!!! i searched HOURS to find a working tutorial, but yours is quite perfect! straith forward. thanks!

  • @Ufus.
    @Ufus. Год назад

    Thanks a lot. Thats what ım looking for . after years this kind of videos still helps us to learn .

  • @pandascopz9104
    @pandascopz9104 2 года назад +7

    Your explanation of how the code works with unity is amazing, it is by far the best explanation I've gotten so far. Thank You!

  • @rafaelrodrigues3234
    @rafaelrodrigues3234 10 месяцев назад

    Thanks a lot!!! After 4 hours i manage to do it

  • @brucewayne9434
    @brucewayne9434 2 года назад +1

    So helpful

  • @Mr-MS-Dev
    @Mr-MS-Dev 2 года назад +1

    this was helpful

  • @kareem5340
    @kareem5340 2 года назад

    Thank you so much ❤️❤️❤️❤️

  • @deticek6339
    @deticek6339 2 года назад

    thanks dude i finaly find after 2h what i need

  • @axcilium
    @axcilium 2 года назад

    Thanks

  • @ARJUNPRO7154
    @ARJUNPRO7154 7 дней назад +1

    OMG THX!🤩🤩🤩

  • @bunnygodx
    @bunnygodx 4 месяца назад

    very great tutorial!! i subd

  • @Hyjk87
    @Hyjk87 2 года назад

    Thanks a lot Dude! Super clear, love it.

  • @RealWorld125
    @RealWorld125 Год назад

    tysm :)))

  • @DGBJamalYT
    @DGBJamalYT 2 года назад

    Hello I am making a game and thanks for the help

  • @fabianlo234
    @fabianlo234 5 месяцев назад

    Thanks! Great tutorial! Keep it up bro! You're funny too.👍

  • @guyingame3072
    @guyingame3072 8 месяцев назад

    hi do you know a tutuorial that will explain how to add levels to my 2d game?

  • @joshua5838
    @joshua5838 Год назад

    How do i put the buildIndex instead of increasing it so i can specify the scene/build that i want it to go to?

  • @BW-wd5dc
    @BW-wd5dc 2 года назад +1

    great video!! I was wondering, what does the code need to say if I just want to start the same level over again? I am developing a one-level game for my uni project :)

    • @BW-wd5dc
      @BW-wd5dc 2 года назад +5

      Nevermind - worked it out! I just left off the +1 after the buildIndex - thanks for posting this easy to follow video!

  • @noicthebrave
    @noicthebrave Год назад

    Project Joyride Thanks You!!!

  • @at930pmgames
    @at930pmgames 2 года назад

    In a very basic way its good for single player.

  • @game_master3656
    @game_master3656 Год назад

    спасибо большое

  • @bennisa8102
    @bennisa8102 2 года назад

    Could it just be an empty game object?

  • @russian__lizard645
    @russian__lizard645 Год назад

    Well when I get home I hop this works

  • @iiTzMythic
    @iiTzMythic 2 года назад

    when i use this its say the level doesnt exits what doesnt make any sense
    SceneManager.LoadScene(WinScreen);
    Assets\Scenes\Scripts\FinishLine.cs(13,31): error CS0103: The name 'WinScreen' does not exist in the current context

  • @Five_Buiscuts
    @Five_Buiscuts Год назад

    iv finnished the script and it says tyhere is no errors and iv also done everything else but when i colide with my finnishing line nothing happens any ideas?

  • @dawws0n581
    @dawws0n581 2 года назад +1

    Assets\FinishLine.cs(9,23): error CS1061: 'Collision2D' does not contain a definition for 'tag' and no accessible extension method 'tag' accepting a first argument of type 'Collision2D' could be found (are you missing a using directive or an assembly reference?)
    ???

  • @HMYT-jw5to
    @HMYT-jw5to 2 года назад

    im using a player controller script that has makes its on collider when put on the player so if someone can tell me how to can do the same thing with the scripts collider

    • @hackingtons
      @hackingtons  2 года назад

      Its the exact same code just use OnCollisionEnter instead of OnTriggerEnter

    • @HMYT-jw5to
      @HMYT-jw5to 2 года назад

      @@hackingtons thank you

  • @panagiotiskotsias4496
    @panagiotiskotsias4496 Год назад

    Hey man i use a custom Player movement script with it's own collision, and I changed OnTriggerEnter2D to OnCollisionEnter2D. The problem is that there is an error in the line collision.tag == "Player" the ".tag" highlights as wrong for me please help thanks :)

    • @hackingtons
      @hackingtons  Год назад +1

      You will have to use CompareTag(“Player”). There’s more details in the docs if you Google that

    • @panagiotiskotsias4496
      @panagiotiskotsias4496 Год назад

      @@hackingtons fixed it but thanks :)

  • @franciscospinola7883
    @franciscospinola7883 2 года назад

    Ty, you helped me a lot. Btw you have a very nice accent, it's awesome you are not an Indian guy!

    • @manudles
      @manudles Год назад

      wtf that is so racist

  • @drguineapig8755
    @drguineapig8755 18 дней назад

    I got like 13 errors
    Edit: fixed 12 of them
    The error is on line 9 and it says identifier expected.

  • @spencerworkman
    @spencerworkman Год назад

    0:04 I think you forgot to show us how to adjust for 3D

  • @jadongames777
    @jadongames777 2 года назад

    For some reason it will not work for my 3d game. Can someone please tell me why?

    • @hackingtons
      @hackingtons  2 года назад

      If you are using OnTriggerEnter2D there are no 2D components in a 3D game. Try using OnTriggerEnter instead

    • @jadongames777
      @jadongames777 2 года назад

      @@hackingtons thanks it worked

  • @avaobrien7222
    @avaobrien7222 2 года назад

    OMG THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I GET TRIGGERS NOW!!!!!

  • @triggerfinger5116
    @triggerfinger5116 3 года назад +2

    Hackingtons games are strange i like the youtuber Dani's games better

    • @hackingtons
      @hackingtons  3 года назад +1

      You should enroll in Hackingtons, that’s where the good stuff is. We don’t give away the good stuff for free.

    • @triggerfinger5116
      @triggerfinger5116 3 года назад

      @@hackingtons Ik i was in hackingtons but i got bored cuz unity and python blackbelt were the only things i could do

  • @potato_2344
    @potato_2344 7 дней назад

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    public class finish : MonoBehaviour
    {
    void OnTriggerEnter2D (Collider2D myCollider2D)
    {
    if (myCollider2D.tag == ("Player"))
    {
    SceneManager.LoadScene("Menu");

    }
    }
    }
    Рабочий код перехода в другую сцену при касании финиша.