Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Hazel/src/Hazel/Scripting/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace Hazel {
std::unordered_map<UUID, Ref<ScriptInstance>> EntityInstances;
std::unordered_map<UUID, ScriptFieldMap> EntityScriptFields;

Scope<filewatch::FileWatch<std::string>> AppAssemblyFileWatcher;
Scope<filewatch::FileWatch<std::filesystem::path>> AppAssemblyFileWatcher;
bool AssemblyReloadPending = false;

bool EnableDebugging = true;
Expand All @@ -142,7 +142,7 @@ namespace Hazel {

static ScriptEngineData* s_Data = nullptr;

static void OnAppAssemblyFileSystemEvent(const std::string& path, const filewatch::Event change_type)
static void OnAppAssemblyFileSystemEvent(const std::filesystem::path& path, const filewatch::Event change_type)
{
if (!s_Data->AssemblyReloadPending && change_type == filewatch::Event::modified)
{
Expand Down Expand Up @@ -252,7 +252,7 @@ namespace Hazel {

s_Data->AppAssemblyImage = mono_assembly_get_image(s_Data->AppAssembly);

s_Data->AppAssemblyFileWatcher = CreateScope<filewatch::FileWatch<std::string>>(filepath.string(), OnAppAssemblyFileSystemEvent);
s_Data->AppAssemblyFileWatcher = CreateScope<filewatch::FileWatch<std::filesystem::path>>(filepath, OnAppAssemblyFileSystemEvent);
s_Data->AssemblyReloadPending = false;
return true;
}
Expand Down