Class DistanceFieldValidations

Namespace
Kroltan.Keen.Editor.Validations
Assembly
me.kroltan.keen-vectors.Editor.dll

Contains common validations for components implementing the conventions.

public static class DistanceFieldValidations
Inheritance
DistanceFieldValidations
Inherited Members

Methods

MaterialReadsPixelRangeFrom(Func<GameObject, Material>, bool, bool)

Reports if the material expects its pixel range from a source that is not allowed.

public static IValidation MaterialReadsPixelRangeFrom(Func<GameObject, Material> getMaterial, bool allowPerVertex = false, bool allowProperty = false)

Parameters

getMaterial Func<GameObject, Material>

Selects the material from the game object of the components this validation is operating on.

allowPerVertex bool

Whether materials that expect the pixel range in vertex channels are allowed.

allowProperty bool

Whether materials that expect the pixel range in a material property are allowed.

Returns

IValidation

MaterialsUseCompatibleShader(Func<GameObject, Material>, string)

Reports if the material used does not follow the conventions used by the driver components.

public static IValidation MaterialsUseCompatibleShader(Func<GameObject, Material> getMaterial, string fieldPropertyName)

Parameters

getMaterial Func<GameObject, Material>

Selects the material from the game object of the components this validation is operating on.

fieldPropertyName string

The name of the material property of the distance field texture.

Returns

IValidation

RequireCanvasChannelsFromMaterialUvSource(Func<GameObject, Material>)

Reports if the material expects an UV channel that is not enabled on the canvas it is being used.

public static IValidation RequireCanvasChannelsFromMaterialUvSource(Func<GameObject, Material> getMaterial)

Parameters

getMaterial Func<GameObject, Material>

Selects the material from the game object of the components this validation is operating on.

Returns

IValidation

ShaderGraphNotSupportedInOverlayCanvas(Func<GameObject, Material>)

Reports if the material in use is a shader graph attached to a Canvas that is set to Overlay.

public static IValidation ShaderGraphNotSupportedInOverlayCanvas(Func<GameObject, Material> getMaterial)

Parameters

getMaterial Func<GameObject, Material>

Selects the material from the game object of the components this validation is operating on.

Returns

IValidation
See Also

SpriteIsDistanceField(Func<Object, Sprite>)

Reports if the given sprite does not have distance field metadata in it.

public static IValidation SpriteIsDistanceField(Func<Object, Sprite> getSprite)

Parameters

getSprite Func<Object, Sprite>

Selects the material from the object this validation is operating on.

Returns

IValidation