• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetTransientPackage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetTransientPackage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTransientPackage函数的具体用法?C++ GetTransientPackage怎么用?C++ GetTransientPackage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetTransientPackage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ReplaceStructWithTempDuplicate

	static void ReplaceStructWithTempDuplicate(
		UUserDefinedStruct* StructureToReinstance, 
		TSet<UBlueprint*>& BlueprintsToRecompile,
		TArray<UUserDefinedStruct*>& ChangedStructs)
	{
		if (StructureToReinstance)
		{
			UUserDefinedStruct* DuplicatedStruct = NULL;
			{
				const FString ReinstancedName = FString::Printf(TEXT("STRUCT_REINST_%s"), *StructureToReinstance->GetName());
				const FName UniqueName = MakeUniqueObjectName(GetTransientPackage(), UUserDefinedStruct::StaticClass(), FName(*ReinstancedName));

				TGuardValue<bool> IsDuplicatingClassForReinstancing(GIsDuplicatingClassForReinstancing, true);
				DuplicatedStruct = (UUserDefinedStruct*)StaticDuplicateObject(StructureToReinstance, GetTransientPackage(), *UniqueName.ToString(), ~RF_Transactional); 
			}

			DuplicatedStruct->Guid = StructureToReinstance->Guid;
			DuplicatedStruct->Bind();
			DuplicatedStruct->StaticLink(true);
			DuplicatedStruct->PrimaryStruct = StructureToReinstance;
			DuplicatedStruct->Status = EUserDefinedStructureStatus::UDSS_Duplicate;
			DuplicatedStruct->SetFlags(RF_Transient);
			DuplicatedStruct->AddToRoot();
			CastChecked<UUserDefinedStructEditorData>(DuplicatedStruct->EditorData)->RecreateDefaultInstance();

			for (auto StructProperty : TObjectRange<UStructProperty>(RF_ClassDefaultObject | RF_PendingKill))
			{
				if (StructProperty && (StructureToReinstance == StructProperty->Struct))
				{
					if (auto OwnerClass = Cast<UBlueprintGeneratedClass>(StructProperty->GetOwnerClass()))
					{
						if (UBlueprint* FoundBlueprint = Cast<UBlueprint>(OwnerClass->ClassGeneratedBy))
						{
							BlueprintsToRecompile.Add(FoundBlueprint);
							StructProperty->Struct = DuplicatedStruct;
						}
					}
					else if (auto OwnerStruct = Cast<UUserDefinedStruct>(StructProperty->GetOwnerStruct()))
					{
						check(OwnerStruct != DuplicatedStruct);
						const bool bValidStruct = (OwnerStruct->GetOutermost() != GetTransientPackage())
							&& !OwnerStruct->HasAnyFlags(RF_PendingKill)
							&& (EUserDefinedStructureStatus::UDSS_Duplicate != OwnerStruct->Status.GetValue());

						if (bValidStruct)
						{
							ChangedStructs.AddUnique(OwnerStruct);
							StructProperty->Struct = DuplicatedStruct;
						}
					}
					else
					{
						UE_LOG(LogK2Compiler, Error, TEXT("ReplaceStructWithTempDuplicate unknown owner"));
					}
				}
			}

			DuplicatedStruct->RemoveFromRoot();
		}
	}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:60,代码来源:UserDefinedStructureCompilerUtils.cpp


示例2: SetFlags

/**
 * Marks/Unmarks the package's bDirty flag
 */
void UPackage::SetDirtyFlag( bool bIsDirty )
{
	if ( GetOutermost() != GetTransientPackage() )
	{
		if ( GUndo != NULL
		// PIE world objects should never end up in the transaction buffer as we cannot undo during gameplay.
		&& !(GetOutermost()->PackageFlags & (PKG_PlayInEditor|PKG_ContainsScript)) )
		{
			// make sure we're marked as transactional
			SetFlags(RF_Transactional);

			// don't call Modify() since it calls SetDirtyFlag()
			GUndo->SaveObject( this );
		}

		// Update dirty bit
		bDirty = bIsDirty;

		if( GIsEditor									// Only fire the callback in editor mode
			&& !(PackageFlags & PKG_ContainsScript)		// Skip script packages
			&& !(PackageFlags & PKG_PlayInEditor)		// Skip packages for PIE
			&& GetTransientPackage() != this )			// Skip the transient package
		{
			// Package is changing dirty state, let the editor know so we may prompt for source control checkout
			PackageDirtyStateChangedEvent.Broadcast(this);
		}
	}
}
开发者ID:Foreven,项目名称:Unreal4-1,代码行数:31,代码来源:Package.cpp


示例3: TEXT

UMaterialShaderQualitySettings* UMaterialShaderQualitySettings::Get()
{
	if( RenderQualitySingleton == nullptr )
	{
		static const TCHAR* SettingsContainerName = TEXT("MaterialShaderQualitySettingsContainer");

		RenderQualitySingleton = FindObject<UMaterialShaderQualitySettings>(GetTransientPackage(), SettingsContainerName);

		if (RenderQualitySingleton == nullptr)
		{
			RenderQualitySingleton = NewObject<UMaterialShaderQualitySettings>(GetTransientPackage(), UMaterialShaderQualitySettings::StaticClass(), SettingsContainerName);
			RenderQualitySingleton->AddToRoot();
		}
		RenderQualitySingleton->CurrentPlatformSettings = RenderQualitySingleton->GetShaderPlatformQualitySettings(FPlatformProperties::PlatformName());

		// LegacyShaderPlatformToShaderFormat(EShaderPlatform)
		// GShaderPlatformForFeatureLevel
		// GMaxRHIFeatureLevel

		// populate shader platforms
		RenderQualitySingleton->CurrentPlatformSettings = RenderQualitySingleton->GetShaderPlatformQualitySettings(FPlatformProperties::PlatformName());

	}
	return RenderQualitySingleton;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:25,代码来源:MaterialShaderQualitySettings.cpp


示例4: GetTransientPackage

void ARadiantWebViewActor::BindDynamicMaterial()
{
	if ((GetNetMode() != NM_DedicatedServer) && MeshComponent && (WebViewRenderComponent->WebView->WebViewCanvas))
	{
		if (OldMeshMaterial)
		{
			MeshComponent->SetMaterial(OldMaterialIndex, OldMeshMaterial);
		}

		OldMeshMaterial = MeshComponent->GetMaterial(MaterialIndex);

		if (WebViewMID)
		{
			WebViewMID->MarkPendingKill();
		}

		if (ReplaceMaterial)
		{
			WebViewMID = UMaterialInstanceDynamic::Create(ReplaceMaterial, GetTransientPackage());
		}
		else if (OldMeshMaterial)
		{
			WebViewMID = UMaterialInstanceDynamic::Create(OldMeshMaterial, GetTransientPackage());
		}

		if (WebViewMID)
		{
			WebViewMID->SetTextureParameterValue(TEXT("WebViewTexture"), WebViewRenderComponent->WebView->WebViewCanvas->RenderTargetTexture);
		}
	}
}
开发者ID:LeGone,项目名称:RadiantUI,代码行数:31,代码来源:RadiantWebViewActor.cpp


示例5: PreviewWorld

FPreviewScene::FPreviewScene(FPreviewScene::ConstructionValues CVS)
	: PreviewWorld(NULL)
	, bForceAllUsedMipsResident(CVS.bForceMipsResident)
{
	PreviewWorld = NewObject<UWorld>();
	PreviewWorld->WorldType = EWorldType::Preview;
	if (CVS.bTransactional)
	{
		PreviewWorld->SetFlags(RF_Transactional);
	}

	FWorldContext& WorldContext = GEngine->CreateNewWorldContext(EWorldType::Preview);
	WorldContext.SetCurrentWorld(PreviewWorld);

	PreviewWorld->InitializeNewWorld(UWorld::InitializationValues()
										.AllowAudioPlayback(CVS.bAllowAudioPlayback)
										.CreatePhysicsScene(CVS.bCreatePhysicsScene)
										.RequiresHitProxies(false)
										.CreateNavigation(false)
										.CreateAISystem(false)
										.ShouldSimulatePhysics(CVS.bShouldSimulatePhysics)
										.SetTransactional(CVS.bTransactional));
	PreviewWorld->InitializeActorsForPlay(FURL());

	GetScene()->UpdateDynamicSkyLight(FLinearColor::White * CVS.SkyBrightness, FLinearColor::Black);

	DirectionalLight = NewObject<UDirectionalLightComponent>(GetTransientPackage());
	DirectionalLight->Intensity = CVS.LightBrightness;
	DirectionalLight->LightColor = FColor::White;
	AddComponent(DirectionalLight, FTransform(CVS.LightRotation));

	LineBatcher = NewObject<ULineBatchComponent>(GetTransientPackage());
	AddComponent(LineBatcher, FTransform::Identity);
}
开发者ID:stoneStyle,项目名称:Unreal4,代码行数:34,代码来源:PreviewScene.cpp


示例6: Init

void FTexAlignTools::Init()
{
	// Create the list of aligners.
	Aligners.Empty();
	Aligners.Add(NewObject<UTexAlignerDefault>(GetTransientPackage(), NAME_None, RF_Public | RF_RootSet | RF_Standalone));
	Aligners.Add(NewObject<UTexAlignerPlanar>(GetTransientPackage(), NAME_None, RF_Public | RF_RootSet | RF_Standalone));
	Aligners.Add(NewObject<UTexAlignerBox>(GetTransientPackage(), NAME_None, RF_Public | RF_RootSet | RF_Standalone));
	Aligners.Add(NewObject<UTexAlignerFit>(GetTransientPackage(), NAME_None, RF_Public | RF_RootSet | RF_Standalone));
	
	FEditorDelegates::FitTextureToSurface.AddRaw(this, &FTexAlignTools::OnEditorFitTextureToSurface);
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:11,代码来源:TexAlignTools.cpp


示例7: MakeUniqueObjectName

UObject* FEditorObjectTracker::GetEditorObjectForClass( UClass* EdClass )
{
	UObject *Obj = (EditorObjMap.Contains(EdClass) ? *EditorObjMap.Find(EdClass) : NULL);
	if(Obj == NULL)
	{
		FString ObjName = MakeUniqueObjectName(GetTransientPackage(), EdClass).ToString();
		ObjName += "_EdObj";
		Obj = StaticConstructObject(EdClass, GetTransientPackage(), FName(*ObjName), RF_Public|RF_Standalone|RF_Transient);
		EditorObjMap.Add(EdClass,Obj);
	}
	return Obj;
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:12,代码来源:EditorObjectsTracker.cpp


示例8: Modify

void UChildActorComponent::PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent)
{
	if (PropertyChangedEvent.Property && PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UChildActorComponent, ChildActorClass))
	{
		if (IsTemplate())
		{
			if (ChildActorClass)
			{
				if (ChildActorTemplate == nullptr || (ChildActorTemplate->GetClass() != ChildActorClass))
				{
					Modify();

					AActor* NewChildActorTemplate = NewObject<AActor>(GetTransientPackage(), ChildActorClass, NAME_None, RF_ArchetypeObject | RF_Transactional | RF_Public);

					if (ChildActorTemplate)
					{
						UEngine::CopyPropertiesForUnrelatedObjects(ChildActorTemplate, NewChildActorTemplate);

						ChildActorTemplate->Rename(nullptr, GetTransientPackage(), REN_DontCreateRedirectors);
					}

					ChildActorTemplate = NewChildActorTemplate;

					// Record initial object state in case we're in a transaction context.
					ChildActorTemplate->Modify();

					// Now set the actual name and outer to the BPGC.
					const FString TemplateName = FString::Printf(TEXT("%s_%s_CAT"), *GetName(), *ChildActorClass->GetName());

					ChildActorTemplate->Rename(*TemplateName, this, REN_DoNotDirty | REN_DontCreateRedirectors | REN_ForceNoResetLoaders);
				}
			}
			else if (ChildActorTemplate)
			{
				Modify();

				ChildActorTemplate->Rename(nullptr, GetTransientPackage(), REN_DontCreateRedirectors);
				ChildActorTemplate = nullptr;
			}
		}
		else
		{
			ChildActorTemplate = CastChecked<UChildActorComponent>(GetArchetype())->ChildActorTemplate;
		}
	}

	Super::PostEditChangeChainProperty(PropertyChangedEvent);
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:48,代码来源:ChildActorComponent.cpp


示例9: TEXT

// Called when the game starts
void UTestLoadCSVComponent::BeginPlay()
{
	Super::BeginPlay();

	// ...
	
	// 加载csv,并且显示第一行数据
	UDataTable* csv = LoadObject<UDataTable>(NULL, TEXT("DataTable'/Game/csv/test1.test1'"));
	if (csv != NULL && csv->GetRowNames().Num() > 0)
	{
		// 获取id=1的那行的数据
		FTestDataRow* row = csv->FindRow<FTestDataRow>(TEXT("1"), TEXT(""));
		if (row != NULL)
		{
			Debug(FString::Printf(TEXT("csv, row time="), row->time));
		}
	}

	// 动态读取csv文件,不过,这个只能在Editor模式运行,如果需要在发布版中运行,那么自己新建一个类
	FString FilePath = FPaths::ConvertRelativePathToFull(FPaths::GameDir()) + FString::Printf(TEXT("csv/test1.csv"));
	FString Data;
	if (FFileHelper::LoadFileToString(Data, *FilePath))
	{
		UDataTable* DataTable = NewObject<UDataTable>(GetTransientPackage(), FName(TEXT("CSV_Test")));
		DataTable->RowStruct = FTestDataRow::StaticStruct();
		DataTable->CreateTableFromCSVString(Data);
		Debug(FString::Printf(TEXT("%d"), DataTable->GetRowNames().Num()));
	}
}
开发者ID:badforlabor,项目名称:UE4_Primer,代码行数:30,代码来源:TestLoadCSVComponent.cpp


示例10: GetTransientPackage

FAISenseID UAISense_Blueprint::UpdateSenseID()
{
#if WITH_EDITOR
	// ignore skeleton and "old version"-classes
	if (FKismetEditorUtilities::IsClassABlueprintSkeleton(GetClass()) || GetClass()->HasAnyClassFlags(CLASS_NewerVersionExists)
		|| (GetOutermost() == GetTransientPackage()))
	{
		return FAISenseID::InvalidID();
	}
#endif
	if (GetClass()->HasAnyClassFlags(CLASS_Abstract) == false)
	{
		const NAME_INDEX NameIndex = GetClass()->GetFName().GetDisplayIndex();
		const FAISenseID* StoredID = BPSenseToSenseID.Find(NameIndex);
		if (StoredID != nullptr)
		{
			ForceSenseID(*StoredID);
		}
		else
		{
			const FAISenseID NewSenseID = FAISenseID(GetFName());
			ForceSenseID(NewSenseID);
			BPSenseToSenseID.Add(NameIndex, GetSenseID());
		}
	}

	return GetSenseID();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:28,代码来源:AISense_Blueprint.cpp


示例11: GetTransientPackage

// Clones (deep copies) a UEdGraph, including all of it's nodes and pins and their links,
// maintaining a mapping from the clone to the source nodes (even across multiple clonings)
UEdGraph* FEdGraphUtilities::CloneGraph(UEdGraph* InSource, UObject* NewOuter, FCompilerResultsLog* MessageLog, bool bCloningForCompile)
{
	// Duplicate the graph, keeping track of what was duplicated
	TMap<UObject*, UObject*> DuplicatedObjectList;

	UObject* UseOuter = (NewOuter != NULL) ? NewOuter : GetTransientPackage();
	FObjectDuplicationParameters Parameters(InSource, UseOuter);
	Parameters.CreatedObjects = &DuplicatedObjectList;

	if (bCloningForCompile || (NewOuter == NULL))
	{
		Parameters.ApplyFlags |= RF_Transient;
	}

	UEdGraph* ClonedGraph = CastChecked<UEdGraph>(StaticDuplicateObjectEx(Parameters));

	// Store backtrack links from each duplicated object to the original source object
	if (MessageLog != NULL)
	{
		for (TMap<UObject*, UObject*>::TIterator It(DuplicatedObjectList); It; ++It)
		{
			UObject* const Source = It.Key();
			UObject* const Dest = It.Value();

			MessageLog->NotifyIntermediateObjectCreation(Dest, Source);
		}
	}

	return ClonedGraph;
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:32,代码来源:EdGraphUtilities.cpp


示例12: GetTransientPackage

//------------------------------------------------------------------------------
UBlueprintEventNodeSpawner* UBlueprintEventNodeSpawner::Create(TSubclassOf<UK2Node_Event> NodeClass, FName CustomEventName, UObject* Outer/* = nullptr*/)
{
	if (Outer == nullptr)
	{
		Outer = GetTransientPackage();
	}

	UBlueprintEventNodeSpawner* NodeSpawner = NewObject<UBlueprintEventNodeSpawner>(Outer);
	NodeSpawner->NodeClass       = NodeClass;
	NodeSpawner->CustomEventName = CustomEventName;

	FBlueprintActionUiSpec& MenuSignature = NodeSpawner->DefaultMenuSignature;
	if (CustomEventName.IsNone())
	{
		MenuSignature.MenuName = LOCTEXT("AddCustomEvent", "Add Custom Event...");
		MenuSignature.IconName = TEXT("GraphEditor.CustomEvent_16x");
	}
	else
	{
		FText const EventName = FText::FromName(CustomEventName);
		MenuSignature.MenuName = FText::Format(LOCTEXT("EventWithSignatureName", "Event {0}"), EventName);
		MenuSignature.IconName = TEXT("GraphEditor.Event_16x");
	}
	//MenuSignature.Category, will be pulled from the node template
	//MenuSignature.Tooltip,  will be pulled from the node template 
	//MenuSignature.Keywords, will be pulled from the node template

	return NodeSpawner;
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:30,代码来源:BlueprintEventNodeSpawner.cpp


示例13: LoadDecks

bool UDeckListModel::LoadDecks(UCardListModel* CardListModel, UHeroListModel* HeroListModel)
{
	TArray<UCardDeckModel*> Result;
	UParagonSaveGame* LoadedSaveGame = Cast<UParagonSaveGame>(UGameplayStatics::CreateSaveGameObject(UParagonSaveGame::StaticClass()));
	LoadedSaveGame = Cast<UParagonSaveGame>(UGameplayStatics::LoadGameFromSlot(TEXT("DefaultSaveGameSlot"), 0));
	if (!LoadedSaveGame)
	{
		return false;
	}

	auto Importer = NewObject<UCardDeckImporterJSON>(GetTransientPackage(), NAME_None);

	for (auto& DeckAsJSON : LoadedSaveGame->DecksAsJSON)
	{
		if (DeckAsJSON.IsEmpty())
		{
			Result.Add(nullptr);
		}
		else
		{
			TArray<FString> ImportErrors;
			UCardDeckModel* CardDeckModel = Importer->ImportDeckModel(DeckAsJSON, CardListModel, HeroListModel, ImportErrors);
			if (!CardDeckModel)
			{
				return false;
			}
			Result.Add(CardDeckModel);
		}
	}

	DeckSlots = Result;
	return true;
}
开发者ID:FashGek,项目名称:ParagonUIPrototyping,代码行数:33,代码来源:DeckListModel.cpp


示例14: AddReferencedObjects

void FAnimMontageInstance::AddReferencedObjects( FReferenceCollector& Collector )
{
	if (Montage && Montage->GetOuter() == GetTransientPackage())
	{
		Collector.AddReferencedObject(Montage);
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:7,代码来源:AnimMontage.cpp


示例15: check

//------------------------------------------------------------------------------
UBlueprintComponentNodeSpawner* UBlueprintComponentNodeSpawner::Create(TSubclassOf<UActorComponent> const ComponentClass, UObject* Outer/* = nullptr*/)
{
	check(ComponentClass != nullptr);

	if (Outer == nullptr)
	{
		Outer = GetTransientPackage();
	}

	UBlueprintComponentNodeSpawner* NodeSpawner = NewObject<UBlueprintComponentNodeSpawner>(Outer);
	NodeSpawner->ComponentClass = ComponentClass;
	NodeSpawner->NodeClass      = UK2Node_AddComponent::StaticClass();

	FBlueprintActionUiSpec& MenuSignature = NodeSpawner->DefaultMenuSignature;
	FText const ComponentTypeName = FText::FromName(ComponentClass->GetFName());
	MenuSignature.MenuName = FText::Format(LOCTEXT("AddComponentMenuName", "Add {0}"), ComponentTypeName);
	MenuSignature.Category = BlueprintComponentNodeSpawnerImpl::GetDefaultMenuCategory(ComponentClass);
	MenuSignature.Tooltip  = FText::Format(LOCTEXT("AddComponentTooltip", "Spawn a {0}"), ComponentTypeName);
	MenuSignature.Keywords = ComponentClass->GetMetaData(FBlueprintMetadata::MD_FunctionKeywords);
	// add at least one character, so that PrimeDefaultMenuSignature() doesn't 
	// attempt to query the template node
	MenuSignature.Keywords.AppendChar(TEXT(' '));
	MenuSignature.IconName = FClassIconFinder::FindIconNameForClass(ComponentClass);

	return NodeSpawner;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:27,代码来源:BlueprintComponentNodeSpawner.cpp


示例16: StartupModule

	virtual void StartupModule() override
	{
		// this is an example of a hotfix, declared here for no particular reason. Once we have other examples, it can be deleted.
#if 0
		FCoreDelegates::GetHotfixDelegate(EHotfixDelegates::Test).BindRaw(this, &FWindowsTargetPlatformModule::HotfixTest);
#endif

		TargetSettings = NewObject<UWindowsTargetSettings>(GetTransientPackage(), "WindowsTargetSettings", RF_Standalone);
		
		// We need to manually load the config properties here, as this module is loaded before the UObject system is setup to do this
		GConfig->GetArray(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("TargetedRHIs"), TargetSettings->TargetedRHIs, GEngineIni);

		// When this is initialized the UEnum for EMinimumSupportedOS hasn't been registered. 
		FString MinOSString;
		if (GConfig->GetString(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("MinimumOSVersion"), MinOSString, GEngineIni))
		{
			// We need to parse the string and compare manually.
			TargetSettings->MinimumOSVersion = MinOSString == TEXT("MSOS_XP") ? EMinimumSupportedOS::MSOS_XP : EMinimumSupportedOS::MSOS_Vista;
		}


		TargetSettings->AddToRoot();

		ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");

		if (SettingsModule != nullptr)
		{
			SettingsModule->RegisterSettings("Project", "Platforms", "Windows",
				LOCTEXT("TargetSettingsName", "Windows"),
				LOCTEXT("TargetSettingsDescription", "Settings for Windows target platform"),
				TargetSettings
			);
		}
	}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:34,代码来源:WindowsTargetPlatformModule.cpp


示例17:

/**
 * Constructor. Builds the list of items to ignore
 */
FFindReferencedAssets::FFindReferencedAssets(void)
{
	OnEditorMapChangeDelegateHandle = FEditorDelegates::MapChange.AddRaw(this, &FFindReferencedAssets::OnEditorMapChange);

	// Set up our ignore lists
	IgnoreClasses.Add(ULevel::StaticClass());
	IgnoreClasses.Add(UWorld::StaticClass());

	// Load the asset registry module
	FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(TEXT("AssetRegistry"));

	TArray<FAssetData> AssetData;
	FARFilter Filter;
	Filter.PackagePaths.Add(FName(TEXT("/Engine/EngineResources")));
	Filter.PackagePaths.Add(FName(TEXT("/Engine/EngineFonts")));
	Filter.PackagePaths.Add(FName(TEXT("/Engine/EngineMaterials")));
	Filter.PackagePaths.Add(FName(TEXT("/Engine/EditorResources")));
	Filter.PackagePaths.Add(FName(TEXT("/Engine/EditorMaterials")));
	
	AssetRegistryModule.Get().GetAssets(Filter, AssetData);

	for (int32 AssetIdx = 0; AssetIdx < AssetData.Num(); ++AssetIdx)
	{
		UPackage* Package = FindObject<UPackage>(NULL, *AssetData[AssetIdx].PackageName.ToString(), true);
		if( Package != NULL )
		{
			IgnorePackages.Add(Package);
		}
	}

	IgnorePackages.Add(GetTransientPackage());
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:35,代码来源:ReferencedAssetsUtils.cpp


示例18: GetBlueprint

void UK2Node::ReconstructSinglePin(UEdGraphPin* NewPin, UEdGraphPin* OldPin, ERedirectType RedirectType)
{
	UBlueprint* Blueprint = GetBlueprint();

	check(NewPin && OldPin);

	// Copy over modified persistent data
	NewPin->CopyPersistentDataFromOldPin(*OldPin);

	if (NewPin->DefaultValue != NewPin->AutogeneratedDefaultValue)
	{
		if (RedirectType == ERedirectType_Value)
		{
			TArray<FString> OldPinNames;
			GetRedirectPinNames(*OldPin, OldPinNames);

			// convert TArray<FString> to TArray<FName>, faster to search
			TArray<FName> OldPinFNames;
			for (auto NameIter=OldPinNames.CreateConstIterator(); NameIter; ++NameIter)
			{
				const FString& Name = *NameIter;
				OldPinFNames.AddUnique(*Name);
			}

			// go through for the NewPinNode
			for(TMultiMap<UClass*, FParamRemapInfo>::TConstKeyIterator ParamIter(FMemberReference::GetParamRedirectMap(), Cast<UK2Node>(NewPin->GetOwningNode())->GetClass()); ParamIter; ++ParamIter)
			{
				const FParamRemapInfo& ParamRemap = ParamIter.Value();

				// once we find it, see about remapping the value
				if (OldPinFNames.Contains(ParamRemap.OldParam))
				{
					const FString* NewValue = ParamRemap.ParamValueMap.Find(NewPin->DefaultValue);
					if (NewValue)
					{
						NewPin->DefaultValue = *NewValue;
					}
					break;
				}
			}
		}
		else if (RedirectType == ERedirectType_Custom)
		{
			CustomMapParamValue(*NewPin);
		}
	}

	// Update the blueprints watched pins as the old pin will be going the way of the dodo
	for (int32 WatchIndex = 0; WatchIndex < Blueprint->PinWatches.Num(); ++WatchIndex)
	{
		UEdGraphPin*& WatchedPin = Blueprint->PinWatches[WatchIndex];
		if( WatchedPin == OldPin )
		{
			WatchedPin = NewPin;
			break;
		}
	}

	OldPin->Rename(NULL, GetTransientPackage(), (REN_DontCreateRedirectors|(Blueprint->bIsRegeneratingOnLoad ? REN_ForceNoResetLoaders : REN_None)));
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:60,代码来源:K2Node.cpp


示例19: GetTransientPackage

UMaterialInstanceDynamic* UMaterialInstanceDynamic::Create(UMaterialInterface* ParentMaterial, UObject* InOuter)
{
	UObject* Outer = InOuter ? InOuter : GetTransientPackage();
	UMaterialInstanceDynamic* MID = NewObject<UMaterialInstanceDynamic>(Outer);
	MID->SetParentInternal(ParentMaterial, false);
	return MID;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:7,代码来源:MaterialInstanceDynamic.cpp


示例20: GetTransientPackage

void SStaticMeshEditorViewport::Construct(const FArguments& InArgs)
{
	StaticMeshEditorPtr = InArgs._StaticMeshEditor;

	StaticMesh = InArgs._ObjectToEdit;

	CurrentViewMode = VMI_Lit;

	SEditorViewport::Construct( SEditorViewport::FArguments() );

	PreviewMeshComponent = ConstructObject<UStaticMeshComponent>(
		UStaticMeshComponent::StaticClass(), GetTransientPackage(), NAME_None, RF_Transient );

	SetPreviewMesh(StaticMesh);

	ViewportOverlay->AddSlot()
		.VAlign(VAlign_Top)
		.HAlign(HAlign_Left)
		.Padding(10)
		[
			SAssignNew(OverlayTextVerticalBox, SVerticalBox)
		];

	FCoreUObjectDelegates::OnObjectPropertyChanged.AddRaw(this, &SStaticMeshEditorViewport::OnObjectPropertyChanged);

}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:26,代码来源:SStaticMeshEditorViewport.cpp



注:本文中的GetTransientPackage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetTranslation函数代码示例发布时间:2022-05-30
下一篇:
C++ GetTransform函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap