You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Engine/LevelStreamingVolume.h"
|
|
#include "Engine/CollisionProfile.h"
|
|
#include "Engine/World.h"
|
|
#include "Components/BrushComponent.h"
|
|
#include "Engine/LevelStreaming.h"
|
|
|
|
ALevelStreamingVolume::ALevelStreamingVolume(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
GetBrushComponent()->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
|
|
GetBrushComponent()->bAlwaysCreatePhysicsState = true;
|
|
|
|
bColored = true;
|
|
BrushColor.R = 255;
|
|
BrushColor.G = 165;
|
|
BrushColor.B = 0;
|
|
BrushColor.A = 255;
|
|
|
|
StreamingUsage = SVB_LoadingAndVisibility;
|
|
}
|
|
|
|
void ALevelStreamingVolume::PostLoad()
|
|
{
|
|
Super::PostLoad();
|
|
|
|
#if WITH_EDITOR
|
|
if (GIsEditor)
|
|
{
|
|
UpdateStreamingLevelsRefs();
|
|
}
|
|
#endif//WITH_EDITOR
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
|
|
void ALevelStreamingVolume::UpdateStreamingLevelsRefs()
|
|
{
|
|
StreamingLevelNames.Reset();
|
|
|
|
UWorld* OwningWorld = GetWorld();
|
|
if (OwningWorld)
|
|
{
|
|
for (ULevelStreaming* LevelStreaming : OwningWorld->GetStreamingLevels())
|
|
{
|
|
if (LevelStreaming && LevelStreaming->EditorStreamingVolumes.Find(this) != INDEX_NONE)
|
|
{
|
|
StreamingLevelNames.Add(LevelStreaming->GetWorldAssetPackageFName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif// WITH_EDITOR
|