|
|
|
|
|
|
Current = Max - 1 |
|
|
|
} |
|
|
|
|
|
|
|
const int currentVersion = (int)Version.Current; |
|
|
|
[SerializeField, FormerlySerializedAs("version")] |
|
|
|
int m_Version; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void OnAfterDeserialize() |
|
|
|
{ |
|
|
|
if (m_Version != currentVersion) |
|
|
|
if (m_Version != (int)Version.Current) |
|
|
|
{ |
|
|
|
// Add here data migration code that use other component
|
|
|
|
// Note impossible to access other component at deserialization time
|
|
|
|
|
|
|
needMigrateToUseInfluenceVolume = true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_Version = currentVersion; |
|
|
|
m_Version = (int)Version.Current; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
influenceVolume.boxSideFadePositive = boxSideFadePositive; |
|
|
|
influenceVolume.boxSideFadeNegative = boxSideFadeNegative; |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
m_Version = (int)Version.HDProbeChild; |
|
|
|
m_Version = (int)Version.UseInfluenceVolume; |
|
|
|
needMigrateToUseInfluenceVolume = false; |
|
|
|
OnAfterDeserialize(); //continue migrating if needed
|
|
|
|
|
|
|
|