当前位置: 首页>>代码示例>>C++>>正文


C++ UMeshComponent::SetTextureForceResidentFlag方法代码示例

本文整理汇总了C++中UMeshComponent::SetTextureForceResidentFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ UMeshComponent::SetTextureForceResidentFlag方法的具体用法?C++ UMeshComponent::SetTextureForceResidentFlag怎么用?C++ UMeshComponent::SetTextureForceResidentFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UMeshComponent的用法示例。


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

示例1: GetWorld

FPreviewScene::~FPreviewScene()
{
	// Stop any audio components playing in this scene
	if( GEngine && GEngine->GetAudioDevice() )
	{
		GEngine->GetAudioDevice()->Flush( GetWorld(), false );
	}

	// Remove all the attached components
	for( int32 ComponentIndex = 0; ComponentIndex < Components.Num(); ComponentIndex++ )
	{
		UActorComponent* Component = Components[ ComponentIndex ];

		if (bForceAllUsedMipsResident)
		{
			// Remove the mip streaming override on the mesh to be removed
			UMeshComponent* pMesh = Cast<UMeshComponent>(Component);
			if (pMesh != NULL)
			{
				pMesh->SetTextureForceResidentFlag(false);
			}
		}

		Component->UnregisterComponent();
	}
	
	PreviewWorld->CleanupWorld();
	GEngine->DestroyWorldContext(GetWorld());
}
开发者ID:stoneStyle,项目名称:Unreal4,代码行数:29,代码来源:PreviewScene.cpp

示例2: RemoveComponent

void FPreviewScene::RemoveComponent(UActorComponent* Component)
{
	Component->UnregisterComponent();
	Components.Remove(Component);

	if (bForceAllUsedMipsResident)
	{
		// Remove the mip streaming override on the old mesh
		UMeshComponent* pMesh = Cast<UMeshComponent>(Component);
		if (pMesh != NULL)
		{
			pMesh->SetTextureForceResidentFlag(false);
		}
	}
}
开发者ID:stoneStyle,项目名称:Unreal4,代码行数:15,代码来源:PreviewScene.cpp

示例3: Destroy

void FJavascriptInGameScene::Destroy()
{
	if (bDestroyed) return;

	// Stop any audio components playing in this scene
	if (GEngine)
	{
		UWorld* World = GetWorld();
		if (World)
		{
			if (FAudioDevice* AudioDevice = World->GetAudioDevice())
			{
				AudioDevice->Flush(GetWorld(), false);
			}
		}
	}

	// Remove all the attached components
	for (int32 ComponentIndex = 0; ComponentIndex < Components.Num(); ComponentIndex++)
	{
		UActorComponent* Component = Components[ComponentIndex];

		if (bForceAllUsedMipsResident)
		{
			// Remove the mip streaming override on the mesh to be removed
			UMeshComponent* pMesh = Cast<UMeshComponent>(Component);
			if (pMesh != NULL)
			{
				pMesh->SetTextureForceResidentFlag(false);
			}
		}

		Component->UnregisterComponent();
	}

	if (GEngine) 
	{
		PreviewWorld->CleanupWorld();
		GEngine->DestroyWorldContext(GetWorld());
	}
	bDestroyed = true;
}
开发者ID:ConquestArrow,项目名称:Unreal.js-core,代码行数:42,代码来源:JavascriptInGameScene.cpp

示例4: AddComponent

void FPreviewScene::AddComponent(UActorComponent* Component,const FTransform& LocalToWorld)
{
	Components.AddUnique(Component);

	USceneComponent* SceneComp = Cast<USceneComponent>(Component);
	if(SceneComp && SceneComp->GetAttachParent() == NULL)
	{
		SceneComp->SetRelativeTransform(LocalToWorld);
	}

	Component->RegisterComponentWithWorld(GetWorld());

	if (bForceAllUsedMipsResident)
	{
		// Add a mip streaming override to the new mesh
		UMeshComponent* pMesh = Cast<UMeshComponent>(Component);
		if (pMesh != NULL)
		{
			pMesh->SetTextureForceResidentFlag(true);
		}
	}

	GetScene()->UpdateSpeedTreeWind(0.0);
}
开发者ID:stoneStyle,项目名称:Unreal4,代码行数:24,代码来源:PreviewScene.cpp


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