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 <tj.mcgrath.daly@huawei.com>

* fixed naming convention errors

Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>

* Tidy up

Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>

Co-authored-by: Tobias Alexander Franke <tobias.alexander.franke@huawei.com>
This commit is contained in:
tjmgd
2021-12-23 20:12:40 +00:00
committed by GitHub
parent c2373f1f59
commit f1a1cb3ec0
@@ -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);
}
}
});
}