How to get WorldContextObject inside a C++ BP Function Library?

World Context Object its any object that appear in current world. Its can be almost anything (PC, Game Mode, Actors & anything like that). You can use any UObject for that

    UFUNCTION(BlueprintCallable, BlueprintPure, Category = "TestOnly")
    static float GetWorldDeltaSeconds(UObject * WorldContextObject)
   {  
return WorldContextObject->GetWorld()->GetDeltaSeconds();  
 }
2 Likes