How to make a live counter in unity3d





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I recently started using Unity3D and made a few levels.
The only problem I have right now is how can I get a live counter?

So my character dies when he hits and certain object.

I want my character to get 3 lives maximum, and get -1 live when he hits that object.

And that it keeps the data when he dies so you wouldn't get lives back if you restart the app.
And after a certain amount of minutes he gets +1 live.



Thank you :)










share|improve this question

























  • Please add your code you have so far

    – derHugo
    Nov 24 '18 at 13:33











  • Hugo, I don't really have one yet

    – Cypher
    Nov 25 '18 at 13:50


















0















I recently started using Unity3D and made a few levels.
The only problem I have right now is how can I get a live counter?

So my character dies when he hits and certain object.

I want my character to get 3 lives maximum, and get -1 live when he hits that object.

And that it keeps the data when he dies so you wouldn't get lives back if you restart the app.
And after a certain amount of minutes he gets +1 live.



Thank you :)










share|improve this question

























  • Please add your code you have so far

    – derHugo
    Nov 24 '18 at 13:33











  • Hugo, I don't really have one yet

    – Cypher
    Nov 25 '18 at 13:50














0












0








0








I recently started using Unity3D and made a few levels.
The only problem I have right now is how can I get a live counter?

So my character dies when he hits and certain object.

I want my character to get 3 lives maximum, and get -1 live when he hits that object.

And that it keeps the data when he dies so you wouldn't get lives back if you restart the app.
And after a certain amount of minutes he gets +1 live.



Thank you :)










share|improve this question
















I recently started using Unity3D and made a few levels.
The only problem I have right now is how can I get a live counter?

So my character dies when he hits and certain object.

I want my character to get 3 lives maximum, and get -1 live when he hits that object.

And that it keeps the data when he dies so you wouldn't get lives back if you restart the app.
And after a certain amount of minutes he gets +1 live.



Thank you :)







unity3d counter live






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 14:12









Renaud Pacalet

9,73321732




9,73321732










asked Nov 24 '18 at 10:09









CypherCypher

13




13













  • Please add your code you have so far

    – derHugo
    Nov 24 '18 at 13:33











  • Hugo, I don't really have one yet

    – Cypher
    Nov 25 '18 at 13:50



















  • Please add your code you have so far

    – derHugo
    Nov 24 '18 at 13:33











  • Hugo, I don't really have one yet

    – Cypher
    Nov 25 '18 at 13:50

















Please add your code you have so far

– derHugo
Nov 24 '18 at 13:33





Please add your code you have so far

– derHugo
Nov 24 '18 at 13:33













Hugo, I don't really have one yet

– Cypher
Nov 25 '18 at 13:50





Hugo, I don't really have one yet

– Cypher
Nov 25 '18 at 13:50












2 Answers
2






active

oldest

votes


















0














You can use PlayerPrefs.SetInt , PlayerPrefs.GetInt for storing and reading your player's hp in file storage. Read more about it here:



https://docs.unity3d.com/ScriptReference/PlayerPrefs.html



As for Giving player +1 hp after a few minutes you can store DateTime.Now in a PlayerPrefs variable whenever you give your player some hp and use TimeSpan and TotalMinutesPassed:



TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
int totalMinutesPassed = passedTime.TotalMinutes;


Should go sth like this i guess(didnt test this code just showing a general idea) :



void SetPlayerLives(int lives)
{
playerLives = lives;
PlayerPrefs.SetInt("player-lives",playerLives);
}
//TODO: also sth like => int GetPlayerLives() function
void CheckLiveRegen() //call this function whenever you want to check live regen:
{
int LIVE_REGEN_MINUTES = 5; //regen 1 live every 5 minutes
DateTime lastStoredDateTime = DateTime.Parse(PlayerPrefs.GetString("last-live-regen", DateTime.Now.ToString()));
TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
double totalMinutesPassed = passedTime.TotalMinutes;
if(totalMinutesPassed >= LIVE_REGEN_MINUTES)
{
int val = (int) totalMinutesPassed / LIVE_REGEN_MINUTES;
// Add val to your player lives! + store new lives value
SetPlayerLives(playerLives+val);
//update last-live-regen value:
PlayerPrefs.SetString("last-live-regen", DateTime.Now.ToString());
}
}


Note: DateTime , TimeSpan classes have some bugs (specially in android platform) in versions older than 2017.4 (LTS) Make sure you log values and check if functions are working properly.
https://forum.unity.com/threads/android-datetime-now-is-wrong.488380/






share|improve this answer


























  • k, thank you so much!

    – Cypher
    Nov 25 '18 at 9:36











  • Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

    – Cypher
    Nov 25 '18 at 12:30











  • I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

    – behzad.robot
    Nov 25 '18 at 14:30













  • Okay, i will try to tell my problem!

    – Cypher
    Nov 25 '18 at 15:09











  • So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

    – Cypher
    Nov 25 '18 at 15:11



















1














While your game running. just create a variable counterTime to count time, whenever counterTime pass certain amount of time you want reset counterTime to 0 and increase your life.
When user quit your app, save last time to PlayerPref, eg:



PlayerPref.SaveString("LastTime", DateTime.Now);



When user comback game, just check duration between last time and now to calculate total life need added. eg:



DateTime lastTime = DateTime.Parse(PlayerPref.GetString("LastTime"));
TimeSpan timeDif= DateTime.Now - lastTime;
int duration = timeDif.TotalSeconds;





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457110%2fhow-to-make-a-live-counter-in-unity3d%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can use PlayerPrefs.SetInt , PlayerPrefs.GetInt for storing and reading your player's hp in file storage. Read more about it here:



    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html



    As for Giving player +1 hp after a few minutes you can store DateTime.Now in a PlayerPrefs variable whenever you give your player some hp and use TimeSpan and TotalMinutesPassed:



    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    int totalMinutesPassed = passedTime.TotalMinutes;


    Should go sth like this i guess(didnt test this code just showing a general idea) :



    void SetPlayerLives(int lives)
    {
    playerLives = lives;
    PlayerPrefs.SetInt("player-lives",playerLives);
    }
    //TODO: also sth like => int GetPlayerLives() function
    void CheckLiveRegen() //call this function whenever you want to check live regen:
    {
    int LIVE_REGEN_MINUTES = 5; //regen 1 live every 5 minutes
    DateTime lastStoredDateTime = DateTime.Parse(PlayerPrefs.GetString("last-live-regen", DateTime.Now.ToString()));
    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    double totalMinutesPassed = passedTime.TotalMinutes;
    if(totalMinutesPassed >= LIVE_REGEN_MINUTES)
    {
    int val = (int) totalMinutesPassed / LIVE_REGEN_MINUTES;
    // Add val to your player lives! + store new lives value
    SetPlayerLives(playerLives+val);
    //update last-live-regen value:
    PlayerPrefs.SetString("last-live-regen", DateTime.Now.ToString());
    }
    }


    Note: DateTime , TimeSpan classes have some bugs (specially in android platform) in versions older than 2017.4 (LTS) Make sure you log values and check if functions are working properly.
    https://forum.unity.com/threads/android-datetime-now-is-wrong.488380/






    share|improve this answer


























    • k, thank you so much!

      – Cypher
      Nov 25 '18 at 9:36











    • Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

      – Cypher
      Nov 25 '18 at 12:30











    • I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

      – behzad.robot
      Nov 25 '18 at 14:30













    • Okay, i will try to tell my problem!

      – Cypher
      Nov 25 '18 at 15:09











    • So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

      – Cypher
      Nov 25 '18 at 15:11
















    0














    You can use PlayerPrefs.SetInt , PlayerPrefs.GetInt for storing and reading your player's hp in file storage. Read more about it here:



    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html



    As for Giving player +1 hp after a few minutes you can store DateTime.Now in a PlayerPrefs variable whenever you give your player some hp and use TimeSpan and TotalMinutesPassed:



    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    int totalMinutesPassed = passedTime.TotalMinutes;


    Should go sth like this i guess(didnt test this code just showing a general idea) :



    void SetPlayerLives(int lives)
    {
    playerLives = lives;
    PlayerPrefs.SetInt("player-lives",playerLives);
    }
    //TODO: also sth like => int GetPlayerLives() function
    void CheckLiveRegen() //call this function whenever you want to check live regen:
    {
    int LIVE_REGEN_MINUTES = 5; //regen 1 live every 5 minutes
    DateTime lastStoredDateTime = DateTime.Parse(PlayerPrefs.GetString("last-live-regen", DateTime.Now.ToString()));
    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    double totalMinutesPassed = passedTime.TotalMinutes;
    if(totalMinutesPassed >= LIVE_REGEN_MINUTES)
    {
    int val = (int) totalMinutesPassed / LIVE_REGEN_MINUTES;
    // Add val to your player lives! + store new lives value
    SetPlayerLives(playerLives+val);
    //update last-live-regen value:
    PlayerPrefs.SetString("last-live-regen", DateTime.Now.ToString());
    }
    }


    Note: DateTime , TimeSpan classes have some bugs (specially in android platform) in versions older than 2017.4 (LTS) Make sure you log values and check if functions are working properly.
    https://forum.unity.com/threads/android-datetime-now-is-wrong.488380/






    share|improve this answer


























    • k, thank you so much!

      – Cypher
      Nov 25 '18 at 9:36











    • Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

      – Cypher
      Nov 25 '18 at 12:30











    • I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

      – behzad.robot
      Nov 25 '18 at 14:30













    • Okay, i will try to tell my problem!

      – Cypher
      Nov 25 '18 at 15:09











    • So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

      – Cypher
      Nov 25 '18 at 15:11














    0












    0








    0







    You can use PlayerPrefs.SetInt , PlayerPrefs.GetInt for storing and reading your player's hp in file storage. Read more about it here:



    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html



    As for Giving player +1 hp after a few minutes you can store DateTime.Now in a PlayerPrefs variable whenever you give your player some hp and use TimeSpan and TotalMinutesPassed:



    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    int totalMinutesPassed = passedTime.TotalMinutes;


    Should go sth like this i guess(didnt test this code just showing a general idea) :



    void SetPlayerLives(int lives)
    {
    playerLives = lives;
    PlayerPrefs.SetInt("player-lives",playerLives);
    }
    //TODO: also sth like => int GetPlayerLives() function
    void CheckLiveRegen() //call this function whenever you want to check live regen:
    {
    int LIVE_REGEN_MINUTES = 5; //regen 1 live every 5 minutes
    DateTime lastStoredDateTime = DateTime.Parse(PlayerPrefs.GetString("last-live-regen", DateTime.Now.ToString()));
    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    double totalMinutesPassed = passedTime.TotalMinutes;
    if(totalMinutesPassed >= LIVE_REGEN_MINUTES)
    {
    int val = (int) totalMinutesPassed / LIVE_REGEN_MINUTES;
    // Add val to your player lives! + store new lives value
    SetPlayerLives(playerLives+val);
    //update last-live-regen value:
    PlayerPrefs.SetString("last-live-regen", DateTime.Now.ToString());
    }
    }


    Note: DateTime , TimeSpan classes have some bugs (specially in android platform) in versions older than 2017.4 (LTS) Make sure you log values and check if functions are working properly.
    https://forum.unity.com/threads/android-datetime-now-is-wrong.488380/






    share|improve this answer















    You can use PlayerPrefs.SetInt , PlayerPrefs.GetInt for storing and reading your player's hp in file storage. Read more about it here:



    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html



    As for Giving player +1 hp after a few minutes you can store DateTime.Now in a PlayerPrefs variable whenever you give your player some hp and use TimeSpan and TotalMinutesPassed:



    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    int totalMinutesPassed = passedTime.TotalMinutes;


    Should go sth like this i guess(didnt test this code just showing a general idea) :



    void SetPlayerLives(int lives)
    {
    playerLives = lives;
    PlayerPrefs.SetInt("player-lives",playerLives);
    }
    //TODO: also sth like => int GetPlayerLives() function
    void CheckLiveRegen() //call this function whenever you want to check live regen:
    {
    int LIVE_REGEN_MINUTES = 5; //regen 1 live every 5 minutes
    DateTime lastStoredDateTime = DateTime.Parse(PlayerPrefs.GetString("last-live-regen", DateTime.Now.ToString()));
    TimeSpan passedTime = DateTime.Now - lastStoredDateTime;
    double totalMinutesPassed = passedTime.TotalMinutes;
    if(totalMinutesPassed >= LIVE_REGEN_MINUTES)
    {
    int val = (int) totalMinutesPassed / LIVE_REGEN_MINUTES;
    // Add val to your player lives! + store new lives value
    SetPlayerLives(playerLives+val);
    //update last-live-regen value:
    PlayerPrefs.SetString("last-live-regen", DateTime.Now.ToString());
    }
    }


    Note: DateTime , TimeSpan classes have some bugs (specially in android platform) in versions older than 2017.4 (LTS) Make sure you log values and check if functions are working properly.
    https://forum.unity.com/threads/android-datetime-now-is-wrong.488380/







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 24 '18 at 12:20

























    answered Nov 24 '18 at 12:13









    behzad.robotbehzad.robot

    19213




    19213













    • k, thank you so much!

      – Cypher
      Nov 25 '18 at 9:36











    • Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

      – Cypher
      Nov 25 '18 at 12:30











    • I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

      – behzad.robot
      Nov 25 '18 at 14:30













    • Okay, i will try to tell my problem!

      – Cypher
      Nov 25 '18 at 15:09











    • So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

      – Cypher
      Nov 25 '18 at 15:11



















    • k, thank you so much!

      – Cypher
      Nov 25 '18 at 9:36











    • Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

      – Cypher
      Nov 25 '18 at 12:30











    • I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

      – behzad.robot
      Nov 25 '18 at 14:30













    • Okay, i will try to tell my problem!

      – Cypher
      Nov 25 '18 at 15:09











    • So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

      – Cypher
      Nov 25 '18 at 15:11

















    k, thank you so much!

    – Cypher
    Nov 25 '18 at 9:36





    k, thank you so much!

    – Cypher
    Nov 25 '18 at 9:36













    Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

    – Cypher
    Nov 25 '18 at 12:30





    Oh and one more question, how can I add a live and if he dies he get's -1 and when he has 0 he can't do that anymore?

    – Cypher
    Nov 25 '18 at 12:30













    I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

    – behzad.robot
    Nov 25 '18 at 14:30







    I'm not sure what u mean by that but i guess If You mean like saving the live-1 ? You can call the SetPlayerLives ( PlayerPrefs.SetInt ) with new value again. ( SetPlayerLives(playerLives-1) ? ) And you can check if your playerLives != 0 when you want to restart the game or sth?

    – behzad.robot
    Nov 25 '18 at 14:30















    Okay, i will try to tell my problem!

    – Cypher
    Nov 25 '18 at 15:09





    Okay, i will try to tell my problem!

    – Cypher
    Nov 25 '18 at 15:09













    So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

    – Cypher
    Nov 25 '18 at 15:11





    So, i've been searching for a live counter the whole time, and didn't find any one that worked properly with unity3d now. I'm trying to find a new one that has: 3 Lives max, then watch an ad or wait 10 minutes to get a live. and that It keeps it, so if you restart you still keep all your current lives (0,1,2, etc). Do you have discord or so that you can teach me it?

    – Cypher
    Nov 25 '18 at 15:11













    1














    While your game running. just create a variable counterTime to count time, whenever counterTime pass certain amount of time you want reset counterTime to 0 and increase your life.
    When user quit your app, save last time to PlayerPref, eg:



    PlayerPref.SaveString("LastTime", DateTime.Now);



    When user comback game, just check duration between last time and now to calculate total life need added. eg:



    DateTime lastTime = DateTime.Parse(PlayerPref.GetString("LastTime"));
    TimeSpan timeDif= DateTime.Now - lastTime;
    int duration = timeDif.TotalSeconds;





    share|improve this answer




























      1














      While your game running. just create a variable counterTime to count time, whenever counterTime pass certain amount of time you want reset counterTime to 0 and increase your life.
      When user quit your app, save last time to PlayerPref, eg:



      PlayerPref.SaveString("LastTime", DateTime.Now);



      When user comback game, just check duration between last time and now to calculate total life need added. eg:



      DateTime lastTime = DateTime.Parse(PlayerPref.GetString("LastTime"));
      TimeSpan timeDif= DateTime.Now - lastTime;
      int duration = timeDif.TotalSeconds;





      share|improve this answer


























        1












        1








        1







        While your game running. just create a variable counterTime to count time, whenever counterTime pass certain amount of time you want reset counterTime to 0 and increase your life.
        When user quit your app, save last time to PlayerPref, eg:



        PlayerPref.SaveString("LastTime", DateTime.Now);



        When user comback game, just check duration between last time and now to calculate total life need added. eg:



        DateTime lastTime = DateTime.Parse(PlayerPref.GetString("LastTime"));
        TimeSpan timeDif= DateTime.Now - lastTime;
        int duration = timeDif.TotalSeconds;





        share|improve this answer













        While your game running. just create a variable counterTime to count time, whenever counterTime pass certain amount of time you want reset counterTime to 0 and increase your life.
        When user quit your app, save last time to PlayerPref, eg:



        PlayerPref.SaveString("LastTime", DateTime.Now);



        When user comback game, just check duration between last time and now to calculate total life need added. eg:



        DateTime lastTime = DateTime.Parse(PlayerPref.GetString("LastTime"));
        TimeSpan timeDif= DateTime.Now - lastTime;
        int duration = timeDif.TotalSeconds;






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 24 '18 at 12:18









        Trung BuiTrung Bui

        913




        913






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457110%2fhow-to-make-a-live-counter-in-unity3d%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()