Jump to content

What is this error about and how to fix


MixThaicred

Recommended Posts

Assets\Procedural Worlds\Gaia\Scripts\API\GaiaAPI.cs(2124,40): error CS0104: 'ColorAdjustments' is an ambiguous reference between 'UnityEngine.Rendering.HighDefinition.ColorAdjustments' and 'UnityEngine.Rendering.Universal.ColorAdjustments'
 

Link to comment
Share on other sites

Hi @MixThaicred, it looks like you have both HDRP and URP running in the same project which causes this issue. The lines of code that throw that error are referring to the class "ColorAdjustments" which exists both in HDRP and URP if both are installed in the project. We did not discover this issue yet as this is not something we usually test against.
You can fix this by either uninstalling one of the render pipelines if you do not need that pipeline anymore. If you want to run both pipelines in the same project, you would need to type out the full qualified name of the class in code depending on which pipeline you are currently targeting with Gaia.
If you are targeting HDRP, you would need to double click on these errors which will open up the code editor at the offending line, and then replace "ColorAdjustments" with "
UnityEngine.Rendering.HighDefinition.ColorAdjustments" and save the file. If you targeting URP, the replacement would be "UnityEngine.Rendering.Universal.ColorAdjustments" instead.
After saving the file and returning to the Editor the code should recompile and the error should be gone.

Link to comment
Share on other sites

21 hours ago, Peter said:

Hi @MixThaicred, it looks like you have both HDRP and URP running in the same project which causes this issue. The lines of code that throw that error are referring to the class "ColorAdjustments" which exists both in HDRP and URP if both are installed in the project. We did not discover this issue yet as this is not something we usually test against.
You can fix this by either uninstalling one of the render pipelines if you do not need that pipeline anymore. If you want to run both pipelines in the same project, you would need to type out the full qualified name of the class in code depending on which pipeline you are currently targeting with Gaia.
If you are targeting HDRP, you would need to double click on these errors which will open up the code editor at the offending line, and then replace "ColorAdjustments" with "
UnityEngine.Rendering.HighDefinition.ColorAdjustments" and save the file. If you targeting URP, the replacement would be "UnityEngine.Rendering.Universal.ColorAdjustments" instead.
After saving the file and returning to the Editor the code should recompile and the error should be gone.

So I uninstalled URP, deleted GAIA completely out of the project, re-installed and I am still getting the errors. In fact I am getting around 16, is like even though URP Is nowhere in my project GAIA keeps looking for URP Render pipeline. Unsure why if its a fresh install

Link to comment
Share on other sites

I had to delete some things and change others in the code, but I am still getting one final error

Assets\Procedural Worlds\Gaia\Scripts\API\GaiaAPI.cs(3562,1): error CS1022: Type or namespace definition, or end-of-file expected
 

Link to comment
Share on other sites

On 1/28/2023 at 10:15 PM, MixThaicred said:

So I uninstalled URP, deleted GAIA completely out of the project, re-installed and I am still getting the errors. In fact I am getting around 16, is like even though URP Is nowhere in my project GAIA keeps looking for URP Render pipeline. Unsure why if its a fresh install

Could you please check under Edit > Project Settings > Player what scripting defines are set there?
image.png

For the render pipeline configuration, Gaia uses two scripting defines "HDPipeline" and "UPPipeline". The issue sounds like the "UPPipeline" scripting define might still be active in the project. If it is, and you are not intending to use URP, you would need to remove that define or configure Gaia to use a different pipeline from the setup tab.
 

On 1/28/2023 at 10:38 PM, MixThaicred said:

I had to delete some things and change others in the code, but I am still getting one final error

Assets\Procedural Worlds\Gaia\Scripts\API\GaiaAPI.cs(3562,1): error CS1022: Type or namespace definition, or end-of-file expected


Difficult to say without seeing the file in front of me, but the error sounds like there is a closing bracket "}" missing at the end of the file

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...