Download

Kantan UE4VS Visual Studio Extension

New free extension for anyone like me who spends most of their time in Visual Studio rather than the UE4 editor.

Current features:

  • Code templates. Simple wizard for generating UE4 source files, classes, modules and plugins.
  • Blueprint property visualizer. Incorporated an older extension for showing blueprint properties in the variable watch window.

Enjoy!

Not sure if this is intended, but I figured i would let you know: This plugin has a dpendency on UE4-development unrelated components, like “C# and Visual Basic”

It’s written in C#, but I’m not sure what sort of dependency you mean exactly. Are you saying VS is complaining that it needs to have C# and VB development tools installed, in order to use the extension? If so, can you copy paste the text or image of the error? Thanks.

@kamrann

Here is one of the packages it required me to add to my VS2017 installation in order to be able to install your plugin.

The other package I needed to install (and can’t seem to find in this list) was a package that seemed to be required to develop extensions for VS2017

I find both of these requirements strange, since no other plugin ever required them. [HR][/HR]
Edit:

Ok, I found the other package. I was speaking of this thing:

I am not sure what has been installed or not noq, I’m confused… If you know what has been installed, I would be happy if you told me because I hate bloating up my VS2017 installation :smiley: [HR][/HR]
Edit 2:

I tried deleting the component mentioned above and tried to reinstall your plugin. I get the same message upon installation as before, see below:

It’s in german, yes, but the important part reads:

Required Components: (Erforderliche Komponenten: )
C# and Visual Basic (C# und Visual Basic)
Required Components for the Visual Studio-Extensionsdevelopment (Erforderliche Komponenten für die Visual Studio-Extensionsentwicklung)

Just an update that the above dependency issues have now been sorted. Thanks @rYuxq for the help.

Hey there @kamrann
I noticed some time ago that your plugin fails at creating and adding new classes to my project. I can add them manually to my project though, so I think something is failing there when your plugin attempts it.

Also, I think in all 4 creating dialogs, it would be helpful to display the absolute path to the files/directories that are going to be created, in order to avoid confusion. Either the absolute or the relative path (relative to the project’s root directory) would be helpful. I feel insecure creating new files, worrying they might land not exactly there where I want them to :smiley:

Edit: I found out that the new file creation “seems” to work when it doesnt have to create new directories. If it has to create folders, creating it on the HDD and adding the filter to the .sln seems to work partially, but it always fails to create files

It sounds like it’s the VS bug noted at the bottom here? Check to see if there’s anything in the output window when trying. Fixes are given at the above link.

Absolutely, I agree. Actually I already have some code in there for doing that, but I disabled it for initial release because I suck at C# UI and couldn’t get it to work as I wanted. Will definitely be done though.

Indeed, that was the error, I didnt think the those two were the same bugs.

Another feedback: Maybe you want to provide tooltops for some (or all) fields in the code template gernator dialog, like for “Reflected?”, so that people can just hover the respective line and see what it is for (I know it in this case, but I noticed that I tend to forget it)

Edit: As for displaying the path, I think you can use a simple label right below the path text input field and show the current path

Have you considered putting this extension on github? Some people might like to contribute. I can imagine myself contributing, at least.

For example, I could need a delete functionality, that will delete a file from a project, as well as the underlying file on the HDD. this doesnt happen automatically when I delete a file from my project, at least.(or am I the only one who has to delete the files from the HDD manually?)

This is super helpful. Thanks a lot!

I use the dark theme in VS, so it’s a tiny bit hard to read the black text in the dialog boxes. Not sure if there is an Automatic option for the label color, instead of black?

Thanks for the feedback. Yep, rYuxq also mentioned to me about the color theme. I looked into it, and from what I can see the controls should inherit the theme automatically, but for some reason they’re not doing and I don’t know enough about C# and WPF to understand why. Reapplying everything manually proved too big of a job.

When I get a moment I’ll make a pass on the UI, and at least try to fix the labels in dark theme since that alone should be fairly easy to do. I’ll also look into putting this on Github.

If you put it on Github I could also have a look at the label colors, not that I have much experience with WPF either to be honest…

Thanks for the great little extension. I love stuff like this.

I would definitely try to improve the theming if you put it on github :smiley: its a nice plugin after all

Apologies for being so slow, I appreciate the interest.

I’ve now moved it over to Github: GitHub - kamrann/KantanUE4VS: Visual Studio extension for UE4 coding.

I’ve not shared a C# project before, so please let me know if there are any issues with compilation after cloning.
And if you have any questions/feedback, feel free to contact me here or on the UE4 Discord (kamrann#7656).

can you confirm that this works with the last visual studio version? I can’t seem to click “add” when I try to add something

Does not work with latest visual studio (15.8.9 for me, whole VS freezes when I want to open kantan window or I want to add source class.

Thanks for the feedback. I’m super busy currently but will definitely take a look when I get chance. To be honest though I generally stay a little behind the latest VS because it’s been fairly common that UE4 itself has issues on the latest release. Still, I’ll try to get it fixed of course.

Awesome, thanks :slight_smile:

@Skylonxe Tested a new build on VS 15.9.3 and all seems to be working fine. If you want to test you can grab it here:

I would imagine this should still be compatible with earlier versions such as 15.8, but not certain. If you try it, please let me know.
If you’re not yet on 15.9, I don’t recommend upgrading at this point. If you’re using any third party modern C++ libs you will run into a compiler error that is very hard to workaround in Unreal projects, and won’t be fixed until 4.22.

Weird, I will give it a try. Maybe it was conflicting with some other extension. Thanks for recommendation.

Hi @kamrann I love to use this but I’m unable to build this from GitHub. Can you eventually provide build for latest VS?
I’m getting this errors in build:


1>------ Build started: Project: KUE4VS_Core, Configuration: Release Any CPU ------
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\module_impl_decl1.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\uplugin_file.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\module_implementation_macro.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\module_impl_implementation.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed
amespaced_content.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\module_interface_decl.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\cpp_file.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\hdr_file.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\class_type_decl.cs' could not be found.
1>CSC : error CS2001: Source file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\CodeGeneration\Templates\Preprocessed\build_cs_file.cs' could not be found.
2>------ Build started: Project: UE4PropVis, Configuration: Release Any CPU ------
3>------ Build started: Project: KUE4VS_UI, Configuration: Release Any CPU ------
2>CSC : error CS0006: Metadata file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\bin\Release\KUE4VS_Core.dll' could not be found
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "Microsoft.VisualStudio.Threading" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "StreamJsonRpc" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Memory" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Threading.Tasks.Extensions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Windows.Interactivity" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>D:\_Git\Tools\KantanUE4VS\KUE4VS_UI\AddCodeElementWindowControl.xaml(19,5): error MC3074: The tag 'EnumToDisplayNameConverter' does not exist in XML namespace 'clr-namespace:KUE4VS;assembly=KUE4VS_Core'. Line 19 Position 5.
3>D:\_Git\Tools\KantanUE4VS\KUE4VS_UI\ResourceDictionaries\AddCodeElementTemplates.xaml(39,22): error MC3066: The type reference cannot find a public type named 'Utils'. Line 39 Position 22.
4>------ Build started: Project: KantanUE4VS, Configuration: Release Any CPU ------
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "Microsoft.VisualStudio.Threading" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "StreamJsonRpc" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Memory" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Threading.Tasks.Extensions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Windows.Interactivity" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
4>CSC : error CS0006: Metadata file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_Core\bin\Release\KUE4VS_Core.dll' could not be found
4>CSC : error CS0006: Metadata file 'D:\_Git\Tools\KantanUE4VS\KUE4VS_UI\bin\Release\KUE4VS_UI.dll' could not be found
4>CSC : error CS0006: Metadata file 'D:\_Git\Tools\KantanUE4VS\UE4PropVis\bin\Release\UE4PropVis.dll' could not be found
========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

Projects build report:
  Status    | Project [Config|platform]
 -----------|---------------------------------------------------------------------------------------------------
  Failed    | KUE4VS_Core\KUE4VS_Core.csproj [Release|Any CPU]
  Failed    | UE4PropVis\UE4PropVis.csproj [Release|Any CPU]
  Failed    | KUE4VS_UI\KUE4VS_UI.csproj [Release|Any CPU]
  Failed    | KantanUE4VS\KantanUE4VS.csproj [Release|Any CPU]

Build time 00:00:02.382