浏览代码

update HDAdditionalReflectionData version handling

/main
RSlysz 7 年前
当前提交
dec06ee2
共有 1 个文件被更改,包括 19 次插入2 次删除
  1. 21
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs

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


using UnityEngine.Serialization;
using UnityEngine.Experimental.Rendering.HDPipeline;
using System;
public class HDAdditionalReflectionData : MonoBehaviour
public class HDAdditionalReflectionData : MonoBehaviour, ISerializationCallbackReceiver
public float version = 1.0f;
const int currentVersion = 1;
[SerializeField, FormerlySerializedAs("version")]
int m_Version;
public ShapeType influenceShape;
[FormerlySerializedAsAttribute("dimmer")]

public float sphereBlendRadiusOffset { get { return -blendDistancePositive.x; } }
public float sphereBlendNormalRadiusOffset { get { return -blendNormalDistancePositive.x; } }
public void OnBeforeSerialize()
{
}
public void OnAfterDeserialize()
{
if (m_Version != currentVersion)
{
// Add here data migration code
m_Version = currentVersion;
}
}
}
}
正在加载...
取消
保存