Magic Nodes

It’s really hard to make all the things I want to do with only Slate + Mono.API.

So I started to implement a SLN Generator for Visual Studio Code, which is very light weight external editor and is supported by Omnisharp servers of C# analysis.

In case VS Code is installed, we can launch the external solution for deeper C# analysis than what I have in-editor (I have no MSBuild running with Unreal Editor, but VS Code does).

MSBuild can scan scripts, and also can actually scan any referenced DLL and their types.

The best thing is reference counting!
Here it detects that I am no longer using ‘state’ anywhere anymore:

Heh… figured out how to add custom filter categories to asset browser.
Also got importing of C# scripts from drag & drop working:



Implemented a basic “Diff” tool and added a few more toolbar actions for launching on Visual Studio, in case built-in code editor or VS Code are not enough :sweat_smile:

So, I have ported this plugin to Unreal 5. Works fine, the C++ engine adapted well to UE5.
However, the C# architecture that I have built for this plugin, there’s some serious blocking changes in the core of Unreal 5 that makes it impossible for me to compile C# DLLs within the Unreal Editor now…

I suspect I will be forced to drop the C# project and wait for Verse scripting, I have done all I could with the C# VM, but it just won’t load any CS DLLs anymore on Unreal 5, and blocks the Editor from launching which is a no no no.

So for now, I move on and keep support for the C++ node only.

1 Like

Hello,
I tried adding your plugin to my project, but failed.
I created a new blank cpp project, added the plugin, then created a blueprint and added a magic node with one of your presets. This is the error I get when I try to compile:

Parsing headers for MyProject2Editor
Running UnrealHeaderTool “C:\Users\Dev\Documents\Unreal Projects\MyProject2\MyProject2.uproject” “C:\Users\Dev\Documents\Unreal Projects\MyProject2\Intermediate\Build\Win64\MyProject2Editor\Development\MyProject2Editor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\Dev\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed
Reflection code generated for MyProject2Editor in 3.0091589 seconds
Building MyProject2Editor…
Using Visual Studio 2019 14.28.29336 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 9 actions with 16 processes…
[1/9] MGC_StringArraySorting__CPP.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2\MagicNodes\MGC_StringArraySorting__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory
[2/9] MGC_StringArraySorting_B__CPP.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2\MagicNodes\MGC_StringArraySorting_B__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory
[3/9] MGC_StringArraySorting_B__CPP.gen.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2/MagicNodes/MGC_StringArraySorting_B__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory
[4/9] MGC_StringArraySorting__CPP.gen.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2/MagicNodes/MGC_StringArraySorting__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory
[5/9] MGC_Awake_Start_Update_Stop__CPP.gen.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2/MagicNodes/MGC_Awake_Start_Update_Stop__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory
[6/9] MGC_Awake_Start_Update_Stop__CPP.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2\MagicNodes\MGC_Awake_Start_Update_Stop__CPP.h(17): fatal error C1083: Cannot open include file: ‘MagicNodeRuntime.h’: No such file or directory

What am I missing ? Sorry I’m kind of new to this.
Thanks

Edit: I’m using 4.26

You have to add the runtime module to your project’s Build.cs file.
If you don’t add the module dependency then your game module can’t find the classes:

1 Like

Well now that is what I get when compiling… Sorry if this is supposed to be obvious:/

Invalidating makefile for MyProject2Editor (MyProject2.Build.cs modified)
Parsing headers for MyProject2Editor
Running UnrealHeaderTool “C:\Users\Dev\Documents\Unreal Projects\MyProject2\MyProject2.uproject” “C:\Users\Dev\Documents\Unreal Projects\MyProject2\Intermediate\Build\Win64\MyProject2Editor\Development\MyProject2Editor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\Dev\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed
Reflection code generated for MyProject2Editor in 3.2025089 seconds
Building MyProject2Editor…
Using Visual Studio 2019 14.28.29336 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 13 actions with 16 processes…
[1/13] MyProject2.cpp
[2/13] MyProject2.init.gen.cpp
[3/13] MyProject2GameModeBase.cpp
[4/13] MyProject2GameModeBase.gen.cpp
[5/13] MGC_Awake_Start_Update_Stop__CPP.cpp
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2\MagicNodes\MGC_Awake_Start_Update_Stop__CPP.cpp(25) : error C2275: ‘UMGC_Awake_Start_Update_Stop__CPP’: illegal use of this type as an expression
C:\Users\Dev\Documents\Unreal Projects\MyProject2\Source\MyProject2\MagicNodes\MGC_Awake_Start_Update_Stop__CPP.cpp(25) : error C3861: ‘Subscribe’: identifier not found
[6/13] MGC_Awake_Start_Update_Stop__CPP.gen.cpp
[7/13] MGC_StringArraySorting__CPP.gen.cpp
[8/13] MGC_StringArraySorting_B__CPP.gen.cpp
[9/13] MGC_StringArraySorting_B__CPP.cpp
[10/13] MGC_StringArraySorting__CPP.cpp

The “Subscribe(…)” macro have been changed to “Enroll(…)”

That’s what your copy of these files are complaining about.
I think you have outdated assets in \Plugins\MagicNode\Content\Examples.

I downloaded everything from the marketplace yesterday though. Should I get these from your git ? I was interested in the alphabetical sorting node.

You can just delete the “MGC_Awake_Start_Update_Stop” source files and the node from that Examples folder I posted above. Then compilation should just work.

I don’t know why that is outdated on Marketplace, I have updated everything before submitting to Epic the latest version.

Thanks a lot for your help. I will try this in a few days when I get back to my computer, but that should fix things!

If you plan to stop development on the C# version, would you consider releasing it on Github for use “as is”? I expect to be using 4.26 for quite some time, and I don’t need to do anything complex with it.

Today I got the C# node (Mono 6) working on Unreal 5.
But I am still short in time to create the “Gameplay Framework” library in the C# side:

3 Likes

Just wanted to ping you again about releasing the 4.x C# code for people to use as-is. If you have your own reasons why you don’t want to do this, no worries

I am waiting for Microsoft to unify dotNET Core and NET Framework.

Right now the dotNet stuff is fragmented, and Microsoft is focused on the base multiplatform functionality, I can’t use the current Mono API with net Core unless I build my own… and I really don’t want to do that, because I know that Microsoft is working on it (I talked a bit with them on GitHub)

2 Likes

OK, sounds good. I follow your work closely (where possible) and I always look forward to seeing your progress

Hi BrUnO_XaVIeR :slight_smile:
I have a finished blueprint project. Is there a way to use this plugin in finished blueprint project?

What do you mean?

Why?
If it’s finished, it’s finished…

1 Like

BrUnO_XaVIeR

How to fix it? :frowning:

What do you mean?
I have a blueprint project and I would like to try this plugin in this project.

In build.cs file you have to tell your project to use the DLL module to run the system:

BrUnO_XaVIeR

Thanks! It works! :grinning:

1 Like