bool Editor::initialize(const std::string& resourceFolder) { mResourcePath = resourceFolder; if(!FileLoader::getSingletonPtr()->load(GLOBAL_STATE_FILE, DataProxy(), mGlobalEditorState)) { if(!FileLoader::getSingletonPtr()->load(DEFAULT_STATE_FILE, DataProxy(), mGlobalEditorState)) { LOG(WARNING) << "No saved global state"; } } return true; }
bool EditorApplication::loadProject(const QString& projectFilePath) { DataProxy projectConfig; if(!mProjectManager->loadProject(projectFilePath, projectConfig)) { return false; } QFileInfo projectFileInfo(projectFilePath); QString gameConfig(projectConfig.get("configPath", "gameConfig.json").c_str()); QString resourcePath(projectFileInfo.absolutePath().append(QDir::separator()).append("resources")); mConfigOverride.put("render", mConfig.get<DataProxy>("render", DataProxy())); initEngine("renderWindow", gameConfig, resourcePath); return true; }