Merge remote-tracking branch 'origin/master' into 1.10

# Conflicts:
#	Source/Engine/Graphics/Materials/MaterialShader.h
This commit is contained in:
Wojtek Figat
2025-02-18 09:19:59 +01:00
133 changed files with 2253 additions and 654 deletions

View File

@@ -22,6 +22,13 @@ class WeakAssetReference;
template<typename T>
class SoftAssetReference;
// Clang fails to properly resolve TIsBaseOf<SceneObject, T> without SceneObject defined
#ifdef _MSC_VER
class SceneObject;
#else
#include "Engine/Level/SceneObject.h"
#endif
// @formatter:off
namespace Serialization
@@ -441,10 +448,12 @@ namespace Serialization
// Scripting Object
FLAXENGINE_API bool ShouldSerialize(const SceneObject* v, const SceneObject* other);
template<typename T>
inline typename TEnableIf<TIsBaseOf<ScriptingObject, T>::Value, bool>::Type ShouldSerialize(const T*& v, const void* otherObj)
{
return !otherObj || v != *(T**)otherObj;
return !otherObj || v != *(const T**)otherObj;
}
template<typename T>
inline typename TEnableIf<TIsBaseOf<ScriptingObject, T>::Value>::Type Serialize(ISerializable::SerializeStream& stream, const T*& v, const void* otherObj)
@@ -460,12 +469,18 @@ namespace Serialization
v = (T*)::FindObject(id, T::GetStaticClass());
}
template<typename T>
inline typename TEnableIf<TIsBaseOf<SceneObject, T>::Value, bool>::Type ShouldSerialize(const T*& v, const void* otherObj)
{
return !otherObj || ShouldSerialize((const SceneObject*)v, *(const SceneObject**)otherObj);
}
// Scripting Object Reference
template<typename T>
inline bool ShouldSerialize(const ScriptingObjectReference<T>& v, const void* otherObj)
{
return !otherObj || v.Get() != ((ScriptingObjectReference<T>*)otherObj)->Get();
return !otherObj || ShouldSerialize(v.Get(), ((ScriptingObjectReference<T>*)otherObj)->Get());
}
template<typename T>
inline void Serialize(ISerializable::SerializeStream& stream, const ScriptingObjectReference<T>& v, const void* otherObj)
@@ -486,7 +501,7 @@ namespace Serialization
template<typename T>
inline bool ShouldSerialize(const SoftObjectReference<T>& v, const void* otherObj)
{
return !otherObj || v.Get() != ((SoftObjectReference<T>*)otherObj)->Get();
return !otherObj || ShouldSerialize(v.Get(), ((SoftObjectReference<T>*)otherObj)->Get());
}
template<typename T>
inline void Serialize(ISerializable::SerializeStream& stream, const SoftObjectReference<T>& v, const void* otherObj)