Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
Moved from Unreal 4.21 to 4.22
Browse files Browse the repository at this point in the history
  • Loading branch information
mihe committed Apr 2, 2019
1 parent cfccbd0 commit 6ad1f0b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 21 deletions.
5 changes: 2 additions & 3 deletions Source/TsuEditor/Private/TsuBlueprintCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
FTsuBlueprintCompiler::FTsuBlueprintCompiler(
UBlueprint* SourceSketch,
FCompilerResultsLog& MessageLog,
const FKismetCompilerOptions& CompilerOptions,
TArray<UObject*>* ObjLoaded)
: Super(SourceSketch, MessageLog, CompilerOptions, ObjLoaded)
const FKismetCompilerOptions& CompilerOptions)
: Super(SourceSketch, MessageLog, CompilerOptions)
{
}

Expand Down
3 changes: 1 addition & 2 deletions Source/TsuEditor/Private/TsuBlueprintCompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class FTsuBlueprintCompiler final
FTsuBlueprintCompiler(
UBlueprint* SourceSketch,
FCompilerResultsLog& MessageLog,
const FKismetCompilerOptions& CompilerOptions,
TArray<UObject*>* ObjLoaded);
const FKismetCompilerOptions& CompilerOptions);

static TArray<FTsuCompilationMessage> CompileScript(const FString& Filename, struct FTsuParsedFile& Result);

Expand Down
8 changes: 3 additions & 5 deletions Source/TsuEditor/Private/TsuEditorModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ class FTsuEditorModule final
void Compile(
UBlueprint* Blueprint,
const FKismetCompilerOptions& CompileOptions,
FCompilerResultsLog& Results,
TArray<UObject*>* ObjLoaded) override
FCompilerResultsLog& Results) override
{
if (auto TsuBlueprint = Cast<UTsuBlueprint>(Blueprint))
{
FTsuBlueprintCompiler Compiler(TsuBlueprint, Results, CompileOptions, ObjLoaded);
FTsuBlueprintCompiler Compiler{TsuBlueprint, Results, CompileOptions};
Compiler.Compile();
check(Compiler.NewClass);
}
Expand All @@ -96,8 +95,7 @@ class FTsuEditorModule final
return MakeShared<FTsuBlueprintCompiler>(
CastChecked<UTsuBlueprint>(InBlueprint),
InMessageLog,
InCompileOptions,
nullptr);
InCompileOptions);
}

private:
Expand Down
12 changes: 8 additions & 4 deletions Source/TsuEditor/Private/TsuFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ UTsuBlueprint* UTsuFactory::CreateBlueprint(UClass* Class, UObject* Parent, FNam
UTsuBlueprintGeneratedClass::StaticClass(),
TEXT("UTsuFactory")));

FEditorDelegates::OnAssetPreImport.Broadcast(this, Class, Parent, Name, Type);
auto ImportSubsystem = GEditor->GetEditorSubsystem<UImportSubsystem>();

ImportSubsystem->OnAssetPreImport.Broadcast(this, Class, Parent, Name, Type);

Blueprint->AssetImportData->Update(CurrentFilename);

FKismetEditorUtilities::CompileBlueprint(Blueprint);

FEditorDelegates::OnAssetPostImport.Broadcast(this, Blueprint);
ImportSubsystem->OnAssetPostImport.Broadcast(this, Blueprint);

return Blueprint;
}
Expand All @@ -136,7 +138,9 @@ UTsuBlueprint* UTsuFactory::UpdateBlueprint(
});
}();

FEditorDelegates::OnAssetPreImport.Broadcast(this, Class, Parent, Name, Type);
auto ImportSubsystem = GEditor->GetEditorSubsystem<UImportSubsystem>();

ImportSubsystem->OnAssetPreImport.Broadcast(this, Class, Parent, Name, Type);

Blueprint->Modify(true);

Expand Down Expand Up @@ -190,7 +194,7 @@ UTsuBlueprint* UTsuFactory::UpdateBlueprint(
FKismetEditorUtilities::CompileBlueprint(Blueprint);
}

FEditorDelegates::OnAssetPostImport.Broadcast(this, Blueprint);
ImportSubsystem->OnAssetPostImport.Broadcast(this, Blueprint);

return Blueprint;
}
5 changes: 2 additions & 3 deletions Source/TsuRuntime/Private/TsuRuntimeBlueprintCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
FTsuRuntimeBlueprintCompiler::FTsuRuntimeBlueprintCompiler(
UBlueprint* SourceSketch,
FCompilerResultsLog& MessageLog,
const FKismetCompilerOptions& CompilerOptions,
TArray<UObject*>* ObjLoaded)
: Super(SourceSketch, MessageLog, CompilerOptions, ObjLoaded)
const FKismetCompilerOptions& CompilerOptions)
: Super(SourceSketch, MessageLog, CompilerOptions)
{
}

Expand Down
3 changes: 1 addition & 2 deletions Source/TsuRuntime/Private/TsuRuntimeBlueprintCompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class FTsuRuntimeBlueprintCompiler final
FTsuRuntimeBlueprintCompiler(
UBlueprint* SourceSketch,
FCompilerResultsLog& MessageLog,
const FKismetCompilerOptions& CompilerOptions,
TArray<UObject*>* ObjLoaded);
const FKismetCompilerOptions& CompilerOptions);

private:
void SpawnNewClass(const FString& NewClassName) override;
Expand Down
3 changes: 1 addition & 2 deletions Source/TsuRuntime/Private/TsuRuntimeModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ class FTsuRuntimeModule final
return MakeShared<FTsuRuntimeBlueprintCompiler>(
CastChecked<UTsuBlueprint>(InBlueprint),
InMessageLog,
InCompileOptions,
nullptr);
InCompileOptions);
}

void AddCleanupDelegates()
Expand Down

0 comments on commit 6ad1f0b

Please sign in to comment.