Add support for masking navmesh agents in NavMeshBoundsVolume

This commit is contained in:
Wojtek Figat
2021-01-15 11:59:21 +01:00
parent 2c2c1af97f
commit 65d3883f03
3 changed files with 38 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
#include "NavMeshBoundsVolume.h"
#include "Engine/Level/Scene/Scene.h"
#include "Engine/Serialization/Serialization.h"
#if USE_EDITOR
#include "Editor/Editor.h"
#include "Editor/Managed/ManagedEditor.h"
@@ -13,6 +14,24 @@ NavMeshBoundsVolume::NavMeshBoundsVolume(const SpawnParams& params)
{
}
void NavMeshBoundsVolume::Serialize(SerializeStream& stream, const void* otherObj)
{
// Base
BoxVolume::Serialize(stream, otherObj);
SERIALIZE_GET_OTHER_OBJ(NavMeshBoundsVolume);
SERIALIZE_MEMBER(AgentsMask, AgentsMask.Mask);
}
void NavMeshBoundsVolume::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
{
// Base
BoxVolume::Deserialize(stream, modifier);
DESERIALIZE_MEMBER(AgentsMask, AgentsMask.Mask);
}
void NavMeshBoundsVolume::OnEnable()
{
// Base