Compilation errors with the HDRP

Edit: Even though I just installed the HDRP on the project yesterday it seems like the v5, that seems to have been just released, fixed these issues.


Hey! Thanks for making the alpha public.

I just tried it out on a copy of our project and am getting a few compilation errors with the HDRP:

Library\PackageCache\com.unity.shadergraph@4.0.1-preview\Editor\DefaultShaderIncludes.cs(24,10): error CS0619: ‘ShaderIncludePathAttribute’ is obsolete: ‘[ShaderIncludePath] attribute is no longer supported. Your shader library must be under the Assets folder or in a package. To include shader headers directly from a package, use #include “Packages//”’

Library\PackageCache\com.unity.shadergraph@4.0.1-preview\Editor\Data\MasterNodes\ISubShader.cs(10,35): error CS0246: The type or namespace name ‘RenderPipelineAsset’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.shadergraph@4.0.1-preview\Editor\Data\Nodes\IMasterNode.cs(10,35): error CS0246: The type or namespace name ‘RenderPipelineAsset’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.shadergraph@4.0.1-preview\Editor\Data\Nodes\MasterNode.cs(14,65): error CS0535: ‘MasterNode’ does not implement interface member ‘IMasterNode.IsPipelineCompatible(RenderPipelineAsset)’

Shader error in ‘SRP Default’: failed to open source file: ‘ShaderGraphLibrary/Functions.hlsl’ at /(omitted)/Library/PackageCache/com.unity.render-pipelines.high-definition@4.0.1-preview/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl(17) (on d3d11)

Compiling Vertex program with UNITY_PASS_SHADOWCASTER INSTANCING_ON
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Running this on a Win 10 machine.

Cheers!


There also seem to have been changes to the new Preferences Window API, but that’s unrelated to the HDRP.

(Currently making a SSCE)

I’m happy to hear that upgrading your SRP package(s) to 5.0.0 fixed your issues!

2 Likes

Hey, thanks for the quick reply. I just have to figure out why Rider is not picking up the solution properly, all I’m seeing is “load failed” and this in the console when I’m triggering a Build in Rider itself:

Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1004: Specify the name of the target.
Switch: /t:

For switch syntax, type “MSBuild /help”

Unity itself builds fine though. I’m not using the Incremental compiler and got a couple (10) custom packages.

Runtime Version is set to .NET 4.x, API to .NET 4.x as well.

The error seems to come from here:

Project ‘Assembly-CSharp’ load failed: The project file could not be loaded. There is no Unicode byte order mark. Cannot switch to Unicode.

Which I was able to fix by applying this trick: c# - There is no Unicode byte order mark. Cannot switch to Unicode - Stack Overflow
Is this an issue with the .csproj file generation in Unity? Because the issue comes back as soon as I do a change in the code and Unity recompiles…

Probably should pop a warning up for packages that have to be upgraded / offer to get next version (HDRP did that before once I think?)

we already have a mechanism to handle this, we probably overlooked something for HDRP

1 Like

I have same issues and same errors with HDRP on macOS with Metal and OpenGL. Version 2019.1.0a7

Have you tried upgrading the HD Render-Pipeline package to 5.0.0 to see if it fixes your issues?

I’m not sure how to do that, as in Package manager I’m able to access only 3.3.0 and as I understand this one is the latest.

@NRDPXL have you enabled the preview packages mode in the advanced menu?

3854758--326299--upload_2018-11-4_17-39-7.png

4 Likes

Yes did the job. works on 5.0.0. thank you!

2 Likes

I’m having similar issues with lwrp/postprocessing I’ve upgraded to 5.0 preview and that gives me an issue with the postprocessing package. Then if i upgrade postprocessing to 2.0.1.7 then i get issues with lwrp again.

I get a bunch of these for different texture formats before trying to update postprocessing:
Library\PackageCache\com.unity.postprocessing@2.0.16-preview\PostProcessing\Runtime\Utils\TextureFormatUtilities.cs(67,38): error CS0117: ‘TextureFormat’ does not contain a definition for ‘ASTC_RGBA_12x12’

After updating postprocessing i get:

Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(19,37): error CS0246: The type or namespace name ‘MenuCommand’ could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(18,10): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(18,10): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)

1 Like

++Thanks;

I can play in the editor but when I compile to windows I get some errors:

Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(19,37): error CS0246: The type or namespace name ‘MenuCommand’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(18,10): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.render-pipelines.lightweight@5.0.0-preview\Runtime\LWRPAdditionalLightData.cs(18,10): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)

Error building Player because scripts had compiler errors

UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:96
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

1 Like

Same here, have the same error the guy does above.

This is on a totally blank project with just LWRP 5.0

https://puu.sh/BWWet.png

1 Like

Is the project using .Net 4.x?

I’m using these
https://puu.sh/BWWg0.png
Full screenshot of most if not all settings as well in above post

Change the Compatibility Level to .Net 4.x as well and it should compile the rest of the scripts and work

Same error on compile

@Grimreaper358 my project is already set to 4.x

This might be a version problem

LWRP and HDRP 4.x.x works with 2018.3 beta and release (you can get it from the package manager or get the latest from GitHub under release/2018.3) 4.2.0

LWRP and HDRP 5.x.x works with 2019.1 alpha, anything lower won’t compile and gives errors

Check this post for more info on SRP versions and how things are right now - Current SRP and Unity Versions Clarified