fixed unit testing code

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-11-23 23:57:03 -08:00
committed by Chris Burel
parent 27cc659ab9
commit 8357fa34e9
10 changed files with 155 additions and 23 deletions
@@ -30,6 +30,8 @@
#include <ScriptCanvas/Utils/BehaviorContextUtils.h>
#include <Source/Components/SceneComponent.h>
#include <ScriptCanvas/Core/Core.h>
#include <AzCore/Asset/AssetManagerBus.h>
namespace ScriptCanvasBuilder
{
@@ -93,19 +95,6 @@ namespace ScriptCanvasBuilder
request.printModelToConsole = ScriptCanvas::Grammar::g_printAbstractCodeModel;
request.path = fullPath;
bool pathFound = false;
AZStd::string relativePath;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult
( pathFound
, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath
, fullPath.c_str(), relativePath);
if (!pathFound)
{
AZ::Failure(AZStd::string::format("Failed to get engine relative path from %s", fullPath.c_str()));
}
request.namespacePath = relativePath;
const ScriptCanvas::Translation::Result translationResult = TranslateToLua(request);
auto isSuccessOutcome = translationResult.IsSuccess(ScriptCanvas::Translation::TargetFlags::Lua);