24 lines
607 B
C++
24 lines
607 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "EditorSubsystem.h"
|
|
#include "UObject/ObjectSaveContext.h"
|
|
#include "BlueprintExportSubsystem.generated.h"
|
|
|
|
/**
|
|
* Editor subsystem that exports blueprint text files whenever an asset is saved.
|
|
*/
|
|
UCLASS()
|
|
class UBlueprintExportSubsystem : public UEditorSubsystem
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
|
virtual void Deinitialize() override;
|
|
|
|
private:
|
|
void OnAssetSaved(const FString& PackageFilename, UPackage* Package, FObjectPostSaveContext Context);
|
|
FDelegateHandle OnAssetSavedHandle;
|
|
};
|