I’m writing a skybox shader that I apply to RenderSettings.skybox in a script:
private void Start() {
skyboxMaterial = new Material( Shader.Find("Marmoset/Skybox IBL") );
skyboxMaterial.name = "Internal IBL Skybox";
}
private void Update() {
...
if(showSkybox) RenderSettings.skybox = skyboxMaterial;
...
}
But when I build to a webPlayer, the material is not in the scene so the shader is not packaged in the build. Is there a way to force a resource to be included?