Skip to content

Commit

Permalink
Make path dynamic.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPolyder committed Nov 18, 2023
1 parent 3b38442 commit 0e912d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions runtime/Scripting/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ namespace Spartan
load_assembly_and_get_function_pointer_fn function_pointer_getter = nullptr;

// Constants
string_t root_path = STR("H:\\Repos\\SpartanEngine\\binaries\\gameplay\\");
string_t app_path = root_path + STR("Scripting.SDK.dll");
string_t config_path = root_path + STR("Scripting.SDK.runtimeconfig.json");
string_t root_path;
string_t app_path;
string_t config_path;
const char_t* dotnet_type = STR("Scripting.SDK.Engine, Scripting.SDK");

// Forward declarations
Expand All @@ -104,6 +104,10 @@ namespace Spartan

void ScriptEngine::Initialize()
{
root_path = std::filesystem::current_path().wstring() + DIR_SEPARATOR + STR("gameplay");
app_path = root_path + DIR_SEPARATOR + STR("scripting.sdk.dll");
config_path = root_path + DIR_SEPARATOR + STR("scripting.sdk.runtimeconfig.json");

//
// STEP 1: Load HostFxr and get exported hosting functions
//
Expand Down

0 comments on commit 0e912d3

Please sign in to comment.