回答編集履歴
1
リンク切れを修正
answer
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
> 最初にShaderのpropertyにcolorと言う名前があるかどうかをC#スクリプトのif文を使ってやりたいのですが
|
2
2
|
|
3
3
|
`Material.color`でget/setするShaderのpropertyでしょうか。
|
4
|
-
[マニュアル](https://docs.unity3d.com/
|
4
|
+
[マニュアル](https://docs.unity3d.com/ScriptReference/Material-color.html)には、以下のように書かれています。
|
5
5
|
|
6
6
|
> By default, Unity considers a color with the property name name "_Color" to be the main color. Use the [MainColor] ShaderLab Properties attribute to make Unity consider a color with a different property name to be the main color.
|
7
7
|
|