언리얼 엔진/C++

언리얼엔진 C++ 에디터 뷰포트에서 월드에 있는 액터 Focus

mane 2022. 12. 5. 15:22
728x90
반응형
.h
static void FocusActor(AActor* Actor)

.cpp
UWorld* World = GEditor->GetEditorWorldContext().World()->GetWorld();
if(World)
{
	if(!Actor->IsSelectedInEditor())
	{
		GEditor->GetSelectedActors()->DeselectAll();
		GEditor->SelectActor(Actor, true, false);
		GEditor->Exec(World, TEXT("Camera Align"));
	}
}

.Bulid.cs
// "LevelEditor", "UnrealEd" 추가
728x90
반응형