Files
UnrealEngineUWP/Engine/Source/Editor/EnvironmentQueryEditor/Private/EnvironmentQueryFactory.cpp
Mike Fricker 65e7557229 [INTEGRATE] Compile times: Working on eliminating <Module>Classes.h header files
- This checkin eliminates use of all <Module>Classes.h files in Engine, with the exception of UnrealEdClasses.h
- Compilation speed-ups for all of the modules affected, now that they are including what they use
- No effective changes other than C++ includes

[CL 2686054 by Mike Fricker in Main branch]
2015-09-10 08:48:03 -04:00

34 lines
1.1 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "EnvironmentQueryEditorPrivatePCH.h"
#include "EnvironmentQueryFactory.h"
#include "EnvironmentQueryEditorModule.h"
#include "EnvironmentQuery/EnvQuery.h"
UEnvironmentQueryFactory::UEnvironmentQueryFactory(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
SupportedClass = UEnvQuery::StaticClass();
bEditAfterNew = true;
bCreateNew = true;
}
UObject* UEnvironmentQueryFactory::FactoryCreateNew(UClass* Class,UObject* InParent,FName Name,EObjectFlags Flags,UObject* Context,FFeedbackContext* Warn)
{
check(Class->IsChildOf(UEnvQuery::StaticClass()));
return NewObject<UEnvQuery>(InParent, Class, Name, Flags);
}
bool UEnvironmentQueryFactory::CanCreateNew() const
{
if (GetDefault<UEditorExperimentalSettings>()->bEQSEditor)
{
return true;
}
// Check ini to see if we should enable creation
bool bEnableEnvironmentQueryEd = false;
GConfig->GetBool(TEXT("EnvironmentQueryEd"), TEXT("EnableEnvironmentQueryEd"), bEnableEnvironmentQueryEd, GEngineIni);
return bEnableEnvironmentQueryEd;
}