• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ToolSystem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ToolSystem的典型用法代码示例。如果您正苦于以下问题:C++ ToolSystem类的具体用法?C++ ToolSystem怎么用?C++ ToolSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ToolSystem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: BuildManaged

bool BuildWindows::BuildManaged(const String& buildPath)
{
    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    FileSystem* fileSystem = GetSubsystem<FileSystem>();
    Project* project = toolSystem->GetProject();
    ProjectSettings* settings = project->GetProjectSettings();

    String projectPath = project->GetProjectPath();

#ifdef ATOMIC_DEBUG
    String config = "Debug";
#else
    String config = "Release";
#endif

    String managedBins = projectPath + ToString("AtomicNET/%s/Bin/Desktop/", config.CString());
    String managedExe = managedBins + settings->GetName() + ".exe";

    if (!fileSystem->FileExists(managedExe))
    {
        FailBuild(ToString("Error building managed project, please compile the %s binary %s before building", config.CString(), managedExe.CString()));
        return false;
    }

    StringVector results;
    StringVector filtered;

    fileSystem->ScanDir(results, managedBins, "", SCAN_FILES, false);

    StringVector filterList;

    StringVector::Iterator itr = results.Begin();
    while (itr != results.End())
    {
        unsigned i;
        for (i = 0; i < filterList.Size(); i++)
        {
            if (itr->Contains(filterList[i]))
                break;
        }

        if (i == filterList.Size())
            filtered.Push(*itr);

        itr++;
    }

    for (unsigned i = 0; i < filtered.Size(); i++)
    {
        String filename = filtered[i];

        if (!BuildCopyFile(managedBins + filename, buildPath_ + "/" + filename))
            return false;

    }

    return true;

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:60,代码来源:BuildWindows.cpp


示例2: BuildBase

BuildAndroid::BuildAndroid(Context* context, Project* project) : BuildBase(context, project, PLATFORMID_ANDROID)
{
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    // this cast isn't great
    platformAndroid_ = (PlatformAndroid*) toolSystem->GetPlatformByID(PLATFORMID_ANDROID);

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:7,代码来源:BuildAndroid.cpp


示例3: GenerateProjectProperties

bool AndroidProjectGenerator::GenerateProjectProperties()
{
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String apiString = settings->GetSDKVersion();

    if (!apiString.Length())
    {
        errorText_ = "Invalid Android API level, Press Refresh and select a valid level.";
        return false;
    }


    String props;
    props.AppendWithFormat("target=%s", apiString.CString());

    File file(context_, buildPath_ + "/project.properties", FILE_WRITE);

    if (!file.IsOpen())
    {
        errorText_ = "Project generator unable to open file project.properties in " + buildPath_;
        return false;
    }
    file.Write(props.CString(), props.Length());

    return true;

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:30,代码来源:AndroidProjectGenerator.cpp


示例4: 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();
}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:25,代码来源:PlatformAddCmd.cpp


示例5: LOGINFOF

void PlayCmd::Run()
{
    LOGINFOF("Playing project");

    ToolSystem* tsystem = GetSubsystem<ToolSystem>();
    ToolEnvironment* env = GetSubsystem<ToolCore::ToolEnvironment>();
    Project* project = tsystem->GetProject();
    const String& editorBinary = env->GetEditorBinary();

    Vector<String> paths;
    paths.Push(env->GetCoreDataDir());
    paths.Push(env->GetPlayerDataDir());
    paths.Push(project->GetResourcePath());

    // fixme: this is for loading from cache
    paths.Push(project->GetProjectPath());
    paths.Push(project->GetProjectPath() + "Cache");

    String resourcePaths;
    resourcePaths.Join(paths, "!");

    Vector<String> vargs;

    String args = ToString("--player --project \"%s\"", AddTrailingSlash(project->GetProjectPath()).CString());

    vargs = args.Split(' ');
    //vargs.Insert(0, "--player");

    // TODO: use IPC (maybe before this set log location/access the log and output it, we need access to errors)
    LaunchPlayerProcess(editorBinary, vargs, "");

    Finished();

}
开发者ID:Drooids,项目名称:AtomicGameEngine,代码行数:34,代码来源:PlayCmd.cpp


示例6: AssetDatabase_GetAssetsByImporterType

static int AssetDatabase_GetAssetsByImporterType(duk_context* ctx)
{
    JSVM* vm = JSVM::GetJSVM(ctx);
    ToolSystem* ts = vm->GetSubsystem<ToolSystem>();
    AssetDatabase* db = vm->GetSubsystem<AssetDatabase>();
    Project* project = ts->GetProject();

    StringHash type = duk_require_string(ctx, 0);
    String resourceType = duk_require_string(ctx, 1);

    duk_push_array(ctx);

    if (!project)
        return 1;

    PODVector<Asset*> assets;
    db->GetAssetsByImporterType(type, resourceType, assets);

    for(unsigned i = 0; i < assets.Size(); i++)
    {
        js_push_class_object_instance(ctx, assets[i], 0);
        duk_put_prop_index(ctx, -2, i);
    }

    return 1;
}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:26,代码来源:ToolCoreJS.cpp


示例7: RunADBStartActivity

void BuildAndroid::RunADBStartActivity()
{

    SubprocessSystem* subs = GetSubsystem<SubprocessSystem>();
    String adbCommand = platformAndroid_->GetADBCommand();

    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String stringArgs;
    const char* cpackage = settings->GetPackageName().CString();
    stringArgs.AppendWithFormat("shell am start -n %s/%s.AtomicGameEngine",cpackage, cpackage);

    Vector<String> args = stringArgs.Split(' ');

    currentBuildPhase_ = ADBStartActivity;
    Subprocess* subprocess = subs->Launch(adbCommand, args, buildPath_);
    if (!subprocess)
    {
        FailBuild("StartActivity operation did not launch successfully.");
        return;
    }

    VariantMap buildOutput;
    buildOutput[BuildOutput::P_TEXT] = "\n\n<color #D4FB79>Starting Android Activity</color>\n\n";
    SendEvent(E_BUILDOUTPUT, buildOutput);

    SubscribeToEvent(subprocess, E_SUBPROCESSCOMPLETE, ATOMIC_HANDLER(BuildAndroid, HandleADBStartActivityComplete));
    SubscribeToEvent(subprocess, E_SUBPROCESSOUTPUT, ATOMIC_HANDLER(BuildBase, HandleSubprocessOutputEvent));

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:32,代码来源:BuildAndroid.cpp


示例8: SplitPath

bool CubemapGenerator::InitPaths()
{

    String scenePath = sceneEditor_->GetFullPath();

    String pathName;
    String fileName;
    String ext;

    SplitPath(scenePath, pathName, fileName, ext);

    outputPathAbsolute_ = pathName + "Cubemaps/" + fileName + "/";

    FileSystem* fileSystem = GetSubsystem<FileSystem>();

    if (!fileSystem->DirExists(outputPathAbsolute_))
    {
        if (!fileSystem->CreateDirs(pathName,  "Cubemaps/" + fileName + "/"))
        {
            LOGERRORF("CubemapGenerator::InitRender - Unable to create path: %s", outputPathAbsolute_.CString());
            return false;
        }
    }

    // TODO: There should be a better way of getting the resource path
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();
    Project* project = tsystem->GetProject();

    resourcePath_ = outputPathAbsolute_;
    resourcePath_.Replace(project->GetResourcePath(), "");
    resourcePath_ = AddTrailingSlash(resourcePath_);

    return true;

}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:35,代码来源:CubemapGenerator.cpp


示例9: GenerateAndroidManifest

bool AndroidProjectGenerator::GenerateAndroidManifest()
{
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String package = settings->GetPackageName();


    if (!package.Length())
    {
        errorText_ = "Invalid Package Name";
        return false;
    }

    // TODO: from settings
    String activityName = "AtomicGameEngine";
    if (!activityName.Length())
    {
        errorText_ = "Invalid Activity Name";
        return false;
    }

    String manifest  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
    manifest += "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n";
    manifest.AppendWithFormat("package=\"%s\"\n", package.CString());
    manifest += "android:versionCode=\"1\"\n";
    manifest += "android:versionName=\"1.0\">\n";

    manifest += "<uses-permission android:name=\"android.permission.INTERNET\" />\n";
    manifest += "<uses-feature android:glEsVersion=\"0x00020000\" />\n";
    manifest += "<uses-sdk android:targetSdkVersion=\"12\" android:minSdkVersion=\"10\" />\n";

    manifest += "<application android:label=\"@string/app_name\" android:icon=\"@drawable/icon\">\n";
    manifest.AppendWithFormat("<activity android:name=\".%s\"\n", activityName.CString());

    manifest += "android:label=\"@string/app_name\"\n";
    manifest += "android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"\n";
    manifest += "android:configChanges=\"keyboardHidden|orientation\"\n";
    manifest += "android:screenOrientation=\"landscape\">\n";
    manifest += "<intent-filter>\n";
    manifest += "<action android:name=\"android.intent.action.MAIN\" />\n";
    manifest += "<category android:name=\"android.intent.category.LAUNCHER\" />\n";
    manifest += "</intent-filter>\n";
    manifest += "</activity>\n";
    manifest += "</application>\n";
    manifest += "</manifest>\n";

    File file(context_, buildPath_ + "/AndroidManifest.xml", FILE_WRITE);

    if (!file.IsOpen())
        return false;

    file.Write(manifest.CString(), manifest.Length());

    return true;

}
开发者ID:raheelx,项目名称:AtomicGameEngine,代码行数:58,代码来源:AndroidProjectGenerator.cpp


示例10: PlayProject

bool EditorMode::PlayProject(String addArgs, bool debug)
{
    ToolEnvironment* env = GetSubsystem<ToolEnvironment>();
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();

    const String& editorBinary = env->GetEditorBinary();

    Project* project = tsystem->GetProject();

    if (!project)
        return false;

    Vector<String> paths;
    paths.Push(env->GetCoreDataDir());
    paths.Push(env->GetPlayerDataDir());
    paths.Push(project->GetResourcePath());

    // fixme: this is for loading from cache
    paths.Push(project->GetProjectPath());
    paths.Push(project->GetProjectPath() + "Cache");

    String resourcePaths;
    resourcePaths.Join(paths, "!");

    Vector<String> vargs;

    String args = ToString("--player --project \"%s\"", AddTrailingSlash(project->GetProjectPath()).CString());

    vargs = args.Split(' ');

    if (debug)
        vargs.Insert(0, "--debug");

    if (addArgs.Length() > 0)
        vargs.Insert(0, addArgs.Split(' '));

    String dump;
    dump.Join(vargs, " ");
    LOGINFOF("Launching Broker %s %s", editorBinary.CString(), dump.CString());

    IPC* ipc = GetSubsystem<IPC>();
    playerBroker_ = ipc->SpawnWorker(editorBinary, vargs);

    if (playerBroker_)
    {
        SubscribeToEvent(playerBroker_, E_IPCJSERROR, HANDLER(EditorMode, HandleIPCJSError));
        SubscribeToEvent(playerBroker_, E_IPCWORKEREXIT, HANDLER(EditorMode, HandleIPCWorkerExit));
        SubscribeToEvent(playerBroker_, E_IPCWORKERLOG, HANDLER(EditorMode, HandleIPCWorkerLog));
    }

    return playerBroker_.NotNull();

}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:53,代码来源:AEEditorMode.cpp


示例11: GenerateActivitySource

bool AndroidProjectGenerator::GenerateActivitySource()
{
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String packageName = settings->GetPackageName();

    if (!packageName.Length())
    {
        errorText_ = "Invalid App Package name. The general naming convention is com.company.appname";
        return false;
    }

    Vector<String> elements = settings->GetPackageName().Split('.');
    String path;
    path.Join(elements, "/");

    path = buildPath_ + "/src/" + path;

    Poco::File dirs(path.CString());
    dirs.createDirectories();

    if (!dirs.exists())
    {
        errorText_ = "Project generator unable to create dirs " + path;
        return false;
    }

    String source;
    source.AppendWithFormat("package %s;\n", packageName.CString());

    source += "import org.libsdl.app.SDLActivity;\n";

    source += "public class AtomicGameEngine extends SDLActivity {\n";

    source += "}\n";

    File file(context_, path + "/AtomicGameEngine.java", FILE_WRITE);

    if (!file.IsOpen())
    {
        errorText_ = "Project generator unable to open file " + path + "/AtomicGameEngine.java";
        return false;
    }
    file.Write(source.CString(), source.Length());

    return true;

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:50,代码来源:AndroidProjectGenerator.cpp


示例12: GenerateStringXML

bool AndroidProjectGenerator::GenerateStringXML()
{
    FileSystem* fs = GetSubsystem<FileSystem>();
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String appName = settings->GetAppName();

    if (!appName.Length())
    {
        errorText_ = "Invalid App Name, select the App Name in Build Settings.";
        return false;
    }

    String strings  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";

    strings += "<resources>\n";

    strings.AppendWithFormat("<string name=\"app_name\">%s</string>\n", appName.CString());

    strings += "</resources>\n";
    
    // Create res/values if it doesn't exist
    if (!fs->DirExists(buildPath_ + "/res/values"))
    {
        fs->CreateDirsRecursive(buildPath_ + "/res/values");
    }
    
    // Check that we successfully created it
    if (!fs->DirExists(buildPath_ + "/res/values"))
    {
        errorText_ = "Unable to create directory: " + buildPath_ + "/res/values";
        return false;
    }
    
    File file(context_, buildPath_ + "/res/values/strings.xml", FILE_WRITE);

    if (!file.IsOpen())
    {
        errorText_ = "Unable to write: " + buildPath_ + "/res/values/strings.xml";
        return false;
    }

    file.Write(strings.CString(), strings.Length());

    return true;

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:49,代码来源:AndroidProjectGenerator.cpp


示例13: Initialize

void BuildMac::Initialize()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();
    Project* project = tsystem->GetProject();

    String dataPath = tsystem->GetDataPath();
    String projectResources = project->GetResourcePath();
    String coreDataFolder = dataPath + "CoreData/";

    AddResourceDir(coreDataFolder);
    AddResourceDir(projectResources);

    BuildResourceEntries();

}
开发者ID:zhouxh1023,项目名称:AtomicGameEngine,代码行数:15,代码来源:BuildMac.cpp


示例14: CopyUserIcons

bool AndroidProjectGenerator::CopyUserIcons()
{
    FileSystem* fileSystem = GetSubsystem<FileSystem>();
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    Project* project = toolSystem->GetProject();
    AndroidBuildSettings* settings = project->GetBuildSettings()->GetAndroidBuildSettings();

    String userIconPath = settings->GetIconPath();
    if (!fileSystem->DirExists(userIconPath))               // dont do anything if there is no path defined.
        return true;
            
    String userIconDir = userIconPath + "/drawable";        // 1st target dir 
    String userIconFile = userIconDir + "/logo_large.png";  // 1st target file
    String destDir = buildPath_ + "/res/drawable";          // where it should be in the build
    if ( fileSystem->FileExists (userIconFile) )            // is there a file there?
    {
        if ( !buildBase_->BuildCopyFile ( userIconFile, destDir + "/logo_large.png" ))
            return false;
    }

    userIconDir = userIconPath + "/drawable-ldpi"; 
    userIconFile = userIconDir + "/icon.png"; 
    destDir = buildPath_ + "/res/drawable-ldpi";
    if ( fileSystem->FileExists (userIconFile) )
    {
        if ( !buildBase_->BuildCopyFile ( userIconFile, destDir + "/icon.png"))
            return false;
    } 

    userIconDir = userIconPath + "/drawable-mdpi"; 
    userIconFile = userIconDir + "/icon.png"; 
    destDir = buildPath_ + "/res/drawable-mdpi";
    {
        if ( !buildBase_->BuildCopyFile ( userIconFile, destDir + "/icon.png" ))
            return false;
    } 

    userIconDir = userIconPath + "/drawable-hdpi"; 
    userIconFile = userIconDir + "/icon.png"; 
    destDir = buildPath_ + "/res/drawable-hdpi";
    if ( fileSystem->FileExists (userIconFile) )
    {
        if ( !buildBase_->BuildCopyFile ( userIconFile, destDir + "/icon.png" ))
            return false;
    }

    return true;
}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:48,代码来源:AndroidProjectGenerator.cpp


示例15: Build

void BuildMac::Build(const String& buildPath)
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();

    buildPath_ = AddTrailingSlash(buildPath) + GetBuildSubfolder();

    Initialize();

    BuildSystem* buildSystem = GetSubsystem<BuildSystem>();

    FileSystem* fileSystem = GetSubsystem<FileSystem>();
    if (fileSystem->DirExists(buildPath_))
        fileSystem->RemoveDir(buildPath_, true);

    String dataPath = tsystem->GetDataPath();

    String appSrcPath = dataPath + "Deployment/MacOS/AtomicPlayer.app";

    fileSystem->CreateDir(buildPath_);

    buildPath_ += "/AtomicPlayer.app";

    fileSystem->CreateDir(buildPath_);

    fileSystem->CreateDir(buildPath_ + "/Contents");
    fileSystem->CreateDir(buildPath_ + "/Contents/MacOS");
    fileSystem->CreateDir(buildPath_ + "/Contents/Resources");

    String resourcePackagePath = buildPath_ + "/Contents/Resources/AtomicResources.pak";
    GenerateResourcePackage(resourcePackagePath);

    fileSystem->Copy(appSrcPath + "/Contents/Resources/Atomic.icns", buildPath_ + "/Contents/Resources/Atomic.icns");

    fileSystem->Copy(appSrcPath + "/Contents/Info.plist", buildPath_ + "/Contents/Info.plist");
    fileSystem->Copy(appSrcPath + "/Contents/MacOS/AtomicPlayer", buildPath_ + "/Contents/MacOS/AtomicPlayer");

#ifdef ATOMIC_PLATFORM_OSX
    Vector<String> args;
    args.Push("+x");
    args.Push(buildPath_ + "/Contents/MacOS/AtomicPlayer");
    fileSystem->SystemRun("chmod", args);
#endif

    buildPath_ = buildPath + "/Mac-Build";    
    buildSystem->BuildComplete(PLATFORMID_MAC, buildPath_);

}
开发者ID:zhouxh1023,项目名称:AtomicGameEngine,代码行数:47,代码来源:BuildMac.cpp


示例16: LoadUserPrefs

bool Project::LoadUserPrefs()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();

    String path = GetProjectPath() + "UserPrefs.json";

    userPrefs_->Load(path);

    // If we're in CLI mode, the Build folder is always relative to project
    if (tsystem->IsCLI())
    {
        String path = GetPath(projectFilePath_) + "Build";
        userPrefs_->SetLastBuildPath(path);
    }

    return true;
}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:17,代码来源:Project.cpp


示例17: Initialize

void BuildMac::Initialize()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();

    Project* project = tsystem->GetProject();

    Vector<String> defaultResourcePaths;
    GetDefaultResourcePaths(defaultResourcePaths);
    String projectResources = project->GetResourcePath();

    for (unsigned i = 0; i < defaultResourcePaths.Size(); i++)
    {
        AddResourceDir(defaultResourcePaths[i]);
    }

    AddResourceDir(projectResources);

    BuildResourceEntries();

}
开发者ID:RobertoMalatesta,项目名称:AtomicGameEngine,代码行数:20,代码来源:BuildMac.cpp


示例18: Run

void ImportCmd::Run()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();
    Project* project = tsystem->GetProject();
    String resourcePath = project->GetResourcePath();

    String ext = GetExtension(assetFilename_);

    if (ext == ".json")
    {
        Poco::File file(assetFilename_.CString());

        if (!file.exists())
        {
            Error(ToString("JSON source scene does not exist: %s", assetFilename_.CString()));
            return;
        }

        LOGRAWF("Importing JSON: %s", assetFilename_.CString());

        SharedPtr<JSONSceneImporter> jimporter;
        jimporter = new JSONSceneImporter(context_);
        jimporter->Import(assetFilename_);

        SharedPtr<JSONSceneProcess> sceneProcess;
        sceneProcess = new JSONSceneProcess(context_, jimporter);
        sceneProcess->Process(resourcePath);
        sceneProcess->Write();
    }
    else
    {
        SharedPtr<OpenAssetImporter> importer(new OpenAssetImporter(context_));
        if (importer->Load(assetFilename_))
        {
            importer->ExportModel("/Users/josh/Desktop/ExportedModel.mdl");
        }

    }

    Finished();
}
开发者ID:WorldofOpenDev,项目名称:AtomicGameEngine,代码行数:41,代码来源:ImportCmd.cpp


示例19: Initialize

void BuildWindows::Initialize()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();

    Project* project = tsystem->GetProject();

    Vector<String> defaultResourcePaths;
    GetDefaultResourcePaths(defaultResourcePaths);
    String projectResources = project->GetResourcePath();

    for (unsigned i = 0; i < defaultResourcePaths.Size(); i++)
    {
        AddResourceDir(defaultResourcePaths[i]);
    }

    // TODO: smart filtering of cache
    AddResourceDir(project->GetProjectPath() + "Cache/");
    AddResourceDir(projectResources);

    BuildResourceEntries();

}
开发者ID:GREYFOXRGR,项目名称:AtomicGameEngine,代码行数:22,代码来源:BuildWindows.cpp


示例20: Initialize

void BuildWindows::Initialize()
{
    ToolSystem* tsystem = GetSubsystem<ToolSystem>();
    Project* project = tsystem->GetProject();

    Vector<String> defaultResourcePaths;
    GetDefaultResourcePaths(defaultResourcePaths);

    for (unsigned i = 0; i < defaultResourcePaths.Size(); i++)
    {
        AddResourceDir(defaultResourcePaths[i]);
    }
    BuildDefaultResourceEntries();

    // Include the project resources and cache separately
    AddProjectResourceDir(project->GetResourcePath());
    AssetDatabase* db = GetSubsystem<AssetDatabase>();
    String cachePath = db->GetCachePath();
    AddProjectResourceDir(cachePath);

    BuildProjectResourceEntries();
}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:22,代码来源:BuildWindows.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ToolkitTestApplication类代码示例发布时间:2022-05-31
下一篇:
C++ ToolPtr类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap