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


C++ UNavigationSystem::Build方法代码示例

本文整理汇总了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();
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:8,代码来源:CheatManager.cpp

示例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();
	}
}
开发者ID:jijik,项目名称:portal_game,代码行数:101,代码来源:HexEditorActor.cpp


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