Unreal.js icon indicating copy to clipboard operation
Unreal.js copied to clipboard

Not working in UE 5.1

Open Hannessa opened this issue 2 years ago • 10 comments

Hi,

I tried to install Unreal.js in a brand new UE 5.1 project, following the instructions in the readme. However, I just get the following error message when I try to rebuild it:

image

image

image

Hannessa avatar Jan 12 '23 00:01 Hannessa

Here's a list of the compile errors I get:

image

Hannessa avatar Feb 02 '23 14:02 Hannessa

I managed to solve half of them by just adding

#include "EditorStyleSet.h"

at the top of SJavascriptGraphEdNode.cpp

Hannessa avatar Feb 02 '23 14:02 Hannessa

I ran into the same issue and ended up rolling back to UE5, am happy to know I am not the only one having this problem

dustout avatar Feb 02 '23 14:02 dustout

Yeah, same here, good to know! I also rolled back, but I do want to start switching to UE5.1 soon thanks to the much improved foliage rendering.

I also added: #include "EditorStyleSet.h" to JavascriptEditorTab.cpp (on row 5 below #if WITH_EDITOR)

and I'm now down to 17 errors. So that gives me some hope that it might mostly be easy fixes.

image

Not quite sure why this didn't generate errors before, and I can't find any info about this EditorStyleSet.h in the UE 5.1 release notes. But maybe it's just a newer compiler or something that is less forgiving.

Hannessa avatar Feb 02 '23 14:02 Hannessa

I'm cheering for you! I'll take a deeper look in the evening and see if I can figure it out as well, fingers crossed that one of us can solve this problem.

dustout avatar Feb 02 '23 14:02 dustout

This changelist may be helpful for updating Unreal.js to 5.1: https://github.com/getnamo/UnrealJs/commit/3836ff244bc3c48aecc7f1a7475433f15c66bc03. Largely changed FEditorStyle to FAppStyle

and https://github.com/getnamo/UnrealJs/commit/733c7638b99fc6a7977a1c7dcbba28eead00e45c for re-enabling logging.

There are still some deprecation warnings on compile, but it does run.

getnamo avatar Feb 02 '23 16:02 getnamo

Made minor fixes and made a fork release (win64) for 5.1: https://github.com/getnamo/UnrealJs/releases/tag/v0.7.0

getnamo avatar Feb 02 '23 19:02 getnamo

That's amazing. I just tested it, and it runs out of the box. Thanks so much for fixing this! This should really be merged into the original repo. Great job!

Hannessa avatar Feb 02 '23 21:02 Hannessa

UE 5.1 supported version has been pushed.

dochigun-nc avatar Mar 16 '23 05:03 dochigun-nc

@dochigun-nc The new version can't run the example normally, and input "GWorld" in the JavaScript console prompts an undefined error.

Johnly1986 avatar May 11 '23 01:05 Johnly1986