unitysamples / LyraStarterGame /Source /LyraGame /GameFeatures /GameFeatureAction_SplitscreenConfig.h
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class UObject; | |
| struct FGameFeatureDeactivatingContext; | |
| struct FGameFeatureStateChangeContext; | |
| struct FWorldContext; | |
| ////////////////////////////////////////////////////////////////////// | |
| // UGameFeatureAction_SplitscreenConfig | |
| /** | |
| * GameFeatureAction responsible for configuring Splitscreen. | |
| */ | |
| UCLASS(MinimalAPI, meta = (DisplayName = "Splitscreen Config")) | |
| class UGameFeatureAction_SplitscreenConfig final : public UGameFeatureAction_WorldActionBase | |
| { | |
| GENERATED_BODY() | |
| public: | |
| //~ Begin UGameFeatureAction interface | |
| virtual void OnGameFeatureDeactivating(FGameFeatureDeactivatingContext& Context) override; | |
| //~ End UGameFeatureAction interface | |
| //~ Begin UGameFeatureAction_WorldActionBase interface | |
| virtual void AddToWorld(const FWorldContext& WorldContext, const FGameFeatureStateChangeContext& ChangeContext) override; | |
| //~ End UGameFeatureAction_WorldActionBase interface | |
| public: | |
| UPROPERTY(EditAnywhere, Category=Action) | |
| bool bDisableSplitscreen = true; | |
| private: | |
| TArray<FObjectKey> LocalDisableVotes; | |
| static TMap<FObjectKey, int32> GlobalDisableVotes; | |
| }; | |