I’m trying to edit my shaders in the iphone advance and it not letting me… works fine in unity pro just not in my unity iphone( always comes up grayed out)… Does anyone know ho to fix this???
I made new project and everything to test it out… Is there any help out there…
- Remove anything related to cgprogram. Shaders don’t work on the iphone
1.1. Also, RenderTextures, MovieTextures and anything related to Cubemap does not work
- Ensure to not use more than 2 textures per pass in your combiner code, because only 2 per pass are supported
if those two things are followed, it should work
So your not able to edit the shaders on the Advance iphone? – try restalling and still no results … the file i’m testing in has notting but shaders in it. – I find it hard to think you can edit them at all… Maybe a I should post a video up here or youtube showing the problem…
Shaders are just text files, editing them is no problem. It’s true that you can’t edit the built-in shaders in any version of Unity. Nothing stopping you downloading the source and editing those, however.
–Eric
in Unity Pro you can edit the shaders by clicking on the shader and then clicking on the gear or the little shader and then click the edit shader option…
– In my normal unity it works fine – I try to just open the mat off the hard drive but it looks all encoded… I’ll try to get some screen shots or something.
Here is a screen shot of what i’m talking about… I’m I missing something?

Only if the shader already exists in text form in your project. If you start an empty project with no content, you won’t be able to edit any of the built-in shaders.
You only edit materials in the inspector in Unity. Also materials aren’t shaders…shaders, as I mentioned, are text files.
–Eric
so I have mat on my harddrive and based off the image above how can you add the shader info ? Like … i’m I going about this the right way???
Shader "iPhone/ML VertexLit" {
Properties {
_Color ("Main Color", Color) = (1,1,1,0.5)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" { }
}
SubShader {
Pass {
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Lighting On
SeperateSpecular On
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * primary DOUBLE, texture * constant
}
}
}
}
Click on “create” and then “shader”. Or you can drag one into your project, since it’s a text file with a “.shader” extension.
As far as your screenshot, that’s because Unity iPhone is based on Unity 2.1. In Unity 2.5, “Edit Shader” is never grayed out, it just doesn’t do anything when you can’t edit the built-in shaders. This is a bit of a regression in usability and should probably be bug-reported…
–Eric
Thank you for your help on this matter and look forward to talking in the furture… Thanks again
As for the built in shaders: you can download all their sources from the resource section on the website. UT has packaged them up.
But various of them won’t work at all the way you know from the desktop / Unity Pro. They all use the fallback which means about 5 - 10 shaders at max of the whole set.