예제 #1
0
 public static void ExportShader(UnityParser parser, string name, string path)
 {
     for (int i = 0; i < parser.Cabinet.Components.Count; i++)
     {
         Component asset = parser.Cabinet.Components[i];
         if (asset.classID1 == UnityClassID.Shader)
         {
             Shader sic = parser.Cabinet.LoadComponent(asset.pathID);
             if (name == "*" || sic.m_Name == name)
             {
                 sic.Export(path);
             }
         }
     }
 }
예제 #2
0
        public void ExportShader(Component asset, string path)
        {
            Shader shader = LoadWhenNeeded(asset);

            shader.Export(path);
        }