How to make an object to be drawn over all other objects through script in realtime?

Dear People,

The idea here is to make an user interface made of 3d objects. In this case the objects should be drawn over all other objects (of course the user should see the interface at all times). I would like to make this through scripting, because the idea is to use the same objects also in the real 3d space in some cases. If the objects are put to the scene, they should be drawn normally (not over other objects). Could you please help me with this?

Thank you for your time.

You just need to switch the shader. Everything else can stay the same, but you need to use ZTest Always in the modified version.

http://unity3d.com/support/documentation/Components/SL-CullAndDepth.html

http://forum.unity3d.com/threads/51836-ZTesting-to-get-one-object-to-always-show-on-top-of-another