Progress toward popping up look-at widgets

This commit is contained in:
2025-03-19 16:01:38 -04:00
parent e470c41e77
commit 27be4ce758
9 changed files with 51 additions and 61 deletions

View File

@@ -142,6 +142,7 @@ void UlxTangible::Destroy() {
}
UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) {
if (actor == nullptr) return nullptr;
UlxTangibleComponent* comp = actor->GetComponentByClass<UlxTangibleComponent>();
if (comp == nullptr) return nullptr;
return comp->Tangible.Get();
@@ -150,7 +151,11 @@ UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) {
UlxTangible *UlxTangible::GetActorTangibleOrLog(AActor *actor) {
UlxTangible *tan = GetActorTangibleQuiet(actor);
if (tan == nullptr) {
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: %s"), *actor->GetName());
if (actor == nullptr) {
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: passed in a null pointer"));
} else {
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: %s"), *actor->GetName());
}
}
return tan;
}