|
|
|
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |