Skip to content

Dumbo-programmer/unity-hackatime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-hackatime

A Hackatime plugin for Unity.

image

About

Existing solutions didn't work for me (https://github.com/vladfaust/unity-wakatime, and other solutions lack an option for sending heartbeats to different API URLs, such as to Hackatime), so I decided to fork vladfaust's solution to support Hackatime, Wakatime and others using the API URL.

Installation using the Unity Package Manager (Unity 2019.1+)

The Unity Package Manager (UPM) keeps package contents separate from your main project files.

  1. In the Unity Package Manager, click on the plus sign in the top left corner
  2. Select "Install package from git URL..."
  3. Enter the following line:
     https://github.com/daniel-geo/unity-hackatime.git#package
    
  4. Click on the install button

image

Installation using the Unity Package Manager manifest.json (Unity 2018.1+)

  1. Modify your project's Packages/manifest.json file by adding this line:

    "com.daniel-geo.unityhackatime": "https://github.com/daniel-geo/unity-hackatime.git#package"

    Make sure it's a valid JSON file. For example:

    {
        "dependencies": {
            "com.unity.ads": "2.0.8",
            "com.daniel-geo.unityhackatime": "https://github.com/daniel-geo/unity-hackatime.git#package"
        }
    }

Installation (all other Unity versions)

If you don't use the Unity Package Manager, you may copy the Editor folder from inside Assets/com.daniel-geo.unityhackatime into your project's Assets folder.

Setup

  1. Run the Unity editor, go to Window/HackaTime, and insert your API key (grab one from https://hackatime.hackclub.com/my/wakatime_setup)
  2. Press Save Preferences
  3. Enjoy!

Usage

The plugin will automatically send heartbeats to HackaTime after the following events:

  • DidReloadScripts
  • EditorApplication.playModeStateChanged
  • EditorApplication.contextualPropertyMenu
  • EditorApplication.hierarchyWindowChanged
  • EditorSceneManager.sceneSaved
  • EditorSceneManager.sceneOpened
  • EditorSceneManager.sceneClosing
  • EditorSceneManager.newSceneCreated

Credits

This plugin wouldn’t exist without @taciturnaxolotl
A huge thanks to @unsaltedkale for her valuable help in testing the project

About

Hackatime plugin for Unity ⏱

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 92.2%
  • Shell 7.8%