Search Unity

Instances of Prefabs From ScriptableObjects Have Black Material, Bad Custom Shader

Discussion in 'Editor & General Support' started by drhodor, Apr 10, 2018.

  1. drhodor

    drhodor

    Joined:
    Aug 18, 2013
    Posts:
    20
    Here's what our project looks like:

    Material > Scriptable Object > Asset Bundle
    Shader > Scriptable Object > Asset Bundle
    Prefab > Scriptable Object > Asset Bundle

    Right now all of the Instantiated (not hierarchy!) clones of our Prefab in the Scriptable Object, whether we manually assign it a material or it has a reference to the Material in the Scriptable Object, looks black.

    We can get them to show up by adding this Shader to "Always Included Shaders" and then using Shader.Find("Custom/OurCustomShader") and assigning it to the material.shader ... but should this really be necessary?

    Here are other people who have been experiencing this issue for over 5 years. Just incredulous that Unity had not fixed this yet / this is the accepted way to do this...