本文整理汇总了C++中SkUERuntime::get_editor_interface方法的典型用法代码示例。如果您正苦于以下问题:C++ SkUERuntime::get_editor_interface方法的具体用法?C++ SkUERuntime::get_editor_interface怎么用?C++ SkUERuntime::get_editor_interface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkUERuntime
的用法示例。
在下文中一共展示了SkUERuntime::get_editor_interface方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check_out_file
//---------------------------------------------------------------------------------------
//
bool FSkookumScriptRuntime::check_out_file(const FString & file_path) const
{
if (!m_runtime.get_editor_interface())
{
return false;
}
return m_runtime.get_editor_interface()->check_out_file(file_path);
}
示例2: tick_remote
//---------------------------------------------------------------------------------------
//
void FSkookumScriptRuntime::tick_remote()
{
if (!IsRunningCommandlet())
{
// Request recompilation of binaries if script files changed
if (m_freshen_binaries_requested)
{
m_remote_client.cmd_compiled_state(true);
m_freshen_binaries_requested = false;
}
// Remote communication to and from SkookumScript IDE.
// Needs to be called whether in editor or game and whether paused or not
// $Revisit - CReis This is probably a hack. The remote client update should probably
// live somewhere other than a tick method such as its own thread.
m_remote_client.process_incoming();
// Re-load compiled binaries?
if (m_remote_client.is_load_compiled_binaries_requested())
{
// Load the Skookum class hierarchy scripts in compiled binary form
#if WITH_EDITOR
bool is_first_time = !is_skookum_initialized();
#endif
bool success_b = m_runtime.load_compiled_scripts();
SK_ASSERTX(success_b, AErrMsg("Unable to load SkookumScript compiled binaries!", AErrLevel_notify));
m_remote_client.clear_load_compiled_binaries_requested();
#if WITH_EDITOR
if (is_first_time && is_skookum_initialized())
{
// When we load the binaries for the very first time, try regenerating all generated class script files again,
// as the editor might have tried to generate them before but skipped because SkookumScript was not initialized yet
m_runtime.get_editor_interface()->generate_all_class_script_files();
// Also recompile Blueprints in error state as such error state might have been due to SkookumScript not being initialized at the time of compile
m_runtime.get_editor_interface()->recompile_blueprints_with_errors();
// Set world pointer now
SkUEClassBindingHelper::set_world(m_game_world_p);
}
#endif
}
}
}
示例3: tick_remote
//---------------------------------------------------------------------------------------
//
void FSkookumScriptRuntime::tick_remote()
{
if (!IsRunningCommandlet())
{
// Request recompilation of binaries if script files changed
if (m_freshen_binaries_requested)
{
m_remote_client.cmd_compiled_state(true);
m_freshen_binaries_requested = false;
}
// Remote communication to and from SkookumScript IDE.
// Needs to be called whether in editor or game and whether paused or not
// $Revisit - CReis This is probably a hack. The remote client update should probably
// live somewhere other than a tick method such as its own thread.
m_remote_client.process_incoming();
// Re-load compiled binaries?
// If the game is currently running, delay until it's not
if (m_remote_client.is_load_compiled_binaries_requested()
&& SkookumScript::get_initialization_level() < SkookumScript::InitializationLevel_gameplay)
{
// Makes sure the SkookumScript runtime object is initialized at this point
ensure_runtime_initialized();
// Load the Skookum class hierarchy scripts in compiled binary form
bool is_first_time = !is_skookum_initialized();
bool success_b = m_runtime.load_and_bind_compiled_scripts();
SK_ASSERTX(success_b, AErrMsg("Unable to load SkookumScript compiled binaries!", AErrLevel_notify));
m_remote_client.clear_load_compiled_binaries_requested();
// After reloading, re-resolve the raw data of all dynamic classes
#if WITH_EDITORONLY_DATA
TArray<UObject*> blueprint_array;
GetObjectsOfClass(UBlueprint::StaticClass(), blueprint_array, true, RF_ClassDefaultObject);
for (UObject * obj_p : blueprint_array)
{
UBlueprint * blueprint_p = static_cast<UBlueprint *>(obj_p);
if (blueprint_p->GeneratedClass)
{
SkClass * sk_class_p = SkUEClassBindingHelper::get_sk_class_from_ue_class(blueprint_p->GeneratedClass);
if (sk_class_p)
{
SkUEClassBindingHelper::resolve_raw_data(sk_class_p, blueprint_p->GeneratedClass);
}
}
}
#endif
if (is_first_time && is_skookum_initialized())
{
#if WITH_EDITOR
// Recompile Blueprints in error state as such error state might have been due to SkookumScript not being initialized at the time of compile
if (m_runtime.get_editor_interface())
{
m_runtime.get_editor_interface()->recompile_blueprints_with_errors();
}
#endif
}
}
}
}