#UnityTexture2DArray error

1 messages · Page 1 of 1 (latest)

grizzled pike
#

Hello everyone,

I'm using a custom function with a Texture2DArray as parameters, but ofc I can't and have to use UnityTexture2DArray.
But... it gives me an error : Shader error in 'Shader Graphs/SpectralColorTemplate': unknown type name 'UnityTexture2DArray' at Assets/SpectralEngine/Shaders/SpectralShaderBase.hlsl(8) (on d3d11)
It's working, because it should be working, but the error is a problem for end users, especially when you build. Can I remove it ?

Thanks a lot

ps : Unity 6.1 HDRP if it's useful

pulsar venture
#

You should be able to use Texture2DArray if you set the input of your custom function node to "Bare Texture 2D Array".

#

Else, if you want to stick to UnityTexture2DArray, maybe you need to #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" to you hlsl file.