From f1a1cb3ec0614b6bba9a822ee936e0006564c5a6 Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 23 Dec 2021 20:12:40 +0000 Subject: [PATCH] Fix: Lua directory empty and always loading in editor (#6207) * Fix: Lua directory empty and always loading in editor Signed-off-by: T.J. McGrath-Daly * fixed naming convention errors Signed-off-by: T.J. McGrath-Daly * Tidy up Signed-off-by: T.J. McGrath-Daly Co-authored-by: Tobias Alexander Franke --- Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp index 65008f08bb..776e290042 100644 --- a/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp @@ -346,7 +346,11 @@ namespace LUAEditor { auto selectedAsset = selectedAssets.front(); const AZStd::string filePath = selectedAsset->GetFullPath(); - EBUS_EVENT(Context_DocumentManagement::Bus, OnLoadDocument, filePath, true); + auto entryType = selectedAsset->GetEntryType(); + if (entryType == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Source) + { + EBUS_EVENT(Context_DocumentManagement::Bus, OnLoadDocument, filePath, true); + } } }); }