Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1.     // Main 스켈레탈 메쉬와 스켈레탈 메쉬에 딸린 PrimiviteComponent들의 가시거리 조정
  2. #pragma todo("ssw0725 : Import maxDrawDistance value from DataTable or DataSheet")
  3.     const float maxDrawDistance = 3072.f;
  4.  
  5.     if (USkeletalMeshComponent* skelMeshComp = GetMesh())
  6.     {
  7.         skelMeshComp->bAllowCullDistanceVolume = false;
  8.         skelMeshComp->SetCachedMaxDrawDistance(maxDrawDistance);
  9.  
  10.         const TArray<USceneComponent*>& childSceneComps = skelMeshComp->GetAttachChildren();
  11.         for (USceneComponent* childSceneComp : childSceneComps)
  12.         {
  13.             if (UPrimitiveComponent * childPrimitiveComp = Cast<UPrimitiveComponent>(childSceneComp))
  14.             {
  15.                 childPrimitiveComp->bAllowCullDistanceVolume = false;
  16.                 childPrimitiveComp->SetCachedMaxDrawDistance(maxDrawDistance);
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement