remove false error from deserializing BC nodes

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
monroegm-disable-blank-issue-2
chcurran 4 years ago
parent d17ac748ac
commit e3d007319d

@ -610,7 +610,7 @@ namespace ScriptCanvas
void EBusEventHandler::OnDeserialize() void EBusEventHandler::OnDeserialize()
{ {
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex); AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex);
if (!m_ebus) if (!m_ebus && !m_ebusName.empty())
{ {
CreateHandler(m_ebusName); CreateHandler(m_ebusName);
} }

@ -769,27 +769,30 @@ namespace ScriptCanvas
{ {
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex); AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex);
m_warnOnMissingFunction = true; if (!m_lookupName.empty() || !m_className.empty())
const AZ::BehaviorClass* bcClass{};
const AZ::BehaviorMethod* method{};
EventType eventType;
if (GetBehaviorContextClassMethod(m_lookupName, bcClass, method, eventType))
{ {
m_eventType = eventType; m_warnOnMissingFunction = true;
ConfigureMethod(*method, bcClass); const AZ::BehaviorClass* bcClass{};
} const AZ::BehaviorMethod* method{};
else EventType eventType;
{
if (!m_method) if (GetBehaviorContextClassMethod(m_lookupName, bcClass, method, eventType))
{ {
AZ_Warning("ScriptCanvas", !m_warnOnMissingFunction, "method node failed to deserialize properly"); m_eventType = eventType;
ConfigureMethod(*method, bcClass);
}
else
{
if (!m_method)
{
AZ_Warning("ScriptCanvas", !m_warnOnMissingFunction, "method node failed to deserialize properly");
}
} }
}
if (m_resultSlotIDs.empty()) if (m_resultSlotIDs.empty())
{ {
m_resultSlotIDs.emplace_back(SlotId{}); m_resultSlotIDs.emplace_back(SlotId{});
}
} }
Node::OnDeserialize(); Node::OnDeserialize();
@ -798,6 +801,11 @@ namespace ScriptCanvas
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)//// #if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void Method::OnWriteEnd() void Method::OnWriteEnd()
{ {
if (m_lookupName.empty() && m_className.empty())
{
return;
}
OnDeserialize(); OnDeserialize();
} }
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED) #endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)

Loading…
Cancel
Save