20tab / UnrealEnginePython

Embed Python in Unreal Engine 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnrealEngine 4.24 compatibility

nafeesb opened this issue · comments

A few things need to be updated to work with UE v4.24. I have done an initial pass, and will link that pr to this issue.

Here's the pr #817

Wow @nafeesb, this is great! I've just started a new project for 4.24 and I was thinking to use this project and saw that it was compatible with 4.23, but then opened the Issues section and BOOM, there was your open ticket. Amazing.

Thank you so much!

commented

Hi @nafeesb , i am using your linked fork in ue4 4.24, and there seems to be some issue with creating new static meshes.

when following the tutorial here, a crash occurs when creating a new StaticMesh class

sm = StaticMesh(object_name, ue.get_or_create_package(package_name))

This code works perfectly in a seperate 4.17 build I am using

here is the crash report:

Assertion failed: Owner->IsMeshDescriptionValid(0) [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/StaticMesh.cpp] [Line: 2382] Bad MeshDescription on /Game/C2M/test.test

UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEnginePython!py_unreal_engine_new_object() [f:\ue4 editing\ue4mvm 4.24\ue4mvm\plugins\unrealenginepython\source\unrealenginepython\private\uepyengine.cpp:599]
UE4Editor_UnrealEnginePython!ue_PyUObject_call() [f:\ue4 editing\ue4mvm 4.24\ue4mvm\plugins\unrealenginepython\source\unrealenginepython\private\uepymodule.cpp:1429]
python36
python36
python36
python36
python36
python36
python36
UE4Editor_UnrealEnginePython!FUnrealEnginePythonModule::RunString() [f:\ue4 editing\ue4mvm 4.24\ue4mvm\plugins\unrealenginepython\source\unrealenginepython\private\unrealenginepython.cpp:554]
UE4Editor_PythonEditor!SPythonEditor::Execute() [f:\ue4 editing\ue4mvm 4.24\ue4mvm\plugins\unrealenginepython\source\pythoneditor\private\spythoneditor.cpp:114]
UE4Editor_PythonEditor!FPythonProjectEditor::Execute() [f:\ue4 editing\ue4mvm 4.24\ue4mvm\plugins\unrealenginepython\source\pythoneditor\private\pythonprojecteditor.cpp:544]
UE4Editor_PythonEditor!TBaseSPMethodDelegateInstance<0,FPythonProjectEditor,0,void __cdecl(void)>::ExecuteIfSafe() [d:\games\epic\ue_4.24\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:369]
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
user32
user32
UE4Editor_ApplicationCore
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Thanks for the report @Airyzz . I am able to reproduce the problem. It seems like UStaticMesh semantics changed at some point. Using the common new object creation pathway won't work. I'll try to implement at workaround.

Thanks for starting this! Is there any word on when 4.24 might officially be supported?

Thanks, it seems to be working here. However calling unreal_engine.delete_asset does not seem to be working with UserDefinedStruct type. I have tried querying the path name and passing a hard reference, but it returns none and the delete operation does not take place

calling delete_asset with an invalid path returns Exception: unable to find asset /Game/Scripts/DataStructure.uasset

when calling a with a valid path, It runs, But then trying to create a new asset returns Exception: a structure with this name already exists in the package

Edit: OK looking into the issue a bit further ue.delete_asset() is working with some asset types:

UTexture2D - Expected behaviour, File is removed from content browser
UserDefinedStruct - The command runs with no error, However the struct asset is still in the content browser. It is marked with a * (like the file has been changed). Looking at the directory in a file manager (where the .uasset is located), the file is removed. However, Pressing save all, The .uasset will be recreated by the editor and the following message is output:

Moving 'A:/Nadir/folio/UE4/SleepingQ422/Saved/DataStructure06B4A0464B6B39922160CEB0A0256E17.tmp' to 'A:/Nadir/folio/UE4/SleepingQ422/Content/Scripts/DataStructure.uasset'

So it seems like the struct is being removed by the command, But there is a cached table which contains the data which is not updated.
Tried this in 4.22 and it has the same error too, So dont think its 4.24 specific

Also, If anyone knows. Can I save .uassetfiles and access them during runtime? What is the best way to generate a data table during runtime and access it via BP

A few things need to be updated to work with UE v4.24. I have done an initial pass, and will link that pr to this issue.

Great you're working on this. I need Python working with UE 4.24 because specific functions (StaticMeshSocket) that it appears only work on this version. I'm not sure if I can help with this but I'll try to do it. BR and thx a lot for your efforts!.

Any updates on this? Haven't seen @rdeioris around here in a while...

"sequencer_make_new_spawnable" this command dont work. LogPython: Error: unable to access sequencer . i find the c ++ code ,but i dont know how to change it .

image