0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

概要

2D用のShaderGraphを作成して色々編集していたらタイトルのエラーが出るようになり、かなり解決に手こずりました。
どうやって解決したのかを共有したいと思います。

本文

Textureを扱ってなくてもどうやらこのエラーは出る様子でした。ShaderGraphのプロパティにTexture2Dを追加して、Referenceに'_MainTex'と入力します。(忘れずに左上のSave Assetを押して変更を保存してください)

スクリーンショット 2024-06-14 0.55.15.png

余分なプロパティが一つ増えてしまいますが、これでエラーは発生しなくなりました。

補足

ちなみに、この修正で一度エラーが出なくなった後、修正前の状態に戻してもエラーが出なくなっていました。Unityのバグでしょうか・・・?謎です

参考にした記事

もしかしたらUnityを再起動するだけでも直るかもしれないです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?