Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::script_system Struct Reference

#include <script_system.h>

Public Member Functions

auto init (rtti::context &ctx) -> bool
 
auto deinit (rtti::context &ctx) -> bool
 
void set_debug_config (const std::string &address, uint32_t port, uint32_t loglevel)
 
auto load_engine_domain (rtti::context &ctx, bool recompile) -> bool
 
void unload_engine_domain ()
 
auto load_app_domain (rtti::context &ctx, bool recompile) -> bool
 
void unload_app_domain ()
 
auto get_all_scriptable_components () const -> const std::vector< mono::mono_type > &
 
auto get_engine_assembly () const -> mono::mono_assembly
 
auto get_app_assembly () const -> mono::mono_assembly
 
auto is_create_called () const -> bool
 
auto is_update_called () const -> bool
 
void wait_for_jobs_to_finish (rtti::context &ctx)
 
auto has_compilation_errors () const -> bool
 
void on_sensor_enter (entt::handle sensor, entt::handle other)
 
void on_sensor_exit (entt::handle sensor, entt::handle other)
 
void on_collision_enter (entt::handle a, entt::handle b, const std::vector< manifold_point > &manifolds)
 
void on_collision_exit (entt::handle a, entt::handle b, const std::vector< manifold_point > &manifolds)
 
void on_play_begin (rtti::context &ctx)
 Called when playback begins.
 
void on_play_begin (hpp::span< const entt::handle > entities)
 
void on_play_begin (entt::registry &entities)
 

Static Public Member Functions

static void set_needs_recompile (const std::string &protocol, bool now=false)
 
static auto get_script_debug_mode () -> bool
 
static void set_script_debug_mode (bool debug)
 
static auto get_lib_name (const std::string &protocol) -> std::string
 
static auto get_lib_data_key (const std::string &protocol) -> std::string
 
static auto get_lib_temp_compiled_key (const std::string &protocol) -> std::string
 
static auto get_lib_compiled_key (const std::string &protocol) -> std::string
 
static void copy_compiled_lib (const fs::path &from, const fs::path &to)
 
static auto is_debugger_attached () -> bool
 
static void log_exception (const mono::mono_exception &e, const hpp::source_location &loc=hpp::source_location::current())
 
static auto find_mono (const rtti::context &ctx) -> mono::compiler_paths
 
static void on_create_component (entt::registry &r, entt::entity e)
 Called when a physics component is created.
 
static void on_create_active_component (entt::registry &r, entt::entity e)
 
static void on_destroy_component (entt::registry &r, entt::entity e)
 Called when a physics component is destroyed.
 
static void on_destroy_active_component (entt::registry &r, entt::entity e)
 

Detailed Description

Definition at line 20 of file script_system.h.

Member Function Documentation

◆ copy_compiled_lib()

void unravel::script_system::copy_compiled_lib ( const fs::path & from,
const fs::path & to )
static

Definition at line 122 of file script_system.cpp.

◆ deinit()

auto unravel::script_system::deinit ( rtti::context & ctx) -> bool

Definition at line 255 of file script_system.cpp.

◆ find_mono()

auto unravel::script_system::find_mono ( const rtti::context & ctx) -> mono::compiler_paths
static

Definition at line 144 of file script_system.cpp.

◆ get_all_scriptable_components()

auto unravel::script_system::get_all_scriptable_components ( ) const -> const std::vector<mono::mono_type>&

Definition at line 682 of file script_system.cpp.

◆ get_app_assembly()

auto unravel::script_system::get_app_assembly ( ) const -> mono::mono_assembly

Definition at line 693 of file script_system.cpp.

◆ get_engine_assembly()

auto unravel::script_system::get_engine_assembly ( ) const -> mono::mono_assembly

Definition at line 687 of file script_system.cpp.

◆ get_lib_compiled_key()

auto unravel::script_system::get_lib_compiled_key ( const std::string & protocol) -> std::string
static

Definition at line 854 of file script_system.cpp.

◆ get_lib_data_key()

auto unravel::script_system::get_lib_data_key ( const std::string & protocol) -> std::string
static

Definition at line 842 of file script_system.cpp.

◆ get_lib_name()

auto unravel::script_system::get_lib_name ( const std::string & protocol) -> std::string
static

Definition at line 837 of file script_system.cpp.

◆ get_lib_temp_compiled_key()

auto unravel::script_system::get_lib_temp_compiled_key ( const std::string & protocol) -> std::string
static

Definition at line 848 of file script_system.cpp.

◆ get_script_debug_mode()

auto unravel::script_system::get_script_debug_mode ( ) -> bool
static

Definition at line 827 of file script_system.cpp.

◆ has_compilation_errors()

auto unravel::script_system::has_compilation_errors ( ) const -> bool

Definition at line 967 of file script_system.cpp.

◆ init()

auto unravel::script_system::init ( rtti::context & ctx) -> bool

Definition at line 198 of file script_system.cpp.

◆ is_create_called()

auto unravel::script_system::is_create_called ( ) const -> bool

Definition at line 699 of file script_system.cpp.

◆ is_debugger_attached()

auto unravel::script_system::is_debugger_attached ( ) -> bool
static

Definition at line 708 of file script_system.cpp.

◆ is_update_called()

auto unravel::script_system::is_update_called ( ) const -> bool

Definition at line 703 of file script_system.cpp.

◆ load_app_domain()

auto unravel::script_system::load_app_domain ( rtti::context & ctx,
bool recompile ) -> bool

Definition at line 314 of file script_system.cpp.

◆ load_engine_domain()

auto unravel::script_system::load_engine_domain ( rtti::context & ctx,
bool recompile ) -> bool

Definition at line 274 of file script_system.cpp.

◆ log_exception()

void unravel::script_system::log_exception ( const mono::mono_exception & e,
const hpp::source_location & loc = hpp::source_location::current() )
static

Definition at line 109 of file script_system.cpp.

◆ on_collision_enter()

void unravel::script_system::on_collision_enter ( entt::handle a,
entt::handle b,
const std::vector< manifold_point > & manifolds )

Definition at line 905 of file script_system.cpp.

◆ on_collision_exit()

void unravel::script_system::on_collision_exit ( entt::handle a,
entt::handle b,
const std::vector< manifold_point > & manifolds )

Definition at line 936 of file script_system.cpp.

◆ on_create_active_component()

void unravel::script_system::on_create_active_component ( entt::registry & r,
entt::entity e )
static

Definition at line 387 of file script_system.cpp.

◆ on_create_component()

void unravel::script_system::on_create_component ( entt::registry & r,
entt::entity e )
static

Called when a physics component is created.

Parameters
rThe registry containing the component.
eThe entity associated with the component.

Definition at line 378 of file script_system.cpp.

◆ on_destroy_active_component()

void unravel::script_system::on_destroy_active_component ( entt::registry & r,
entt::entity e )
static

Definition at line 394 of file script_system.cpp.

◆ on_destroy_component()

void unravel::script_system::on_destroy_component ( entt::registry & r,
entt::entity e )
static

Called when a physics component is destroyed.

Parameters
rThe registry containing the component.
eThe entity associated with the component.

Definition at line 381 of file script_system.cpp.

◆ on_play_begin() [1/3]

void unravel::script_system::on_play_begin ( entt::registry & entities)

Definition at line 442 of file script_system.cpp.

◆ on_play_begin() [2/3]

void unravel::script_system::on_play_begin ( hpp::span< const entt::handle > entities)

Definition at line 402 of file script_system.cpp.

◆ on_play_begin() [3/3]

void unravel::script_system::on_play_begin ( rtti::context & ctx)

Called when playback begins.

Parameters
ctxThe context for the playback.

Definition at line 479 of file script_system.cpp.

◆ on_sensor_enter()

void unravel::script_system::on_sensor_enter ( entt::handle sensor,
entt::handle other )

Definition at line 860 of file script_system.cpp.

◆ on_sensor_exit()

void unravel::script_system::on_sensor_exit ( entt::handle sensor,
entt::handle other )

Definition at line 882 of file script_system.cpp.

◆ set_debug_config()

void unravel::script_system::set_debug_config ( const std::string & address,
uint32_t port,
uint32_t loglevel )

Definition at line 267 of file script_system.cpp.

◆ set_needs_recompile()

void unravel::script_system::set_needs_recompile ( const std::string & protocol,
bool now = false )
static

Definition at line 810 of file script_system.cpp.

◆ set_script_debug_mode()

void unravel::script_system::set_script_debug_mode ( bool debug)
static

Definition at line 832 of file script_system.cpp.

◆ unload_app_domain()

void unravel::script_system::unload_app_domain ( )

Definition at line 371 of file script_system.cpp.

◆ unload_engine_domain()

void unravel::script_system::unload_engine_domain ( )

Definition at line 307 of file script_system.cpp.

◆ wait_for_jobs_to_finish()

void unravel::script_system::wait_for_jobs_to_finish ( rtti::context & ctx)

Definition at line 772 of file script_system.cpp.


The documentation for this struct was generated from the following files: