動的にロードしたマスクやノイズ用テクスチャをVFX Graphへ安全に転送してサンプリングさせる手順です。

\n\n

具体的な解決方法

\n

1. Blackboard の変数の型の整合

\n

VFX Graph側の変数が「Texture2D」になっていることを確認します。

\n

2. C#でのテクスチャバインドコードの最適化

\n
private static readonly int NoiseTexId = Shader.PropertyToID("MyNoiseTex");\nvfx.SetTexture(NoiseTexId, targetTexture);