本文整理汇总了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());
}
示例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);
}
}
}
示例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;
}
示例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);
}