Skip to content

Commit

Permalink
UObjectHook: Add ClassProperty support
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 18, 2024
1 parent 8a02623 commit 121086d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2356,6 +2356,20 @@ void UObjectHook::ui_handle_object(sdk::UObject* object) {
return;
}

if (object->is_a(sdk::UClass::static_class())) {
if (ImGui::TreeNode("Default Object")) {
auto def = ((sdk::UClass*)object)->get_class_default_object();

if (def != nullptr) {
ui_handle_object(def);
} else {
ImGui::Text("Null default object");
}

ImGui::TreePop();
}
}

ImGui::Text("%s", utility::narrow(object->get_full_name()).data());

static const auto material_t = sdk::find_uobject<sdk::UClass>(L"Class /Script/Engine.MaterialInterface");
Expand Down Expand Up @@ -3411,6 +3425,7 @@ void UObjectHook::ui_handle_properties(void* object, sdk::UStruct* uclass) {
break;
case "InterfaceProperty"_fnv:
case "ObjectProperty"_fnv:
case "ClassProperty"_fnv:
{
auto& value = *(sdk::UObject**)((uintptr_t)object + ((sdk::FProperty*)prop)->get_offset());

Expand Down

0 comments on commit 121086d

Please sign in to comment.