Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Main 스켈레탈 메쉬와 스켈레탈 메쉬에 딸린 PrimiviteComponent들의 가시거리 조정
- #pragma todo("ssw0725 : Import maxDrawDistance value from DataTable or DataSheet")
- const float maxDrawDistance = 3072.f;
- if (USkeletalMeshComponent* skelMeshComp = GetMesh())
- {
- skelMeshComp->bAllowCullDistanceVolume = false;
- skelMeshComp->SetCachedMaxDrawDistance(maxDrawDistance);
- const TArray<USceneComponent*>& childSceneComps = skelMeshComp->GetAttachChildren();
- for (USceneComponent* childSceneComp : childSceneComps)
- {
- if (UPrimitiveComponent * childPrimitiveComp = Cast<UPrimitiveComponent>(childSceneComp))
- {
- childPrimitiveComp->bAllowCullDistanceVolume = false;
- childPrimitiveComp->SetCachedMaxDrawDistance(maxDrawDistance);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement