您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

57 行
1.6 KiB

using UnityEngine;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{
[ExecuteInEditMode]
public class SceneSettings : MonoBehaviour
{
public CommonSettings commonSettings
{
set { m_CommonSettings = value; }
get { return m_CommonSettings; }
}
public SkySettings skySettings
{
set { m_SkySettings = value; }
get { return m_SkySettings; }
}
public ScreenSpaceAmbientOcclusionSettings ssaoSettings
{
set { m_SsaoSettings = value; }
get { return m_SsaoSettings; }
}
[SerializeField] private CommonSettings m_CommonSettings = null;
[SerializeField] private SkySettings m_SkySettings = null;
[SerializeField] private ScreenSpaceAmbientOcclusionSettings m_SsaoSettings = null;
// Use this for initialization
void OnEnable()
{
SceneSettingsManager.instance.AddSceneSettings(this);
HDRenderPipeline hdPipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline;
if (hdPipeline != null)
{
hdPipeline.OnSceneLoad();
}
}
void OnDisable()
{
SceneSettingsManager.instance.RemoveSceneSettings(this);
}
void OnValidate()
{
// If the setting is already the one currently used we need to tell the manager to reapply it.
if (SceneSettingsManager.instance.GetCurrentSceneSetting())
{
SceneSettingsManager.instance.UpdateCurrentSceneSetting();
}
}
}
}