Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Daily Rewards

Discussion in 'Assets and Asset Store' started by nunesbarbosa, Feb 12, 2015.

  1. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    facebook.png

    Daily Rewards
    is a great way to increase retention but also helps monetization as players get a sense of the benefit of having more coins/currency within the game.

    Avoid player cheating by changing the device clock! This asset uses an anti-cheating mechanism that uses a network clock.
    • Supports multiple days (even weeks or months)
    • Time rewards feature for a single reward per seconds interval
    • Mobile ready
    • Easy to use
    • Easy to integrate
    • Portrait and Landscape versions

    Check in the asset Store:
    http://u3d.as/bgH

    Demo

    Documentation

    First 5 users replying this thread gets a Voucher!
    - Edited - The vouchers are over.

    Don't forget to rate!
     
    Last edited: Jan 5, 2017
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    4,785
    hey :) i could try test it on some small game later in here.
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    4,785
    btw. When you click "claim" the time is 00:00:00 for a 1 second, not that it matters much,
    but I guess it could be fixed (or made appear only when it passed 1s, to show correct time)
     
  4. MDefender

    MDefender

    Joined:
    Dec 4, 2014
    Posts:
    2
    It's an awesome pack, I recommend it.
     
  5. MDefender

    MDefender

    Joined:
    Dec 4, 2014
    Posts:
    2
  6. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    180
    Cool. This could be pretty useful. Can the rewards last longer than 5 days without reseting (or keep the reward for the 5th day for every day following in a row?
     
    Last edited: Mar 1, 2015
  7. ctknoxville

    ctknoxville

    Joined:
    Oct 1, 2013
    Posts:
    32
    Looks like a great idea. Would like to try it out too on one of our games :)
     
  8. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,239
    does it work with a back end?
     
  9. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    Would like to try it out too :)
     
  10. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    The asset was made to work in cycles of N days. After it reaches the last day, it goes back to the first.
    It is array based, so it works for an infinite number of days.
     
  11. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Daily Rewards works with two PlayerPrefs variables :
    - When was the reward was claimed
    - What was the last reward

    I guess you can adapt those variables to your server or database if you want some backending but the code is prepared for that.
     
    cl0n likes this.
  12. revocelotmoky

    revocelotmoky

    Joined:
    Mar 4, 2014
    Posts:
    10
    Hi, does it work on mobile?
     
  13. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Yes, it is mobile ready.
     
    revocelotmoky likes this.
  14. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @nunesbarbosa, this have notifications or push notifications for alert the user when the game/application is not ON?
     
  15. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Daily rewards does not have the mobile local notification feature.

    I recommend using assets such as https://www.assetstore.unity3d.com/en/#!/content/10825 or https://www.assetstore.unity3d.com/en/#!/content/9484 or https://www.assetstore.unity3d.com/en/#!/content/25871

    and then integrating Local Notifications into the code according to the platform.
     
  16. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
  17. dragon2777

    dragon2777

    Joined:
    Jan 28, 2016
    Posts:
    1
    does this work with Unity 5 I got a warning that it might not be compatible thank you
     
  18. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Daily Rewards is compatible with Unity versions 4.6 and up.. it is fully compatible with all 5.x versions.
     
  19. TomSantoro

    TomSantoro

    Joined:
    Oct 17, 2015
    Posts:
    8
    Hey,

    Awesome plugin.

    Is there a way I can edit the code so as to reward the player a different item on the last day?

    For example:

    "Day 1 = 100 coins
    Day 2 = 200 coins
    etc...
    Day 7 = 1 gem"

    ?

    Thanks in advance
     
  20. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    TomSantoro, the code is open to edit and this feature should be rather easy to implement. I may add this flexibility on a future release. If you have questions on how to do it please send me a message.
     
  21. TomSantoro

    TomSantoro

    Joined:
    Oct 17, 2015
    Posts:
    8
    Thanks! Have sent you a message!
     
  22. TomSantoro

    TomSantoro

    Joined:
    Oct 17, 2015
    Posts:
    8
    Great support!

    Worked a treat!

    Thanks!
     
  23. bigcatgame

    bigcatgame

    Joined:
    Mar 11, 2015
    Posts:
    1
    hi,
    Have plugin protect cheating? if changing phone time in settings.
     
  24. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    The plugin does not protect from cheating. It is possible change the script to use a server time instead of using the local time but it requires some programming skills.
     
  25. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Hey everyone!

    Sorry I took so long to update Daily Rewards. There are a lot of big changes on the new version including an anti cheating API.

    @bigcatgame
     
  26. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    53
    hi

    how to integraiton traning video?
     
  27. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Hi udede. Please elaborate your question.
     
  28. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Do you own Followers Profile Zoomer and want to add Daily Rewards or do you want to integrate Followers Profile Zoomer to your app and want to use Daily Rewards in the backending?
     
  29. Wiremuch

    Wiremuch

    Joined:
    Jan 28, 2015
    Posts:
    104
    Hi nunesbarbosa, great asset. I have a problem with the latest version in that every time I reload the scene, the timer resets as well and the reward become available. Is there a fix to this?
     
  30. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Hi Wiremuch!

    You can check "Is Singleton" property so the clock keeps ticking when you reload the scene. Make sure you don't call PlayerPrefs.DeleteAll() between scenes as Daily Rewards uses PlayerPrefs to store last claimed data.

    Are you using Daily Rewards or Timed Rewards?
     
  31. Wiremuch

    Wiremuch

    Joined:
    Jan 28, 2015
    Posts:
    104
    Thanks for the quick reply. I'm using Timed Rewards and tested a fresh import as well on an example project. For some reason when singleton is ticked, it duplicates the timed rewards canvas every time I reload the scene. This only started happening from the latest update for me.
     
  32. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Wiremuch you've found a bug I'll fix in the next version. Meanwhile please replace the method Awake in DailyRewardsCore.cs

    from:
    Code (CSharp):
    1.         protected virtual void Awake()
    2.         {
    3.             if (isSingleton)
    4.                 DontDestroyOnLoad(this.gameObject);
    5.         }
    to:
    Code (CSharp):
    1.         protected virtual void Awake()
    2.         {
    3.             if (isSingleton)
    4.             {
    5.                 DontDestroyOnLoad(this.gameObject);
    6.  
    7.                 var instanceCount = GetInstanceCount ();
    8.  
    9.                 if (instanceCount > 1)
    10.                     Destroy(gameObject);
    11.             }
    12.         }
    13.  
    14.         // Returns the amount of instances with the same id
    15.         private int GetInstanceCount()
    16.         {
    17.             var instances = FindObjectsOfType<T>();
    18.             var count = 0;
    19.             for (int i = 0; i < instances.Length; i++)
    20.             {
    21.                 if ((instances[i]).instanceId == instanceId)
    22.                     count ++;
    23.             }
    24.             return count;
    25.         }
    Thanks for your feedback and I'm really sorry for your inconvenience!
     
  33. Wiremuch

    Wiremuch

    Joined:
    Jan 28, 2015
    Posts:
    104
    @nunesbarbosa Great! Yep this works, thanks for the quick solution.
     
  34. Wiremuch

    Wiremuch

    Joined:
    Jan 28, 2015
    Posts:
    104
    Been testing on mobile and found something else. When you leave the app (but keep it running in the background) with the timer at, for e.g 00:03:18, go away for a while and come back it goes back to around 00:03:18 (I think whatever time is shown when you first open the app is what it goes back to). However if you close the app and open it again, the correct time is shown.

    You can replicate this on a mac by playing the project in Unity with the timer running, leaving Unity (and go to Safari or something) and then coming back.

    Any idea what the solution is? Again, only discovered this on latest update. (Btw, really like the new features added to the update regardless!)
     
  35. TauseefCVS

    TauseefCVS

    Joined:
    Mar 28, 2016
    Posts:
    14
    hello, In the daily rewarded package the rewarded according to time not working and create the error on runtime, can you guide me about this
     
  36. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Hi TauseefCVS,
    can you share the error message and Timed Rewards configuration? Thanks!
     
  37. TauseefCVS

    TauseefCVS

    Joined:
    Mar 28, 2016
    Posts:
    14
    @nunesbarbosa

    NullReferenceException: Object reference not set to an instance of an object
    NiobiumStudios.TimedRewardsInterface.InitializeAvailableRewardsUI () (at Assets/DailyRewards/Scripts/TimedRewardsInterface.cs:117)
    NiobiumStudios.TimedRewardsInterface.Start () (at Assets/DailyRewards/Scripts/TimedRewardsInterface.cs:50)
     
  38. kdeger

    kdeger

    Joined:
    Mar 4, 2018
    Posts:
    5
    hi @nunesbarbosa

    Thank you for this awesome package, it works for me well and really easy to integrate.

    Currently I have a problem, the reward system works fine without any problem. Inside Unity everything seems normal but from an android device the rewards doesn't appear on daily reward window. Could you help on this issue?
     
  39. nunesbarbosa

    nunesbarbosa

    Joined:
    Jul 17, 2012
    Posts:
    81
    Hi kdeger, can you send me details, print screens and error logs in the support e-mail?

    contact@niobiumstudios.com
     
  40. shyamlondonconsolidated

    shyamlondonconsolidated

    Joined:
    Apr 1, 2018
    Posts:
    26
    Hi Guilherme,

    Just a followup email I sent you, to provide a bit of background of what I am trying to do;

    I have an endless arcade game
    • Within the main scene I have a UI_Camera game object canvas which should contain the timed reward
    • Within the UI_Camera, holds the ScoreManager script
    • On player death, a gameover splash becomes active within the UI_Camera and the player has the opportunity to get a timed reward if available.
    The steps I have done;
    1) Effectively all I have done is dropped the timedreward prefab into the UI_Camera
    2) I have modified the ScoreManager.cs script as attached to include the functions, void onEnable, void onDisable, void onClaimPrizeTimedRewards as mentioned previously.
    3) Within the timedrewards script, I have 3 rewards available; score +25, score +50, score +100
    Just to clarify, the reward "unit" should be "newTotalScore" as referenced in ScoreManager or even LifeScore (playerpref key?)

    Is there anything I am missing, I have spent a few hours last night trying to get this to work with no luck. Any help would be really appreciated!

    Kind Regards,

    Shyam