Hi there,
My character looks great in game view (incorrect in scene view, but that’s ok, i can deal with it), but there will be something wrong when build as standalone exe : character’s texture seems go missing, it looks dark, i dont know what’s going on, delete everything else and left only the character, the problem still exists.
Has anyone experienced this please help, thank you.
Regards
Do you have the quality settings for the editor set the same as for the standalone? (Menu: Edit > Project Settings > Quality)
Thanks Andeeee for your reply,
The Quality Settings are all ‘Good’, actually i tried “Beautiful” and “Fantastic”, the problem still exist.
The facts i have found after many tests :
- Everything in the scene is rendered with home-made surface shader.
- if put a default cube (Menu:GameObject → Create Other → Cube), the built stand-alone exe will be good; delete the cube, the stand-alone version will again lose their texture;
Other info about the test scene :
- the scene consists of three objects : a box (as ground), a big sphere, a small sphere. all the three objects are exported from max
- all three objects uses same shader :
surf : o.Albedo = tex2D(_ColorMap, IN.uv_MainTex * _Repeat) * _Color;
lighting : half4 c; c.rgb = s.Albedo; c.a = 1; return c;
- all three objects use same 2D texture (checker)
- Unity version = 3.1.0f3 (54715), Windos XP (sp3), Video Card = Nvidia GeForce GTS 250
Any hints? Thank you.
Hi there,
Problem solved, i have figured out the reason :
Its because the internal texture’s name is NOT ‘_MainTex’, which can be seen in almost every shaders provided by unity itself.
After i changed the ‘_ColorMap’ to ‘_MainTex’, everything is ok now : Scene View, Game View, and Stand-alone Exe.
Anyway, this behavior looks strange to me : what if i want to use names other than ‘_MainTex’? Is this behavior meant to be like that?
Regards.