六一的部落格


关关难过关关过,前路漫漫亦灿灿。




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);

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);