//--------------------------------------------------------------------------------------- void FSkookumScriptRuntime::on_world_init_pre(UWorld * world_p, const UWorld::InitializationValues init_vals) { //A_DPRINT("on_world_init_pre: %S %p\n", *world_p->GetName(), world_p); // Use this callback as an opportunity to take care of connecting to the IDE #ifdef SKOOKUM_REMOTE_UNREAL if (!IsRunningCommandlet() && !m_remote_client.is_authenticated()) { m_remote_client.attempt_connect(0.0, true, true); } #endif if (world_p->IsGameWorld()) { if (!m_game_world_p) { m_game_world_p = world_p; if (is_skookum_initialized()) { SkUEClassBindingHelper::set_world(world_p); } m_game_tick_handle = world_p->OnTickDispatch().AddRaw(this, &FSkookumScriptRuntime::tick_game); } } else if (world_p->WorldType == EWorldType::Editor) { if (!m_editor_world_p) { m_editor_world_p = world_p; m_editor_tick_handle = world_p->OnTickDispatch().AddRaw(this, &FSkookumScriptRuntime::tick_editor); } } }
//--------------------------------------------------------------------------------------- void FSkookumScriptRuntime::on_world_init_pre(UWorld * world_p, const UWorld::InitializationValues init_vals) { //A_DPRINT("on_world_init_pre: %S %p\n", *world_p->GetName(), world_p); // Make sure atomics are bound by now if (m_runtime.is_compiled_scripts_loaded() && !m_runtime.is_compiled_scripts_bound()) { m_runtime.bind_compiled_scripts(); } // Use this callback as an opportunity to take care of connecting to the IDE #ifdef SKOOKUM_REMOTE_UNREAL if (!IsRunningCommandlet() && !m_remote_client.is_authenticated()) { m_remote_client.attempt_connect(0.0, true, true); } #endif if (world_p->IsGameWorld()) { // Keep track of how many game worlds we got ++m_num_game_worlds; if (!m_game_world_p) { m_game_world_p = world_p; if (is_skookum_initialized()) { SkUEClassBindingHelper::set_world(world_p); SkookumScript::initialize_gameplay(); } m_game_tick_handle = world_p->OnTickDispatch().AddRaw(this, &FSkookumScriptRuntime::tick_game); } } else if (world_p->WorldType == EWorldType::Editor) { if (!m_editor_world_p) { m_editor_world_p = world_p; m_editor_tick_handle = world_p->OnTickDispatch().AddRaw(this, &FSkookumScriptRuntime::tick_editor); } } }