Is there a way to have a material only show in the editor and not ingame but in the editor make it have a certain transparency and texture? Maybe through a customized shader ?
It is supposed to be something like the no collision proxy material in the cryengine:
So here is the code that I eventually came up with:
@script ExecuteInEditMode()
function Start () {
if(EditorApplication.isPlaying || Application.isPlaying){
renderer.material.color.a = 0;
}
else return;
}
Just made a transparent material for the object and attached the script to it.
Preprocessor directives, or sometimes called Macros allow you the ability to separate your code depending on the platform that you’re currently using, as well as some other things: