Fix shader compilation tracking to check for directory existence
This commit is contained in:
@@ -301,7 +301,7 @@ void ShadersCompilation::RegisterForShaderReloads(Asset* asset, const String& in
|
|||||||
{
|
{
|
||||||
// Create a directory watcher to track the included file changes
|
// Create a directory watcher to track the included file changes
|
||||||
const String directory = StringUtils::GetDirectoryName(includedPath);
|
const String directory = StringUtils::GetDirectoryName(includedPath);
|
||||||
if (!ShaderIncludesWatcher.ContainsKey(directory))
|
if (FileSystem::DirectoryExists(directory) && !ShaderIncludesWatcher.ContainsKey(directory))
|
||||||
{
|
{
|
||||||
auto watcher = New<FileSystemWatcher>(directory, false);
|
auto watcher = New<FileSystemWatcher>(directory, false);
|
||||||
watcher->OnEvent.Bind<OnShaderIncludesWatcherEvent>();
|
watcher->OnEvent.Bind<OnShaderIncludesWatcherEvent>();
|
||||||
|
|||||||
Reference in New Issue
Block a user