浏览代码

Clean SerializedHDReflectionProbe fields visibility

/main
RSlysz 6 年前
当前提交
55f42712
共有 1 个文件被更改,包括 15 次插入13 次删除
  1. 28
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs

28
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs


internal SerializedProperty renderDynamicObjects;
internal SerializedProperty customBakedTexture;
internal SerializedProperty timeSlicingMode;
internal SerializedProperty intensityMultiplier;
internal SerializedProperty legacyBlendDistance;
internal SerializedProperty boxSize;
internal SerializedProperty boxOffset;
internal SerializedProperty legacyMode;
SerializedProperty legacyBlendDistance;
SerializedProperty legacySize;
//SerializedProperty legacyOffset;
SerializedProperty legacyMode;
internal new HDAdditionalReflectionData target { get { return serializedObject.targetObject as HDAdditionalReflectionData; } }
internal ReflectionProbe targetLegacy { get { return serializedLegacyObject.targetObject as ReflectionProbe; } }

customBakedTexture = legacyProbe.FindProperty("m_CustomBakedTexture");
renderDynamicObjects = legacyProbe.FindProperty("m_RenderDynamicObjects");
timeSlicingMode = legacyProbe.FindProperty("m_TimeSlicingMode");
intensityMultiplier = legacyProbe.FindProperty("m_IntensityMultiplier");
boxSize = legacyProbe.FindProperty("m_BoxSize");
boxOffset = legacyProbe.FindProperty("m_BoxOffset");
legacySize = legacyProbe.FindProperty("m_BoxSize");
//legacyOffset = legacyProbe.FindProperty("m_BoxOffset");
resolution = legacyProbe.FindProperty("m_Resolution");
shadowDistance = legacyProbe.FindProperty("m_ShadowDistance");
cullingMask = legacyProbe.FindProperty("m_CullingMask");

internal override void Apply()
{
//sync size
//sync size with legacy reflection probe
boxSize.vector3Value = influenceVolume.boxSize.vector3Value;
legacySize.vector3Value = influenceVolume.boxSize.vector3Value;
boxSize.vector3Value = Vector3.one * influenceVolume.sphereRadius.floatValue;
legacySize.vector3Value = Vector3.one * influenceVolume.sphereRadius.floatValue;
// Sync mode
// Sync mode with legacy reflection probe
serializedObject.ApplyModifiedProperties();
base.Apply();
//serializedObject.ApplyModifiedProperties(); //done in base methode
}
}
}
正在加载...
取消
保存