BUG:一样的对象,都在对自己加滤镜,一个能加,一个会失败。The same object is all applying filters to themselves, one can add, and the other will fail。同じ対象は、自分にフィルターをかけている。一方は成功し、もう一方は失敗する。

最小复现:一样的对象,有一个不能成功加滤镜.zip (121.5 KB)

这个项目的内容是,里面有两个对象,它们节点和程序是一样的,都在给自己加噪声,但是第二个在游玩是并不会看见噪声。值得一提的是,虽然它们看似一样,但是创建的方式不一样,对象1是创建的角色模板,然后删除部分节点以至于与对象2一样。对象2是创建的空白模板。

The content of this project is that there are two objects in it, and their nodes are the same as the program, both of which add noise to themselves, but the second one is not visible in the game. It is worth mentioning that while they look the same, they are created in a different way, with Object 1 being the created character template and then removing some of the nodes to be the same as Object 2. Object 2 is a blank template created.

このプロジェクトの内容は、内部に二つのオブジェクトがあり、それらのノードとプログラムは同じで、自己にノイズを加えていますが、二つ目は遊ぶときにノイズを見えません。注目すべき点は、見た目は似ていますが、作成方法が異なることです。オブジェクト1はキャラクターテンプレートとして作成され、その後部分的なノードを削除してオブジェクト2と同じにしています。オブジェクト2は空のテンプレートとして作成されます。

The filter effect of AGM is applied to the root node, and any child nodes that need to respond to this effect must check “Use Parent Material.” This option is enabled by default for Sprite2D in newly created GameObjects. However, for Sprite2D added manually, this option is disabled by default.
The trade-off here is that if you want to add some material effects to Sprite2D yourself, then you can only choose one between this effect and the AGM filter effect through this option.

AGM的滤镜效果施加于根节点,任何子节点如果需要响应这个效果需要勾选“使用父级材质”。新建的GameObject自带的Sprite2D的该选项是打开的。但是自己手动添加的Sprite2D该选项是默认关闭的。
这里需要取舍的是,如果你要给Sprite2D自行添加一些材质效果,那么这个效果与AGM的滤镜效果值只能通过该选项二选一。