Code Monkey home page Code Monkey logo

wakatimeforue's Introduction

WakaTimeForUE

plugin version Unreal Engine version Platform support


Setting up the plugin

  1. Download WakatimeForUE.zip from the releases
  2. Extract the plugin into your editor plugins folder (Commonly C:\Program Files\Epic Games\UE_4.xx\Engine\Plugins)
    2.1. Your folder structure should be ...\Engine\Plugins\WakaTimeForUE
    2.2. Within this folder resides WakaTimeForUE.uplugin and other files
  3. Run the engine
  4. If you already used wakatime elsewhere, your api key gets loaded. If not, you get prompted by a window.
    4.1. In recent changes, API key on the website appears in format waka_[apiKey], in order for this to work, remove the waka_ prefix.

Notice

This is my first ever project in C++, so it is definitely not perfect.
If you have any suggestions how to improve it, or any bug reports, please, use the "Issues" tab.

Troubleshooting

Q: The plugin failed to build.
A: Branches other than release are development branches, so they might contain code that does not compile. If this happens on the release branch (or any version tag), make sure you have all dependencies required for building C++ code. You usually install all of them when installing Visual Studio and checking both C++ and .NET.

Q: I have regenerated my api key, how do I change it in the editor?
A: There is a WakaTime icon in the main toolbar. When you click this icon, you can change the api key. Just remember to hit save!

Q: Does this plugin work on both Unreal Engine 4 and 5?
A: Short answer: Yes. Long answer: It should. You might need to rebuild the plugin from your IDE, or use it as a project plugin, but it will work.


Contributors

Thank you to all of you. You have been a huge help.

wakatimeforue's People

Contributors

freezernick avatar rxxbertx avatar simonslamka avatar subtixx avatar theashenwolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wakatimeforue's Issues

Wakatime icon is not rendered in Toolbar correctly

ZIP archive is named WakaTimeForUE4-main or WakaTimeForUE4-release after downloading. So if user does not pay too much attention to folder name described in README file and just unpack archive and copies WakaTimeForUE4-main folder to Plugins, wakatime icon is not found by Style->Set. It's rendered just like a pink square.

Maybe there is some better way for naming or you could warn user specially in README?

License / Copyright Notices

  1. It would be great if there would be a license in this repository, so you can (safely) use / extend / (... whatever the license allows) the plugin
  2. There are copyright notices in the code reserving all rights to Epic Games. I guess they were meant for the default code when initializing a new plugin, but since this isn't the default code anymore they shouldn't be there at all (?)

Having a white space in the User/"name" folder leads to the editor not opening

Having a whitespace in your user folder causes the editor to exit on startup with the error "Path 'C:/Users/{name}' could not be found". The path is there, it just seems like the plugin cuts the path off at the space so instead of it searching for "My name" it searches for "My" which returns an error. Is there any way to allow white spaces so users with one in their user folders can open the plugin? I tried looking through the source code but couldn't find a way to let it see past spaces. (Creating this issue on behalf of one of my team members, other than that the plugin works great, thank you!)

Macro redefinition warning on build

Building a project a project with the plugin on windows generates the following warnings:

winnt.h(603): [C4005] 'TEXT': macro redefinition
Platform.h(1082): [C4005] see previous definition of 'TEXT'

Desktop

  • OS: Windows
  • Unreal Engine 4.26.2

Additional context
This due to the #include <windows.h> here

A recommendation to save WakaTime config to the global WakaTime dir located at ~/.wakatime.cfg

Since all WakaTime plugins seem to use the user's home dir as a config dir, I recommend doing the same here.
So at launch, we would read ~/.wakatime.cfg, see if there's an API key - if there isn't one, ask for it, and then put it in there. If there is, just continue loading. This way, all the WakaTime plugins, including this one, share one common config.

I will try to do this in the PR I opened.

Thanks

[1.2.0] UE4 activity no longer appears on WakaTime

Today I accidentally noticed that my UE4 activity is not being logged!

WakaTime receives the heartbeats, but they don't appear on the dashboard, so perhaps the raw heartbeat data is faulty.

The reason could be that the heartbeat's is_write param is null, but I'm not sure.

https://wakatime.com/api/v1/users/current/heartbeats?date=2021-08-01&show=machine_name,user_agent

To view raw heartbeat data for the currently logged-in account (change the date as appropriate).

Error on opening UE4

Hi I got a problem that I cant use this plugin.
my UE version is 4.27
and I got this on the opening
Screenshot 2022-06-29 215850

GUserProfile: Use after free

Who approved this? A global variable that gets freed without the module being shutdown?

Btw. its already happening on shutdown...

EDIT: Thanks to gitblame: Was introduced here 94148de

Results in:

Log          LogWakaTime               Running command:  /c start /b where /r Z��\.wakatime\wakatime-cli-windows-amd64.exe
Log          LogWakaTime               Did not find wakatime
Log          LogWakaTime               Running command:  /c start /b mkdir Z��\.wakatime
Log          LogWakaTime               CLI not found, attempting download.

Test cases for #14

  • Has ide wakatime, has python
  • Has cli, has python
  • has python, doesn't have cli, doesn't have ide waka
  • doesn't have python, nor cli

For a pass, the plugin has to be able to send a correct heartbeat

Make the plugin aware of the current repo branch

If using git in the current project, the plugin should fetch the current branch name and pass it along to the waka heartbeats. If someone is using the Projects feature in WakaTime, this can give useful insights as to which branches is your time going against, but since the plugin doesn't report this information, WakaTime just says "Unknown".

image

Support request for UE5

Hey,

Are you planning on implementing support of UE5 any time soon? I am working on migrating my projects to it and would love to use this plugin!

Thanks

[win10] wakatime won't run without the wakatime-cli file extension (.exe)

Hi,

I am using WakaTime in many editors and IDEs.
They have installed the official version to ~/.wakatime/wakatime-cli
Now, the executable name within that dir is wakatime-cli.exe, not just wakatime. This way the system cannot find the executable. Removing the extension, on the other hand, causes the executable to be unrunnable.

I'm no Windows guru, so I don't really know what to do here. Tried making an alias, like I would do in Linux, but it doesn't work. Windows's "macros" are not very efficient and don't reportedly work in batch scripts.

Ideas?

Thanks

BugFixed

In UE5_Latest(Github::ue5-main)

WakaTimeForUE.cpp#L145:
FEditorDelegates::PostSaveWorld.Remove(PostSaveWorldHandle); -> FEditorDelegates::PostSaveWorldWithContext.Remove(PostSaveWorldHandle);

WakaTimeForUE.h:
Add #include "EditorStyleSet.h"

And

WakaTimeForUE.Build.cs:
Add "EditorStyle" Module

Because:
WakaTimeForUE.h#L145:
FEditorStyle::GetStyleSetName() // Error

Plugin prevents packaging

When plugin is enabled, all packaging fails due to "Unknown Cook Failure".

Starting the editor without the plugin successfully packages the project.

I need to look into this issue, but I do not have a viable internet connection, so it has to wait a bit.
Sorry for the inconvenience.

Possible issues and notes regarding UE5

Today, I have renamed the plugin from WakaTimeForUE4 to just WakaTimeForUE; the reason for this was the fact, that UE5 is out and the plugin is (more or less) compatible with UE5.

This issue will be kept open while it is true, so check it in case there is an issue. It might be listed here.

Possible issues

  • There is an issue stating something about having the plugin in UE5Modules and whatnot... the solution to this issue is to move the plugin from the engine to the project.

Refactor all the code

After all the changes regarding wakatime cli, the code become really messy. It's time for a cleanup.

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.