浏览代码

Merge pull request #160 from Unity-Technologies/Branch_SceneSettings

Resurrected the SceneSetting component for easier simple scene setup.
/Branch_Batching2
GitHub 8 年前
当前提交
20c7bd6f
共有 2 个文件被更改,包括 59 次插入0 次删除
  1. 47
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs
  2. 12
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs.meta

47
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{
[ExecuteInEditMode]
public class SceneSettings : MonoBehaviour
{
public CommonSettings SceneCommonSettings
{
get { return m_CommonSettings; }
set { m_CommonSettings = value; ApplySettings(); }
}
public SkyParameters SceneSkyParameters
{
get { return m_SkyParameters; }
set { m_SkyParameters = value; ApplySettings(); }
}
[SerializeField]
private CommonSettings m_CommonSettings;
[SerializeField]
private SkyParameters m_SkyParameters;
// Use this for initialization
void OnEnable()
{
ApplySettings();
}
void OnValidate()
{
ApplySettings();
}
private void ApplySettings()
{
if (m_CommonSettings != null)
CommonSettingsSingleton.overrideSettings = m_CommonSettings;
if (m_SkyParameters != null)
SkyParametersSingleton.overrideSettings = m_SkyParameters;
}
}
}

12
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs.meta


fileFormatVersion: 2
guid: 0e34c98127e05d340ba44a1d4a734454
timeCreated: 1487175385
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存