Skip to content

Commit

Permalink
Merge pull request rdeioris#85 from readyplayerme/lod-screen-size-fix
Browse files Browse the repository at this point in the history
Fixed the screen size setting issue for the auto LODs in editor
  • Loading branch information
rdeioris authored Dec 24, 2023
2 parents e707e0e + 1acbfb9 commit b03eb79
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,13 +1046,9 @@ USkeletalMesh* FglTFRuntimeParser::FinalizeSkeletalMeshWithLODs(TSharedRef<FglTF
}

#if WITH_EDITOR
SkeletalMeshContext->SkeletalMesh->SetLODSettings(NewObject<USkeletalMeshLODSettings>());

#if ENGINE_MAJOR_VERSION >= 5 || ENGINE_MINOR_VERSION >= 27
SkeletalMeshContext->SkeletalMesh->GetLODSettings()->SetLODSettingsFromMesh(SkeletalMeshContext->SkeletalMesh);
#else
SkeletalMeshContext->SkeletalMesh->LODSettings->SetLODSettingsFromMesh(SkeletalMeshContext->SkeletalMesh);
#endif
USkeletalMeshLODSettings* LODSettings = NewObject<USkeletalMeshLODSettings>();
LODSettings->SetLODSettingsFromMesh(SkeletalMeshContext->SkeletalMesh);
SkeletalMeshContext->SkeletalMesh->SetLODSettings(LODSettings);

for (int32 LODIndex = 0; LODIndex < SkeletalMeshContext->LODs.Num(); LODIndex++)
{
Expand Down

0 comments on commit b03eb79

Please sign in to comment.