- Home /
Why the heck is not possible using Custom Shaders inside a Material inspector?
Was that so hard allowing to create a Material Prefab using a custom shader? Is there any way to do that or I simply limite to create a new Material using c#? how many years unity were around and such a simple feature still not available? O_O
Answer by Fixe · May 27, 2016 at 04:11 PM
The shader will just fall under one of the Material Drop down menus. Look at the top line of a shader
Shader "UI/Magic" { // this shader will be under UI dropdown menu
It was not documented anywhere. (or anywhere reachable by search engines by the way)
I don't quite understand the question, but the answer you've marked is pretty much how you define any shader.
I don't get the question either. In the top line of a shader you define the shader name. In the material inspector you can choose any shader available in the shader dropdown list. Your confusion on this topic confuses me ^^. How more straight forward should this be?
It is not stated anywere that shader name would automatically organize dropdown menu. I always created custom materials programmatically because I thought the shader was not added to drop down menu XD
Uhm:
http://docs.unity3d.com/$$anonymous$$anual/SL-Shader.html
[...]It will appear in the material inspector listed under name. [...]
It's the second sentence after the example right at the top.
Wrong section, to me that detail should have been listed also somewhere in the description of the inspector, someone who already know CG won't exactly look deeply at shaderlab syntax. XD
It's certainly not in the wrong section. You seem to mix up two fundamental problems:
Selecting which shader a material should use. This is covered in the $$anonymous$$aterial documentation
How do custom written shaders get into the shader selection list. This only applied to people who write shaders, not to those who use them. So of course that information belongs to the "writing shader section".
Your answer
![](https://koobas.hobune.stream/wayback/20220612081726im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Material doesn't have a color property '_Color' 4 Answers
How to create light like in minecraft? 1 Answer
Using Color.Lerp with Lightweight Render Pipeline 1 Answer
Point Light Behave different from editor and IOS device 0 Answers
Changing Eye Colour (Colour only non-white parts of a texture?) 2 Answers