Add serialization of game settings for proper upgrade when loading deprecated data
This commit is contained in:
@@ -235,6 +235,28 @@ void NavigationSettings::Apply()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
void NavigationSettings::Serialize(SerializeStream& stream, const void* otherObj)
|
||||
{
|
||||
SERIALIZE_GET_OTHER_OBJ(NavigationSettings);
|
||||
SERIALIZE(AutoAddMissingNavMeshes);
|
||||
SERIALIZE(AutoRemoveMissingNavMeshes);
|
||||
SERIALIZE(CellHeight);
|
||||
SERIALIZE(CellSize);
|
||||
SERIALIZE(TileSize);
|
||||
SERIALIZE(MinRegionArea);
|
||||
SERIALIZE(MergeRegionArea);
|
||||
SERIALIZE(MaxEdgeLen);
|
||||
SERIALIZE(MaxEdgeError);
|
||||
SERIALIZE(DetailSamplingDist);
|
||||
SERIALIZE(MaxDetailSamplingError);
|
||||
SERIALIZE(NavMeshes);
|
||||
SERIALIZE(NavAreas);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void NavigationSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
|
||||
{
|
||||
DESERIALIZE(AutoAddMissingNavMeshes);
|
||||
|
||||
@@ -104,5 +104,8 @@ public:
|
||||
|
||||
// [SettingsBase]
|
||||
void Apply() override;
|
||||
#if USE_EDITOR
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
#endif
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user