浏览代码

update HDAdditionalCameraData version handling

/main
RSlysz 6 年前
当前提交
42f97d2c
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 11
      com.unity.render-pipelines.high-definition/HDRP/Camera/HDAdditionalCameraData.cs

11
com.unity.render-pipelines.high-definition/HDRP/Camera/HDAdditionalCameraData.cs


public class HDAdditionalCameraData : MonoBehaviour, ISerializationCallbackReceiver
{
[HideInInspector]
public float version = 1.0f;
const int currentVersion = 1;
[SerializeField, FormerlySerializedAs("version")]
int m_Version;
// The light culling use standard projection matrices (non-oblique)
// If the user overrides the projection matrix with an oblique one

// When FrameSettings are manipulated or RenderPath change we reset them to reflect the change, discarding all the Debug Windows change.
// Tag as dirty so frameSettings are correctly initialize at next HDRenderPipeline.Render() call
m_frameSettingsIsDirty = true;
if(m_Version != currentVersion)
{
// Add here data migration code
m_Version = currentVersion;
}
}
// This is called at the creation of the HD Additional Camera Data, to convert the legacy camera settings to HD

正在加载...
取消
保存