Search Unity

Check if shader variant exists? Is keyword supported?

Discussion in 'Shaders' started by chrismarch, Aug 24, 2015.

  1. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Is there a way to check at runtime if a specific shader supports a specific keyword? I'd like my script to detect the case where a new shader is added to a game, which doesn't support a required custom keyword, and then use a fallback replacement shader instead of enabling the keyword.