浏览代码

Merge pull request #14 from EvgeniiG/master

Add a menu item to add "Additional Light Data"
/main
GitHub 8 年前
当前提交
6c2d6f21
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs

14
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


UnityEditor.AssetDatabase.CreateAsset(instance, k_HDRenderLoopPath);
}
[UnityEditor.MenuItem("HDRenderLoop/Add \"Additional Light Data\" (if not present)")]
static void AddAdditionalLightData()
{
Light[] lights = FindObjectsOfType(typeof(Light)) as Light[];
foreach (Light light in lights)
{
// Do not add a component if there already is one.
if (light.GetComponent<AdditionalLightData>() == null)
{
light.gameObject.AddComponent<AdditionalLightData>();
}
}
}
#endif
public class SkyParameters

正在加载...
取消
保存