File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,15 @@ namespace RC::LuaType
4343 owner_or_outer = owner.ToField ();
4444 }
4545
46- Unreal::UStruct* ptr = base->GetClassPrivate ();
46+ Unreal::UStruct* ptr{};
47+ if (base->IsA <Unreal::UStruct>())
48+ {
49+ ptr = static_cast <Unreal::UStruct*>(base);
50+ }
51+ else
52+ {
53+ ptr = base->GetClassPrivate ();
54+ }
4755 bool class_matches = ptr == owner_or_outer;
4856
4957 if (!class_matches)
Original file line number Diff line number Diff line change @@ -166,7 +166,12 @@ namespace RC::LuaType
166166 {
167167 // Access the given property in the given UScriptStruct
168168
169- auto property = static_cast <Unreal::FStructProperty*>(struct_data.script_struct ->FindProperty (property_name));
169+ auto property_name_str = property_name.ToString ();
170+ auto property = LuaCustomProperty::StaticStorage::property_list.find_or_nullptr (struct_data.script_struct , property_name_str);
171+ if (!property)
172+ {
173+ property = static_cast <Unreal::FStructProperty*>(struct_data.script_struct ->FindProperty (property_name));
174+ }
170175 if (!property)
171176 {
172177 lua.throw_error (fmt::format (" [handle_unreal_property_value]: Was unable to retrieve property '{}' mapped to '{}'" ,
Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ Added custom module searcher with UTF-8 path support for Lua `require()` ([UE4SS
111111- Fixed ` CreateLogicModsDirectory ` to properly create directories with Unicode paths and handle parent directory creation
112112- Fixed global Lua ` print ` function to properly handle UTF-8 string conversion
113113
114+ Added support for ` UScriptStruct ` when using ` RegisterCustomProprety ` ([ UE4SS #1036 ] ( https://github.com/UE4SS-RE/RE-UE4SS/pull/1036 ) )
115+
114116#### Types.lua [ PR #650 ] ( https://github.com/UE4SS-RE/RE-UE4SS/pull/650 )
115117- Added ` NAME_None ` definition
116118- Added ` EFindName ` enum definition
You can’t perform that action at this time.
0 commit comments