UAnimInstance::GetLODLevel
#include "Animation/AnimInstance.h"
Access: public
Specifiers: virtualENGINE_APIUFUNCTIONBlueprintPure
Description
Returns the LOD level at which this animation instance is currently being evaluated, mirroring the skeletal mesh component's predicted LOD. The anim graph uses this to skip expensive nodes at lower LODs.
Caveats & Gotchas
- • This returns the LOD used for the animation evaluation pass, which may lag one frame behind the mesh renderer's LOD if LOD dithering or async updates are active.
- • Override this in a subclass if you need custom LOD logic for the anim graph (e.g., forcing LOD 0 for a cinematic character regardless of screen size).
Signature
UFUNCTION(BlueprintPure, Category = "Animation")
ENGINE_API virtual int32 GetLODLevel() const Return Type
int32 Example
Skip IK calculations at low LOD C++
void UMyAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);
bEnableIK = (GetLODLevel() == 0);
} See Also
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?