Britishmusicguide - Xem ngay tin 24h | Tin mới và siêu chất lượng
  • Home
  • Công Nghệ
  • Du Lịch
No Result
View All Result
Saturday, December 18, 2021
  • Home
  • Công Nghệ
  • Du Lịch
No Result
View All Result
Britishmusicguide - Xem ngay tin 24h | Tin mới và siêu chất lượng
No Result
View All Result

Unity Tutorial How To Make Restart Button To Reload The Scene In Jetpack Clone Android Game

admin by admin
July 26, 2020
in Game
33
Unity Tutorial How To Make Restart Button To Reload The Scene In Jetpack Clone Android Game



#unitytutorial #unityandroidtutorial #unityreloadbutton
In the previous video ( we created a Jetpack game prototype with pick up fuel can feature. In this video tutorial, we will add a restart button to our game so we will be able to reload the scene when fuel is over and play again.

The BEST MECHANICAL KEYBOARD Metoo Zero for the price. I use it. And I must say that it’s perfect!

Consider purchasing my ULTIMATE UDEMY COURSE with great discount

If you like what I’m doing then you can support me through
www.patreon.com/alexanderzotov
or here

Thank you)

What this video is about and what it can be used for also: unity 2d tutorial,
Unity Tutorial How To Make Restart Button, Unity Tutorial How To Make Restart Button To Reload The Scene, unity restart button, unity restart game, unity restart scene, unity restart level, unity restart game button, unity restart scene button, unity restart scene script, unity restart level script, unity reload current scene, unity reload scene, unity reload level,unity reload script, unity reload scene button, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.

Nguồn: https://britishmusicguide.com/

Xem thêm bài viết khác: https://britishmusicguide.com/game/

Xem thêm Bài Viết:

  • Vương Quốc Gem – Cổng game đổi thưởng siêu hấp dẫn 
  • Các loại thống kê lô xiên đang và cách thống kê hiệu quả
  • Hướng dẫn cách quay nổ hũ Rikvip dễ trúng nhất
  • LEGO City Undercover – 100% Completion Reward – Super Minifigure + 450 Gold Brick Reward
  • ALL LEGENDARY POKEMON COOKING! – Pokemon Quest Part 10 (Switch, IOS, Android)
Previous Post

Hướng dẫn ghi âm trên windows 10 không cần phần mềm

Next Post

KHI CÔ ĐƠN EM NHỚ AI - JUUN ĐĂNG DŨNG FT. R.TEE | OFFICIAL LYRIC VIDEO

Next Post
KHI CÔ ĐƠN EM NHỚ AI – JUUN ĐĂNG DŨNG FT. R.TEE | OFFICIAL LYRIC VIDEO

KHI CÔ ĐƠN EM NHỚ AI - JUUN ĐĂNG DŨNG FT. R.TEE | OFFICIAL LYRIC VIDEO

Comments 33

  1. Alexander Zotov says:
    1 year ago

    ALARM! ALARM! COROUTINE ISSUE DETECTED!
    If you press and hold your finger at the very beginning of the game, pass through the comets without touching them, pick up the fuel can and fly off the screen without releasing your finger then fuel counter will freeze at some value and will not go down until you release and put finger back on the screen. It happens because of the coroutine. When it starts it takes the current fuel amount value (let it be 50 for example). Coroutine stops with two conditions – if finger is released or if fuel amount inside this coroutine is equal to zero. So if you pick up fuel can while coroutine is running when fuel amount equals to 50 then overall fuel amount becomes 100 back again. But inside the coroutine, it still goes down from 50. When coroutine is over (loop comes to zero) then engine should stop but it doesn't happen because fuel amount is 50 now. And it will always be 50 until you release the finger and put it back on the screen to start new coroutine which will countdown from 50 to 0.
    So to fix this issue we should replace this line in BurnFuel coroutine
    for (int i = fuelAmount; i >= 1; i–)
    with this line
    while (fuelAmount > 0)
    and everything will work fine.
    So coroutine code will look like this

    private IEnumerator BurnFuel()
    {
    while (fuelAmount > 0)
    {
    fuelAmount -= 1;
    yield return new WaitForSeconds(0.01f);

    if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended)
    //if (Input.GetMouseButtonUp(0))
    break;
    }
    }

    But we should use WHILE loop inside any of the coroutine very very carefully because it can halt the running project easily.

    Reply
  2. The Rainbow Blade says:
    1 year ago

    Why does my scene freeze after restarting?

    Edit: nvm I forgot to put Time.timeScale = 1f;

    Reply
  3. MTGK - Meraklı TV says:
    1 year ago

    Script

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    public class Restart : MonoBehaviour {
    public void RestartGame()
    {
    SceneManager.LoadScene ("Scene Name);
    }
    }

    Reply
  4. Thicc Befox says:
    1 year ago

    You can probably set the scene that you want to reload as
    SceneManager.LoadScene(SceneManager.GetActiveScene())

    Reply
  5. IchbinJonqs says:
    1 year ago

    thank you needed this for my game

    Reply
  6. ConstantLime830 says:
    1 year ago

    y is this not working for meeeeeeeee

    Reply
  7. Three_A says:
    1 year ago

    Спасибо большое за видео! Вы мой спаситель, Александр)
    Подскажите, у Вас есть видео, в котором бы объяснялось, как научить эту кнопку появляться только после смерти гг?

    Reply
  8. Ulises Gamboa says:
    1 year ago

    I don't know why it doesn't grab the click or the touch of the reset button. I did everything that appeared in the procedure. I even checked that the scene was the same as the code. Help!

    Reply
  9. STARPIG !!! says:
    1 year ago

    Perfect!! Fast and simple like every Unity tutorial should be.

    Reply
  10. DSlut says:
    1 year ago

    Thanks for the tutorial! @Alex, I've got a question. I added a restart button to my simple puzzle game with WinText (see your another guide), and it happens that WinText stays on a screen when I press restart button. How I can avoid it and make full restart?

    Reply
  11. HÜSEYİN DEMİR says:
    1 year ago

    You are man

    Reply
  12. Polat gündüz says:
    1 year ago

    pls restart code write

    Reply
  13. нано бараш says:
    1 year ago

    my scene freezes after pressing the restart button

    Reply
  14. Max Derksen says:
    1 year ago

    Thanks)

    Reply
  15. Zenildo Dende says:
    1 year ago

    thank u so much!

    Reply
  16. Johnny D says:
    1 year ago

    simple and very clear, thank you!

    Reply
  17. Zerprob says:
    1 year ago

    what is the canvas?

    Reply
  18. YouiDaBoss says:
    1 year ago

    So I have BG music in my game and whenever I reset the game, the music stays but another one plays again. Can you please help?

    Reply
  19. MONER VLOG says:
    1 year ago

    thank you but the semplescene can not Load into my projects

    Reply
  20. Tech Games says:
    1 year ago

    Great job sir

    Reply
  21. Loweni says:
    1 year ago

    Can't find my restart button sprite in the project folder what do I do?

    Reply
  22. THE BAD WAN says:
    1 year ago

    Thank you so much dude!!!!

    Reply
  23. Rajang gg says:
    1 year ago

    thx man for this video

    Reply
  24. Rao Muhammad Usama says:
    1 year ago

    I am a beginner and wanted to integrate a restart button in my game. Thanks for helping me out.

    Reply
  25. Dipanshu Mahla says:
    1 year ago

    The update function does not work after reloading the scene.

    Reply
  26. skyhuntergr says:
    1 year ago

    Alexander is one of the most informative and easy going Unity tutors in Youtube. I just love the mood and the valuable things you teach us man, straight to the point as always. Thanks!

    Reply
  27. Aspect DK says:
    1 year ago

    Plzzz help me! I have no funktions? What can i do?

    Reply
  28. Cactus1206 says:
    1 year ago

    Hey i got a question, how do you assign a key to press a button in Unity?

    Reply
  29. Archibald Findri says:
    1 year ago

    I've been looking for a tutorial like this for a while – it's perfect. I have followed it to the letter but it doesn't work 🙁

    Got any suggestions as to why?

    Reply
  30. GeddyGames says:
    1 year ago

    Can someone help me, i followed the code but after i restarted my game it freezes completely. Can someone help me out? thanks and muchly appreciate it!

    Reply
  31. sagar jain says:
    1 year ago

    Thanks a lot for short and simple tutorial…

    Reply
  32. Fuzzy D Pozzy says:
    1 year ago

    man can you please please please make a video, how to build game in unity like what sdk or what java to use and how to install them just please and thanks

    Reply
  33. Miko Tv says:
    1 year ago

    Amazing,please keep it up uploading your awesome tutorials?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Hình Ảnh Đẹp

  • Liên Hệ
  • Chính Sách Bảo Mật

© 2021 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Công Nghệ
  • Du Lịch

© 2021 JNews - Premium WordPress news & magazine theme by Jegtheme.