浏览代码

fix HDAdditionnalReflectionData migration

/main
RSlysz 6 年前
当前提交
c545b24c
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 9
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs

9
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs


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

正在加载...
取消
保存