From 4c8f5b998faa2fdf72e52fa434fdd4ad84bfb2ca Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Thu, 25 Feb 2021 22:20:13 +1100 Subject: Expose set_environment to GDScript --- core/core_bind.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/core_bind.cpp') diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 0da6680a7b..457a110054 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -276,6 +276,10 @@ String _OS::get_environment(const String &p_var) const { return OS::get_singleton()->get_environment(p_var); } +bool _OS::set_environment(const String &p_var, const String &p_value) const { + return OS::get_singleton()->set_environment(p_var, p_value); +} + String _OS::get_name() const { return OS::get_singleton()->get_name(); } @@ -712,6 +716,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_process_id"), &_OS::get_process_id); ClassDB::bind_method(D_METHOD("get_environment", "environment"), &_OS::get_environment); + ClassDB::bind_method(D_METHOD("set_environment", "environment", "value"), &_OS::set_environment); ClassDB::bind_method(D_METHOD("has_environment", "environment"), &_OS::has_environment); ClassDB::bind_method(D_METHOD("get_name"), &_OS::get_name); -- cgit v1.2.3