Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to set 30 days time check for game demo?

Discussion in 'Scripting' started by leegod, Feb 2, 2013.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,472
    As title,

    How can I set days limit to game's standalone file?

    And if that days pass, block some function or running itself.

    Thank.
     
  2. Alex Cruba

    Alex Cruba

    Joined:
    Aug 16, 2011
    Posts:
    564
    Offline or online game demo?
     
  3. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    You should invest in an obfuscator or licencing program, which enables you to set the expiration date on your assemblies.
     
  4. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,472
    offline game demo
     
  5. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,249

    If you are really serious about it this is the way to go. You won't really be able to protect it that well yourself quickly.
     
  6. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,472
    Usage method is too complicated.

    I just need date-limit function.(After some days from install and run, block running.(But unity standalone does not have install process, then how?))

    Is there any recommendable obfuscator(I don't know well about) or licensing solution for unity3d window standalone?
     
  7. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    What I would do, if I didn't want to use a licensing tool, is have my game write the date it first runs, into a serialized binary file. Then I would have my game read from this file every time its run and compare dates. I would have many of these files, some of them in the appdata folder, others in the installation folder. If one of them is deleted have it replaced. I would also have a registry backup check. In the end though, the dkozar has the right idea.
     
  8. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,472
    hi, thx for reply,

    How to make [my game write the date it first runs, into a serialized binary file]?

    But maybe this is easily hacked by change Window's Date manually, right?
     
    Last edited: Feb 3, 2013
  9. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Object Serialization

    But maybe this is easily hacked by change Window's Date manually, right?[/QUOTE]

    Just check and see how many days of the trial they have left. If it's more than thirty, they be doing something tricky and you make the game close. They can just set the date to the day they first ran the game every time they play though, and that is why it would be quite a bit better if you use dkozar method.