26 lines
807 B
C++
26 lines
807 B
C++
|
|
||
|
|
||
|
#include "GameFeatureAction_StyleTransfer.h"
|
||
|
|
||
|
#include "StyleTransferSubsystem.h"
|
||
|
|
||
|
void UGameFeatureAction_StyleTransfer::OnGameFeatureActivating(FGameFeatureActivatingContext& Context)
|
||
|
{
|
||
|
Super::OnGameFeatureActivating(Context);
|
||
|
}
|
||
|
|
||
|
void UGameFeatureAction_StyleTransfer::OnGameFeatureDeactivating(FGameFeatureDeactivatingContext& Context)
|
||
|
{
|
||
|
Super::OnGameFeatureDeactivating(Context);
|
||
|
|
||
|
// @todo shutdown cleanly
|
||
|
}
|
||
|
|
||
|
void UGameFeatureAction_StyleTransfer::AddToWorld(const FWorldContext& WorldContext, const FGameFeatureStateChangeContext& ChangeContext)
|
||
|
{
|
||
|
auto* StyleTransferSubsystem = WorldContext.OwningGameInstance->GetSubsystem<UStyleTransferSubsystem>();
|
||
|
|
||
|
UGameViewportClient* GameViewportClient = WorldContext.GameViewport;
|
||
|
StyleTransferSubsystem->StartStylizingViewport(GameViewportClient);
|
||
|
}
|