public void Export(TextWriter writer, Shader shader, Func <ShaderGpuProgramType, ShaderTextExporter> exporterInstantiator) { writer.Write("Shader \"{0}\" {{\n", Name); PropInfo.Export(writer); foreach (SerializedSubShader subShader in SubShaders) { subShader.Export(writer, shader, exporterInstantiator); } if (FallbackName != string.Empty) { writer.WriteIntent(1); writer.Write("Fallback \"{0}\"\n", FallbackName); } if (CustomEditorName != string.Empty) { writer.WriteIntent(1); writer.Write("CustomEditor \"{0}\"\n", CustomEditorName); } writer.Write('}'); }
public void Export(ShaderWriter writer) { writer.Write("Shader \"{0}\" {{\n", Name); PropInfo.Export(writer); for (int i = 0; i < SubShaders.Length; i++) { SubShaders[i].Export(writer); } if (FallbackName.Length != 0) { writer.WriteIndent(1); writer.Write("Fallback \"{0}\"\n", FallbackName); } if (CustomEditorName.Length != 0) { writer.WriteIndent(1); writer.Write("CustomEditor \"{0}\"\n", CustomEditorName); } writer.Write('}'); }
public void Export(ShaderWriter writer) { writer.Write("Shader \"{0}\" {{\n", Name); PropInfo.Export(writer); foreach (SerializedSubShader subShader in SubShaders) { subShader.Export(writer); } if (FallbackName != string.Empty) { writer.WriteIntent(1); writer.Write("Fallback \"{0}\"\n", FallbackName); } if (CustomEditorName != string.Empty) { writer.WriteIntent(1); writer.Write("CustomEditor \"{0}\"\n", CustomEditorName); } writer.Write('}'); }
public void Export(ShaderWriter writer) { writer.Write("Shader \"{0}\" {{\n", Name); PropInfo.Export(writer); for (int i = 0; i < SubShaders.Length; i++) { ref SerializedSubShader subShader = ref SubShaders[i]; subShader.Export(writer); }