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
OMG THANK YOUUUUUUU!!!!! i searched HOURS to find a working tutorial, but yours is quite perfect! straith forward. thanks!
Thanks a lot. Thats what ım looking for . after years this kind of videos still helps us to learn .
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!
Thanks a lot!!! After 4 hours i manage to do it
So helpful
this was helpful
Thank you so much ❤️❤️❤️❤️
thanks dude i finaly find after 2h what i need
No problem 👍
Thanks
OMG THX!🤩🤩🤩
very great tutorial!! i subd
Thanks a lot Dude! Super clear, love it.
tysm :)))
Hello I am making a game and thanks for the help
Thanks! Great tutorial! Keep it up bro! You're funny too.👍
hi do you know a tutuorial that will explain how to add levels to my 2d game?
How do i put the buildIndex instead of increasing it so i can specify the scene/build that i want it to go to?
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 :)
Nevermind - worked it out! I just left off the +1 after the buildIndex - thanks for posting this easy to follow video!
Project Joyride Thanks You!!!
In a very basic way its good for single player.
спасибо большое
Could it just be an empty game object?
Well when I get home I hop this works
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
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?
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?)
???
SAME PROBLEM
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
Its the exact same code just use OnCollisionEnter instead of OnTriggerEnter
@@hackingtons thank you
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 :)
You will have to use CompareTag(“Player”). There’s more details in the docs if you Google that
@@hackingtons fixed it but thanks :)
Ty, you helped me a lot. Btw you have a very nice accent, it's awesome you are not an Indian guy!
wtf that is so racist
I got like 13 errors
Edit: fixed 12 of them
The error is on line 9 and it says identifier expected.
I’m doing this in 3D btw
0:04 I think you forgot to show us how to adjust for 3D
For some reason it will not work for my 3d game. Can someone please tell me why?
If you are using OnTriggerEnter2D there are no 2D components in a 3D game. Try using OnTriggerEnter instead
@@hackingtons thanks it worked
OMG THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I GET TRIGGERS NOW!!!!!
Hackingtons games are strange i like the youtuber Dani's games better
You should enroll in Hackingtons, that’s where the good stuff is. We don’t give away the good stuff for free.
@@hackingtons Ik i was in hackingtons but i got bored cuz unity and python blackbelt were the only things i could do
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");
}
}
}
Рабочий код перехода в другую сцену при касании финиша.