浏览代码

Added an exit rule for abstract classes

/main
Thomas 7 年前
当前提交
eb735a0d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/Core/Volume/Editor/VolumeEditor.cs
  2. 2
      ScriptableRenderPipeline/Core/Volume/VolumeManager.cs

2
ScriptableRenderPipeline/Core/Volume/Editor/VolumeEditor.cs


var script = (MonoScript)o;
var scriptType = script.GetClass();
if (!scriptType.IsSubclassOf(typeof(VolumeComponent)))
if (!scriptType.IsSubclassOf(typeof(VolumeComponent)) || scriptType.IsAbstract)
return false;
if (actualTarget.components.Exists(t => t.GetType() == scriptType))

2
ScriptableRenderPipeline/Core/Volume/VolumeManager.cs


.SelectMany(
a => a.GetTypes()
.Where(
t => t.IsSubclassOf(typeof(VolumeComponent))
t => t.IsSubclassOf(typeof(VolumeComponent)) && !t.IsAbstract
)
);

正在加载...
取消
保存