六一的部落格


苔滑非关雨,松鸣不假风。




GameplayStatics



UGameplayStatics::GetGameMode

获取关卡对象

1/** Returns the current GameModeBase or Null if it can't be retrieved, such as on the client */
2UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
3static class AGameModeBase* GetGameMode(const UObject* WorldContextObject);