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

#include <script_system.h>

Classes

struct  engine_script_cache
 

Public Member Functions

 script_system (rtti::context &ctx, cmd_line::parser &parser)
 
auto init (rtti::context &ctx, const cmd_line::parser &parser) -> 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< dotnet::type > &
 
auto get_scriptable_component_base_type () const -> dotnet::type
 
auto get_engine_assembly () const -> dotnet::assembly
 
auto get_app_assembly () const -> dotnet::assembly
 
auto get_cache () const -> const engine_script_cache &
 
auto get_type_by_fullname (const std::string &fullname) const -> dotnet::type
 
auto get_type (const std::string &name_space, const std::string &name) const -> dotnet::type
 
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, const std::vector< manifold_point > &manifolds)
 
void on_sensor_exit (entt::handle sensor, entt::handle other, const std::vector< manifold_point > &manifolds)
 
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 dotnet::exception &e, const hpp::source_location &loc=hpp::source_location::current())
 
static auto find_dotnet_paths (const rtti::context &ctx) -> dotnet::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_load_component (entt::registry &r, entt::entity e)
 Called when a script component is loaded.
 
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 19 of file script_system.h.

Constructor & Destructor Documentation

◆ script_system()

unravel::script_system::script_system ( rtti::context & ctx,
cmd_line::parser & parser )

Definition at line 236 of file script_system.cpp.

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 346 of file script_system.cpp.

◆ find_dotnet_paths()

auto unravel::script_system::find_dotnet_paths ( const rtti::context & ctx) -> dotnet::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<dotnet::type>&

Definition at line 892 of file script_system.cpp.

◆ get_app_assembly()

auto unravel::script_system::get_app_assembly ( ) const -> dotnet::assembly

Definition at line 908 of file script_system.cpp.

◆ get_cache()

auto unravel::script_system::get_cache ( ) const -> const engine_script_cache&
inline

Definition at line 83 of file script_system.h.

◆ get_engine_assembly()

auto unravel::script_system::get_engine_assembly ( ) const -> dotnet::assembly

Definition at line 902 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 1099 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 1087 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 1082 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 1093 of file script_system.cpp.

◆ get_script_debug_mode()

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

Definition at line 1072 of file script_system.cpp.

◆ get_scriptable_component_base_type()

auto unravel::script_system::get_scriptable_component_base_type ( ) const -> dotnet::type

Definition at line 897 of file script_system.cpp.

◆ get_type()

auto unravel::script_system::get_type ( const std::string & name_space,
const std::string & name ) const -> dotnet::type

Definition at line 931 of file script_system.cpp.

◆ get_type_by_fullname()

auto unravel::script_system::get_type_by_fullname ( const std::string & fullname) const -> dotnet::type

Definition at line 914 of file script_system.cpp.

◆ has_compilation_errors()

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

Definition at line 1212 of file script_system.cpp.

◆ init()

auto unravel::script_system::init ( rtti::context & ctx,
const cmd_line::parser & parser ) -> bool

Definition at line 262 of file script_system.cpp.

◆ is_create_called()

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

Definition at line 945 of file script_system.cpp.

◆ is_debugger_attached()

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

Definition at line 954 of file script_system.cpp.

◆ is_update_called()

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

Definition at line 949 of file script_system.cpp.

◆ load_app_domain()

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

Definition at line 441 of file script_system.cpp.

◆ load_engine_domain()

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

Definition at line 365 of file script_system.cpp.

◆ log_exception()

void unravel::script_system::log_exception ( const dotnet::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 1150 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 1181 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 546 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 533 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 553 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 540 of file script_system.cpp.

◆ on_load_component()

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

Called when a script component is loaded.

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

Definition at line 536 of file script_system.cpp.

◆ on_play_begin() [1/3]

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

Definition at line 609 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 561 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 653 of file script_system.cpp.

◆ on_sensor_enter()

void unravel::script_system::on_sensor_enter ( entt::handle sensor,
entt::handle other,
const std::vector< manifold_point > & manifolds )

Definition at line 1105 of file script_system.cpp.

◆ on_sensor_exit()

void unravel::script_system::on_sensor_exit ( entt::handle sensor,
entt::handle other,
const std::vector< manifold_point > & manifolds )

Definition at line 1127 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 358 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 1055 of file script_system.cpp.

◆ set_script_debug_mode()

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

Definition at line 1077 of file script_system.cpp.

◆ unload_app_domain()

void unravel::script_system::unload_app_domain ( )

Definition at line 517 of file script_system.cpp.

◆ unload_engine_domain()

void unravel::script_system::unload_engine_domain ( )

Definition at line 427 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 1018 of file script_system.cpp.


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