浏览代码

Merge pull request #706 from Unity-Technologies/volume-plusplus

Small volume framework tweaks & fixes
/feature-ReflectionProbeFit
GitHub 7 年前
当前提交
5bb07137
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 8
      ScriptableRenderPipeline/Core/Volume/VolumeComponent.cs
  2. 16
      ScriptableRenderPipeline/Core/Volume/VolumeParameter.cs

8
ScriptableRenderPipeline/Core/Volume/VolumeComponent.cs


.Select(t => (VolumeParameter)t.GetValue(this))
.ToList()
.AsReadOnly();
foreach (var parameter in parameters)
parameter.OnEnable();
if (parameters == null)
return;
foreach (var parameter in parameters)
parameter.OnDisable();
}
public void SetAllOverridesTo(bool state)

16
ScriptableRenderPipeline/Core/Volume/VolumeParameter.cs


internal abstract void SetValue(VolumeParameter parameter);
// This is used in case you need to access fields/properties that can't be accessed in the
// constructor of a ScriptableObject (VolumeParameter are generally declared and inited in
// a VolumeComponent which is a ScriptableObject). This will be called right after the
// VolumeComponent object has been constructed, thus allowing access to previously
// "forbidden" fields/properties.
protected internal virtual void OnEnable()
{
}
// Called when the parent VolumeComponent OnDisabled is called
protected internal virtual void OnDisable()
{
}
public static bool IsObjectParameter(Type type)
{
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ObjectParameter<>))

{
this.hdr = hdr;
this.showAlpha = showAlpha;
this.showEyeDropper = showEyeDropper;
this.overrideState = overrideState;
}

{
this.hdr = hdr;
this.showAlpha = showAlpha;
this.showEyeDropper = showEyeDropper;
this.overrideState = overrideState;
}
}

正在加载...
取消
保存