Validator: Skipping render pipeline check on shader, fi no RenderPipeline tag is found
Validator: Skipping textures in material, if marked as PerRendererData, HideInInspector or NonModifiableTextureData Validator: Fixed issue, where arrays weren't iterated correctly, which resulted in an exception Window: Added warning and error count
This commit is contained in:
parent
9dd45f536e
commit
eb46c22ffc
7 changed files with 93 additions and 12 deletions
|
|
@ -28,16 +28,20 @@ namespace Module.ProjectValidator.Editor
|
|||
|
||||
var tagSearch = new ShaderTagId("RenderPipeline");
|
||||
var tagPipeline = new ShaderTagId(pipeline.renderPipelineShaderTag);
|
||||
var hasKeyword = false;
|
||||
|
||||
for (var i = 0; i < shader.passCount; i++)
|
||||
{
|
||||
var tagPass = shader.FindPassTagValue(i, tagSearch);
|
||||
|
||||
if (tagPass != ShaderTagId.none)
|
||||
hasKeyword = true;
|
||||
|
||||
if (tagPass == tagPipeline)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return !hasKeyword;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,10 +16,13 @@ namespace Module.ProjectValidator.Editor
|
|||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var propertyType = obj.shader.GetPropertyType(i);
|
||||
var propertyFlags = obj.shader.GetPropertyFlags(i);
|
||||
|
||||
if (propertyType != ShaderPropertyType.Texture)
|
||||
continue;
|
||||
|
||||
if ((propertyFlags & (ShaderPropertyFlags.PerRendererData | ShaderPropertyFlags.HideInInspector | ShaderPropertyFlags.NonModifiableTextureData)) != 0)
|
||||
continue;
|
||||
|
||||
var propertyName = obj.shader.GetPropertyName(i);
|
||||
var propertyValue = obj.GetTexture(propertyName);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue