本文整理汇总了C++中UNavigationSystem::Build方法的典型用法代码示例。如果您正苦于以下问题:C++ UNavigationSystem::Build方法的具体用法?C++ UNavigationSystem::Build怎么用?C++ UNavigationSystem::Build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UNavigationSystem
的用法示例。
在下文中一共展示了UNavigationSystem::Build方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RebuildNavigation
void UCheatManager::RebuildNavigation()
{
UNavigationSystem* NavSys = UNavigationSystem::GetCurrent(GetWorld());
if (NavSys)
{
NavSys->Build();
}
}
示例2: LoadMap
//.........这里部分代码省略.........
return;
}
unsigned count = 0;
binary_read(file, count); //tiles
for (unsigned i = 0; i < count; ++i)
{
AHexTileActor* tile;
if (i == 0)
{
tile = this;
}
else
{
tile = GetWorld()->SpawnActor<AHexTileActor>();
tile->Init({ 0,0,0 }); //tmp coords;
}
tile->Load(file);
m_Grid.InsertElement(tile->GetCoordinates(), tile);
}
binary_read(file, count); //barriers
for (unsigned i = 0; i < count; ++i)
{
CreateBarrierForPlacing();
m_CurrentBarrier->Load(file);
PlaceBarrier(false);
}
binary_read(file, count); //platforms
for (unsigned i = 0; i < count; ++i)
{
CreatePlatformForPlacing();
m_CurrentPlatform->Load(file);
PlacePlatform(false);
}
binary_read(file, count); //companions
for (unsigned i = 0; i < count; ++i)
{
auto* companion = GetWorld()->SpawnActor<ACompanionActor>();
m_AllCompanions.insert(companion);
companion->Load(file);
}
binary_read(file, count); //blocker
for (unsigned i = 0; i < count; ++i)
{
auto* blocker = GetWorld()->SpawnActor<ABlockerActor>();
m_AllBlockers.insert(blocker);
blocker->Load(file);
}
binary_read(file, count); //bridges
for (unsigned i = 0; i < count; ++i)
{
auto* bridge = GetWorld()->SpawnActor<ABridgeActor>();
m_AllBridges.insert(bridge);
bridge->Load(file);
}
binary_read(file, count); //turret
for (unsigned i = 0; i < count; ++i)
{
auto* turret = GetWorld()->SpawnActor<ATurretActor>();
m_AllTurrets.insert(turret);
turret->Load(file);
}
binary_read(file, count); //teleport
for (unsigned i = 0; i < count; ++i)
{
auto* teleport = GetWorld()->SpawnActor<ATeleportActor>();
m_AllTeleports.insert(teleport);
teleport->Load(file);
}
for (auto* t : m_AllTeleports)
{
t->PostLoad();
}
AFinishActor* finish;
binary_read(file, finish); //finish
if (finish)
{
m_Finish = GetWorld()->SpawnActor<AFinishActor>();
m_Finish->Load(file);
}
file.close();
m_PortalAI->Generate();
UNavigationSystem* NavSys = UNavigationSystem::GetCurrent(GetWorld());
if (NavSys)
{
NavSys->Build();
}
}