Open bianchengxiaosheng opened 6 years ago
Hi it looks like your struct asset is not loaded. Before importing it just use ue.load_object or ue.load_package
I use the same script in unreal 4.17 is ok,but when I upgrade the engine to 4.20,the problem will have. the readme document describe that i just create struct in content folder,and i can use the struct in python script
In 4.20 lot of stuff changed. You need to adapt to those changes. But technically you should explicitely load non-native classes.
Hi rdeioris,
can you specify how to change it? We got the same issue (but only when running the packaged game). How to exactly load the struct before importing? Sorry for the noobish question.
HI: I create a struct in content,and i use it in python script ,and run it OK. Fllow the problem will have. I run the same python script will have a problem when I close the unreal engine and open the unreal engin again. Fllow describe: "LogPython: Error: cannot import name 'TestStruct' LogPython: Error: Traceback (most recent call last): LogPython: Error: File "E:/CM/UE_V420/SHChongMing/Content/Scripts\GetStructTest.py", line 2, in
from unreal_engine.structs import TestStruct
"