Make a TIMER & COUNTDOWN in 5 Mins | Unity Tutorial for Beginners

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

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

  • @bcnghia
    @bcnghia Год назад +7

    I didn't expect my problem to be solved by you again, thank you very much

  • @r.f886
    @r.f886 Год назад +8

    Clean and straight to point, thank you very much 👍

  • @bluaurax
    @bluaurax Год назад +5

    Amazing tutorial dude! Works so perfectly

  • @ELISABETTAIANNONE
    @ELISABETTAIANNONE 11 месяцев назад +2

    Dude this tutorial is amazing, thank you!

  • @citrinebby
    @citrinebby Год назад +2

    you are a lifesaver thank you!!!

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

      Thanks for your kind feedback 🙏
      I'm glad hear that.

  • @dogebella
    @dogebella Год назад +2

    good and clear explained. Great work 👍

  • @詩妍-e2w
    @詩妍-e2w Год назад +2

    Great tutorial, Thank you so much

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

      You're very welcome! I'm glad you found it helpful. 😊
      Thanks 🙏

  • @totojatiwijayanto4501
    @totojatiwijayanto4501 Год назад +3

    Great and useful stuff. Hi Murat, please make a video that teaches how to create a dialog box. Thanks, hope you doing well

    • @RehopeGames
      @RehopeGames  Год назад +2

      Hi 🖐
      I noted your request bro.
      I'm great , Thanks for your interest 😊

  • @abhinavkhatana
    @abhinavkhatana Год назад +3

    Thank you for this it will help me to make a speed run game

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

      I'm glad to hear that and thanks for your feedback 😊

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

      @@RehopeGames you know that i am watching you since your 2nd video

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

      @@abhinavkhatana Thank you so so so much bro 🙏🙏🙏🙏
      Is there a special video you want about unity?

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

      @@RehopeGames yes, glad if you will make
      In both 2d and 3d gun shooting tutorials
      With variable shooting speed and variable accuracy
      I've watched others video but I literally do not understand they just say to copy and paste the code

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

      Did you want to change the bullet speed or the camera shooting speed ( like slow motion) ?

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

    Hi, new subscriber, please don’t stop making vídeos

  • @何文煜-z6i
    @何文煜-z6i 10 месяцев назад +1

    Usefulllllllll😍🤩😍🤩and easy

  • @Tunderpal
    @Tunderpal Год назад +2

    Is it ok if you could put a copy of your code in the descriptions of your videos? They're all great but it makes it much easier to cross refference.

  • @SuperMillwall
    @SuperMillwall Год назад +2

    How would you accelerate the time? For example if you’re playing a football (soccer) game they play 45 mins each half.. But obviously you can’t set the time at 45 minutes real time.. You need it to be 5 mins real time but it needs to speed up in game.
    Secondly, for a football game, at 45 minutes how do you make the timer stop the game and activate a “Half Time Menu”
    Thanks for your help. Your videos are so informative and easy to follow.

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

      You can use Time.timeScale to do that.
      Look at the unity document for detail.
      docs.unity3d.com/ScriptReference/Time-timeScale.html
      I wish success in your project 🙏

  • @biged606
    @biged606 Год назад +2

    Lovely!❤👍🏻😊

  • @breakdancerQ
    @breakdancerQ 9 месяцев назад +1

    Damn good video, got it easy

  • @antro_phagus
    @antro_phagus Месяц назад

    worked perfectly, thank you!!

  • @PixelNoob01
    @PixelNoob01 9 месяцев назад +1

    hi, can you pls tell me how to add milliseconds, i cant find it in your link. Would be so happy, tnx.

  • @AMINEI-wl9rk
    @AMINEI-wl9rk 8 месяцев назад +9

    using System.Collections;
    using System.Collections.Generic;
    using TMPro;
    using UnityEngine;
    public class timescript : MonoBehaviour
    {
    [SerializeField] TextMeshProUGUI timerText;
    float elapsedTime;
    void Update()
    {
    elapsedTime += Time.deltaTime;
    int minutes = Mathf.FloorToInt(elapsedTime / 60);
    int seconds = Mathf.FloorToInt(elapsedTime % 60);
    timerText.text = string.Format("{0:00}:{1:00", minutes, seconds);
    }
    }

    • @PixelNoob01
      @PixelNoob01 8 месяцев назад +1

      Do u know how to add milliseconds?

    • @AMINEI-wl9rk
      @AMINEI-wl9rk 3 месяца назад

      @@PixelNoob01 using System.Collections;
      using System.Collections.Generic;
      using TMPro;
      using UnityEngine;
      public class timescript : MonoBehaviour
      {
      [SerializeField] TextMeshProUGUI timerText;
      float elapsedTime;
      void Update()
      {
      elapsedTime += Time.deltaTime;
      int minutes = Mathf.FloorToInt(elapsedTime / 60);
      int seconds = Mathf.FloorToInt(elapsedTime % 60);
      timerText.text = string.Format("{0:00}:{1:00", minutes, seconds);
      }
      }

    • @Rafit_Hasan
      @Rafit_Hasan 2 месяца назад

      wrong timmer donot use this anyone

  • @JFNIReverse
    @JFNIReverse 10 месяцев назад +2

    Too fast instruction. For some reason my Unity report a fault of NullReferenceExeception: Object reference not set to an instance of an object. (Also why did you delete the Void Start when you writing the script?)

    • @marievoss
      @marievoss 9 месяцев назад +1

      Maybe the name of your object has a typo in it.

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

      doesnt really matter when you delete Start() its just annoying that its there but blank

    • @JasonDinh69
      @JasonDinh69 5 месяцев назад +1

      me too, did you figure out how to fix. Reply fast my game needs this problem fixed

  • @storm_pegasus9659
    @storm_pegasus9659 Год назад +2

    Your video is extraordinary and awesome.❤
    Can you make videos about game server like Lootlocker or Playfab or Firebase with unity attached?
    Sorry for my English mistakes.
    👍

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

      Hi, First thanks for your nice feedback 🙏
      I plan publish videos about game server in the future.
      Actually I don't know Enough English too 😊

  • @JasonDinh69
    @JasonDinh69 5 месяцев назад +1

    I set up the code for a countdown timer but It keeps giving a NullReferenceExeception: Object reference not set to an instance of an object

    • @aryankumarrout9707
      @aryankumarrout9707 24 дня назад

      That is because you haven't referenced it in the inspector. The code is fine.

  • @Ogamer320
    @Ogamer320 6 месяцев назад

    thanks really great tutorial

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

    I've seen several people use Searilized feild's but for some reason they never seem to work and i tend to have no clue why you'd use it. Does anyone here know?

  • @brianparnada5077
    @brianparnada5077 9 месяцев назад

    Thank you❤
    I have a request please if possible making a tutorial on how to add extra time in a timer countdown by 2d/3d object is trigger/collide 🥺

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

    Thank you ❤

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

    I like the timer text

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

    I'm trying to make a timer that continues in the background on iOS, even if the app looses focus. What solution would you recommend?

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

      If this for a game, you can use Date methods for this.
      Date methods + Json file ( for store)

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

    So I am making a project where I am using a panel in 3 different scenes using singleton, now I need to show the timer on the panel when the game ends. Problem is the timer starts AFTER the game ends.

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

      Hello Sorry for the late reply.
      I hope you solve it.
      If you have a script that is not a singleton and exists in every scene, you can access the Timer from that script and start the timer from within the Start function

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

      @@RehopeGames yeah, my partner who’s making project with me helped solve it. Also instead of using string format, we used TimeSpan

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

      @@ahmedsachwani2868 👍

  • @miaalvarez6278
    @miaalvarez6278 6 месяцев назад

    how can i add a button to it to start and stop time

  • @Pokemon4ik2178
    @Pokemon4ik2178 9 месяцев назад

    Hi Rehope games! Can you make video "how to make a timer before starting a game in Unity" PLEEES

  • @FlashPro_N
    @FlashPro_N 7 месяцев назад

    Thanks!

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

    Hi, can you make a tutorial on how to show silhouettes when hidden?
    Thank you very much.

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

      Hello ,You can, too 😊
      First, create a silhouette image
      of the character, then change the character lmage to you've created lmage when the character hidden.

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

    Hey, how i put the lose game when the time go to0?

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

      Hello , I showed this in the video

  • @BlazeZ__
    @BlazeZ__ 9 месяцев назад

    Hmm, a bit confused delta time is already in seconds no? Why converting to seconds then?

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

    How can I keep the timer running in every scene?

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

      Hopefully you've figured it out already, but I'm thinking maybe a DontDestroyonLoad attached to the timer itself and the text/GUI associated with it?

  • @minikeanu7535
    @minikeanu7535 9 месяцев назад

    can you make a tutorial on how i can save the time?

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

    how to make the timer reset when gameover/restarting please reply

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

      remainingTime = 0; 😊

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

      @@RehopeGames where do i add that to the code??

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

      ​@@mapbot4264add it to the area where your code tells the game your player died

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

    How do I make the timer stop on a certain scene

    • @RehopeGames
      @RehopeGames  Год назад +3

      You can stop the time using time scale.
      Time.timeScale = 0;

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

    please can you make video about how to add settings menu for graphic

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

    Holding and pushing a box or a circle tutorial

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

      Maybe in the next make a game series 👍

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

      @@RehopeGames I also post some ideas in my channel

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

      @@RehopeGames Like swinging and climbing on ropes

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

    For the countdown ill prefer a couratine method than what you wrote

  • @VerityD2
    @VerityD2 3 месяца назад

    the text is invisble. all i see is a blue square with a t in it

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

    hi how can I add hour?

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

    I will remember you in the future

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

    yeni video ne zmn gelir sabırsızlıkla bekliyorum

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

      Pazartesi 😉

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

      @@RehopeGames abi online nasıl yapılır anlatabilir misin

  • @putrapandi4165
    @putrapandi4165 2 месяца назад

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

    How do you pause it?

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

      You can use -Time.timeScale- to do that.

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

    why did my second move so fast?

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

      you can fix that like this
      void Update()
      {
      if (remainingTime > 0)
      {
      remainingTime -= Time.deltaTime;
      int minutes = Mathf.FloorToInt(remainingTime / 60);
      int seconds = Mathf.FloorToInt(remainingTime % 60);
      timerText.text = string.Format("{0:00}:{1:00}", minutes, seconds);
      }
      else if (remainingTime < 0)
      {
      timerText.text = "00:00";
      remainingTime = 0;
      }
      }
      hope it's help you

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

    Line Renderer please

  • @DJLuigi00
    @DJLuigi00 3 месяца назад

    make*

  • @galeguin._.
    @galeguin._. 2 месяца назад

    Péssimo... Melhore!