Merge pull request #3964 from aws-lumberyard-dev/carlitosan/development
Upgrades and stability fixes for version explorer
This commit is contained in:
@@ -681,6 +681,13 @@ namespace ScriptCanvas
|
||||
outType = eventType;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find event: %s, in bus: %s, anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -693,6 +700,12 @@ namespace ScriptCanvas
|
||||
outType = EventType::Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find free method: %s anywhere in BehaviorContext"
|
||||
, methodName.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -709,15 +722,27 @@ namespace ScriptCanvas
|
||||
outType = EventType::Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find method or property: %s in class %s: , anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
AZ_Warning("Script Canvas", !m_warnOnMissingFunction, "unsupported method type in method");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find overloaded method: %s, class or event name: %s, anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace ScriptCanvas
|
||||
|
||||
AZStd::optional<size_t> ReceiveScriptEvent::GetEventIndex(AZStd::string eventName) const
|
||||
{
|
||||
return m_handler->GetFunctionIndex(eventName.c_str());;
|
||||
return m_handler ? AZStd::optional<size_t>(m_handler->GetFunctionIndex(eventName.c_str())) : AZStd::nullopt;
|
||||
}
|
||||
|
||||
AZStd::vector<SlotId> ReceiveScriptEvent::GetEventSlotIds() const
|
||||
@@ -556,29 +556,6 @@ namespace ScriptCanvas
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReceiveScriptEvent::SetupHandler()
|
||||
{
|
||||
if (!m_handler)
|
||||
{
|
||||
if (!m_asset.IsReady() && m_scriptEventAssetId.IsValid())
|
||||
{
|
||||
m_asset = AZ::Data::AssetManager::Instance().GetAsset<ScriptEvents::ScriptEventsAsset>(m_scriptEventAssetId, AZ::Data::AssetLoadBehavior::PreLoad);
|
||||
m_asset.BlockUntilLoadComplete();
|
||||
CreateHandler(m_asset);
|
||||
CreateEbus();
|
||||
}
|
||||
|
||||
if (!m_handler)
|
||||
{
|
||||
AZStd::string error = AZStd::string::format("Script Event receiver node was not initialized (%s)!", m_definition.GetName().c_str());
|
||||
SCRIPTCANVAS_REPORT_ERROR((*this), error.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReceiveScriptEvent::IsOutOfDate(const VersionData& graphVersion) const
|
||||
{
|
||||
AZ_UNUSED(graphVersion);
|
||||
|
||||
@@ -88,7 +88,6 @@ namespace ScriptCanvas
|
||||
private:
|
||||
|
||||
bool CreateEbus();
|
||||
bool SetupHandler();
|
||||
|
||||
AZ::BehaviorEBusHandler* m_handler = nullptr;
|
||||
AZ::BehaviorEBus* m_ebus = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user