add compiler flag for object stream support of SC editor assets

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-08-18 10:56:02 -07:00
parent 1ad182105b
commit b813f2fbf4
13 changed files with 46 additions and 6 deletions
@@ -614,10 +614,12 @@ namespace ScriptCanvas
Node::OnDeserialize();
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void EBusEventHandler::OnWriteEnd()
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
NodeTypeIdentifier EBusEventHandler::GetOutputNodeType(const SlotId& slotId) const
{
@@ -140,7 +140,9 @@ namespace ScriptCanvas
void OnDeserialize();
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void OnWriteEnd();
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
AZStd::string GetNodeName() const override
{
@@ -771,10 +771,12 @@ namespace ScriptCanvas
Node::OnDeserialize();
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void Method::OnWriteEnd()
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
bool Method::BranchesOnResult() const
{
@@ -838,7 +840,9 @@ namespace ScriptCanvas
{
serializeContext->Class<Method, Node>()
->Version(MethodCPP::eVersion::Current, &MethodCPP::MethodVersionConverter)
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
->EventHandler<SerializeContextOnWriteEndHandler<Method>>()
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
->Field("methodType", &Method::m_methodType)
->Field("methodName", &Method::m_lookupName)
->Field("className", &Method::m_className)
@@ -109,7 +109,9 @@ namespace ScriptCanvas
void OnDeserialize();
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void OnWriteEnd();
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
virtual bool IsMethodOverloaded() const { return false; }
@@ -60,7 +60,9 @@ namespace ScriptCanvas
{
serializeContext->Class<MethodOverloaded, Method>()
->Version(MethodOverloadedCpp::Version::Current, &MethodOverloadedVersionConverter)
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
->EventHandler<SerializeContextReadWriteHandler<MethodOverloaded>>()
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
->Field("orderedInputSlotIds", &MethodOverloaded::m_orderedInputSlotIds)
->Field("outputSlotIds", &MethodOverloaded::m_outputSlotIds)
;
@@ -397,6 +399,7 @@ namespace ScriptCanvas
return signature;
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void MethodOverloaded::OnWriteBegin()
{
}
@@ -405,6 +408,7 @@ namespace ScriptCanvas
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
void MethodOverloaded::OnDeserialize()
{
@@ -33,7 +33,9 @@ namespace ScriptCanvas
, public OverloadContractInterface
{
private:
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
friend class SerializeContextReadWriteHandler<MethodOverloaded>;
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
public:
static void Reflect(AZ::ReflectContext* reflectContext);
@@ -91,12 +93,14 @@ namespace ScriptCanvas
// \todo make execution thread sensitive, which can then support generic programming
Grammar::FunctionPrototype GetInputSignature() const;
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
// SerializeContextReadWriteHandler
void OnReadBegin() {}
void OnReadEnd() {}
void OnWriteBegin();
void OnWriteEnd();
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
void OnDeserialize() override;