Skip to content

Commit

Permalink
UObjectHook: Add support for viewing NameProperty properties
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jun 7, 2024
1 parent d6c98aa commit ef97ac2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/mods/UObjectHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3226,6 +3226,17 @@ void UObjectHook::ui_handle_properties(void* object, sdk::UStruct* uclass) {
ImGui::TreePop();
}

break;
case "NameProperty"_fnv:
{
const auto& value = *(sdk::FName*)((uintptr_t)object + ((sdk::FProperty*)prop)->get_offset());
const auto wstr = value.to_string();
const auto str = utility::narrow(wstr);

ImGui::Text("%s: ", utility::narrow(prop->get_field_name().to_string()).data());
ImGui::SameLine(0.0f, 0.0f);
ImGui::TextColored(ImVec4{3.0f / 255.0f, 232.0f / 255.0f, 252.0f / 255.0f, 1.0f}, "%s", str.data());
}
break;
default:
{
Expand Down

0 comments on commit ef97ac2

Please sign in to comment.