|
|
|
|
|
|
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|
|
|
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|
|
|
public class HDRenderPipelineAsset : RenderPipelineAsset |
|
|
|
public class HDRenderPipelineAsset : RenderPipelineAsset, ISerializationCallbackReceiver |
|
|
|
{ |
|
|
|
HDRenderPipelineAsset() |
|
|
|
{ |
|
|
|
|
|
|
return m_FrameSettings; |
|
|
|
} |
|
|
|
|
|
|
|
public void OnEnable() |
|
|
|
{ |
|
|
|
// At creation we need to copy serializedFrameSettings to m_FrameSettings
|
|
|
|
OnValidate(); |
|
|
|
} |
|
|
|
|
|
|
|
public void OnValidate() |
|
|
|
{ |
|
|
|
// Modification of defaultFrameSettings in the inspector will call OnValidate().
|
|
|
|
// We do a copy of the settings to those effectively used
|
|
|
|
serializedFrameSettings.CopyTo(m_FrameSettings); |
|
|
|
|
|
|
|
// All instance created in the editor have obsolete settings
|
|
|
|
// So we must dispose them
|
|
|
|
DestroyCreatedInstances(); |
|
|
|
} |
|
|
|
|
|
|
|
// Store the various RenderPipelineSettings for each platform (for now only one)
|
|
|
|
public RenderPipelineSettings renderPipelineSettings = new RenderPipelineSettings(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
public SubsurfaceScatteringSettings sssSettings; |
|
|
|
ISerializationCallbackReceiver m_SerializationCallbackReceiverImplementation; |
|
|
|
|
|
|
|
public override Shader GetDefaultShader() |
|
|
|
{ |
|
|
|
|
|
|
public override Material GetDefault2DMaterial() |
|
|
|
{ |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
void ISerializationCallbackReceiver.OnBeforeSerialize() |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
void ISerializationCallbackReceiver.OnAfterDeserialize() |
|
|
|
{ |
|
|
|
// Modification of defaultFrameSettings in the inspector will call OnValidate().
|
|
|
|
// We do a copy of the settings to those effectively used
|
|
|
|
serializedFrameSettings.CopyTo(m_FrameSettings); |
|
|
|
} |
|
|
|
} |
|
|
|
} |