本文整理汇总了C++中ToolSystem::GetPlatformByName方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolSystem::GetPlatformByName方法的具体用法?C++ ToolSystem::GetPlatformByName怎么用?C++ ToolSystem::GetPlatformByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolSystem
的用法示例。
在下文中一共展示了ToolSystem::GetPlatformByName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Run
void PlatformAddCmd::Run()
{
ToolSystem* tsystem = GetSubsystem<ToolSystem>();
Project* project = tsystem->GetProject();
Platform* platform = tsystem->GetPlatformByName(platformToAdd_);
if (!platform)
{
Error(ToString("Unknown platform: %s", platformToAdd_.CString()));
return;
}
if (project->ContainsPlatform(platform->GetPlatformID()))
{
Error(ToString("Project already contains platform: %s", platformToAdd_.CString()));
return;
}
LOGINFOF("Adding platform: %s", platformToAdd_.CString());
project->AddPlatform(platform->GetPlatformID());
Finished();
}
示例2: Run
void BuildCmd::Run()
{
ATOMIC_LOGINFOF("Building project for: %s", buildPlatform_.CString());
ToolSystem* tsystem = GetSubsystem<ToolSystem>();
Project* project = tsystem->GetProject();
Platform* platform = NULL;
platform = tsystem->GetPlatformByName(buildPlatform_);
if (!platform)
{
Error(ToString("Unknown build platform: %s", buildPlatform_.CString()));
return;
}
// create the build
BuildBase* buildBase = platform->NewBuild(project);
if (!assetsBuildTag_.Empty())
{
buildBase->SetAssetBuildTag(assetsBuildTag_);
}
buildBase->SetAutoLog(autoLog_);
// add it to the build system
BuildSystem* buildSystem = GetSubsystem<BuildSystem>();
buildSystem->QueueBuild(buildBase);
SubscribeToEvent(E_BUILDCOMPLETE, ATOMIC_HANDLER(BuildCmd, HandleBuildComplete));
// TODO: parallel/serial builds
buildSystem->StartNextBuild();
}