Using Shader in Hololens UWP app

Hi, I am working on a Hololens UWP app for unity. It is doing volume rendering, and everything works with Unity Editor, but not when I build with Visual Studio / Hololens. I think app can’t find the custom shader, and I am wondering how to make this work. Here is how things work with editor :

Shader volumerendering = Shader.Find(“Custom/Ray Casting”);
GetComponent().material.shader = volumerendering;
Debug.Log("Shader set : " + volumerendering );

The last line prints out “Shader set : Custom/Ray Casting” with editor, but when I tried debugging with VS, it only says "Shader set : ". Does anybody know how to set this up with UWP app?

Thanks!

Do you have any material in the project referencing that shader? If not it might not get copied into your build

Could also try adding it to a ShaderVariantCollection object