How can i record how long I'm in Unity?

If anyone is familiar with how steam logs your “Played Hours” i was wondering if anyone knows or uses a tool that records how long you’re running an app, in this case Unity.

I want to do this because I feel that if I can see how long I’m using this, it’ll not only motivate me to work more, but I can measure progress at a high level, in raw time of the app being opened.

As I’m writing this i just got the idea of tricking Steam to think the Unity3d exe is a game. Haven’t tried this yet.

Steam doesnt record hours on non-steam games.

OIC… thanks.

Check out this thread Tracking how much time you spend working in Unity? - Industries - News & General Discussion - Unity Discussions

I have an excel spreadsheet. I write in the time when I start and when I finish. I use subtraction to work out the actual time spent.

2 Likes

I think editor extension could be developed for that. Like panel that updates each second (adds 1 to an uint), then based on amount of seconds calc how many hours and minutes passed as well and presents it in familiar hh:mm:ss format.

1 Like

There is a really great app I use on OSX called ‘Rescue Time’ and it auto-logs time spent using each and every software on your machine. It also gives you a handy graph of your usage and an end-of week summary! :slight_smile:

Alot of freelancers I know use it to show people how long they spend working on contract projects; pretty useful!

2 Likes

Something like this?

using UnityEngine;
using UnityEditor;
using System;

[InitializeOnLoad]
public class DevelopmentTimer : EditorWindow
{
   static TimeSpan initTime;

   static DevelopmentTimer()
   {
     initTime = TimeSpan.FromSeconds(EditorPrefs.GetInt ("DevTime", 0));
   }

   [MenuItem("Window/Development Timer")]
   static void Open()
   {
     DevelopmentTimer window = ScriptableObject.CreateInstance<DevelopmentTimer> ();
     window.ShowUtility ();
     window.title = "Development Timer";
   }

   void Update()
   {
     TimeSpan time = initTime.Add (TimeSpan.FromSeconds (EditorApplication.timeSinceStartup));
     EditorPrefs.SetInt ("DevTime", (int)time.TotalSeconds);

     Repaint ();
   }

   void OnGUI()
   {
     TimeSpan time = initTime.Add (TimeSpan.FromSeconds (EditorApplication.timeSinceStartup));

     GUILayout.Label (String.Format ("Time spent: {0}:{1}:{2}", time.Hours.ToString (), time.Minutes.ToString (), time.Seconds.ToString ()) , EditorStyles.whiteBoldLabel);
   }
}

Editor script so make sure it’s in the Editor folder. Also this is not really a very elegant solution :confused:

Yeah, something like that.

My buddies and I use ProcrastiTracker. It’ll log your software usage with tons of details, so you can check how much time you spent surfing, in Unity, writing code on a per project basis, making assets and so on and so forth. Super useful.

Awesome. Thanks for all the replies, man this forum is really active. I’m looking at RescueTime now. Also will look into ProcrastiTracker as well. Would be interesting to see a plug in for Unity.

Be sure to check out ManicTime too which seemed popular in the thread I linked earlier. I use RescueTime though because it works on both Mac and Windows.

check out my asset “automated project diary”

it does exactly that.

I got tired from RescueTime sending all my usage history to their servers plus the weekly productivity email wasn’t helpful since it was too late to get motivated.

So we ended up creating our own time tracking app for macOS, Qbserve. There is no subscription, and all the tracked information is stored locally.

It provides everything for seamless time tracking of work hours or freelance projects:
– automatic productivity tracking for websites and apps
– automatic project tracking based on opened documents and web pages
– invoice generation
– real-time performance feedback and notifications
– various reports and timesheets
– scheduled data export
– Slack team and Skype chat tracking
– many flexible settings to fit your needs

Check this real-time productivity feedback:

3078696--231716--feedback-icons.gif

yep