Giter Site home page Giter Site logo

unity-wakatime's Introduction

unity-wakatime

A WakaTime plugin for Unity.

Screenshot

About

Existing solutions didn't work for me (https://github.com/bengsfort/WakaTime-Unity is obsolete and https://github.com/josec89/wakatime-unity requires Python), so I decided to implement my own variant.

Installation using the Unity Package Manager (Unity 2018.1+)

The Unity Package Manager (UPM) is a new method to manage external packages. It keeps package contents separate from your main project files.

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

    "com.vladfaust.unitywakatime": "https://github.com/vladfaust/unity-wakatime.git#package"

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

    {
        "dependencies": {
            "com.unity.ads": "2.0.8",
            "com.vladfaust.unitywakatime": "https://github.com/vladfaust/unity-wakatime.git#package"
        }
    }
  2. To update the package you need to delete the package lock entry in the lock section in Packages/manifest.json. The entry to delete could look like this:

    "com.vladfaust.unitywakatime": {
      "hash": "31fe84232fc9f9c6e9606dc9e5a285886a94f26b",
      "revision": "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.vladfaust.unitywakatime into your project's Assets folder.

Setup

  1. Run the Unity editor, go to Window/WakaTime, and insert your API key (grab one from https://wakatime.com/settings/account)
  2. Press Save Preferences
  3. Check if "Unity" editor appears at https://wakatime.com/api/v1/users/current/user_agents (may be a bit delayed)
  4. Enjoy!

Usage

The plugin will automatically send heartbeats to WakaTime after following events:

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

Development

Use the manual installation method, so the changes you make are immediately reflected in the editor. But please keep the repository sane, omitting any unnecessary files. When added a new file, move its .meta counterpart generated by Unity into the /CI/Meta folder.

Become Patron

unity-wakatime's People

Contributors

vladfaust avatar hermesiss avatar zeh avatar kshaibani avatar alanhamlett avatar jaypeet avatar nifukivisk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.