deactivate after # of days for an exe?

is there a way to make an exe only run for say 10 days?

like for a demo?

~C

Yes.

check out the System.DateTime structure, pay attention to Now()

http://msdn.microsoft.com/en-us/library/system.datetime.aspx

im sorry, i should have said a unity player. but this does help

make a new datetime object, manually put in the expiration date and time, when the program first starts, check the current system.datetime.now() against it, if it is greater, exit the program.

You are saying Unity, C# and all the .net stuff is in Unity. :wink:

thanks that should work, is there an OSX equivalent?

Everything in Unity automatically works in OS X and Windows. You don’t need an equivalent.

–Eric

Unity uses mono and it is cross platform. Yes you can use the datetime without any issues. I think you need to include the import/using statement in your scripts.