#ifndef __SCRIPTING__PYTHON_ENGINE_H__ #define __SCRIPTING__PYTHON_ENGINE_H__ #include #include #include #include "../Engine.h" namespace py = pybind11; class PythonEngine { public: static PythonEngine& Get(); void Init(); void Shutdown(); void Exec(const std::string& code, Engine& engine); py::object Call(const std::string& module, const std::string& func, py::args args = {}); // Hot reload scripts for later void ReloadAllScripts(); private: PythonEngine() = default; ~PythonEngine() = default; py::scoped_interpreter guard_; bool initialized_ = false; }; #endif