Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Naming conflict with URP [Optional] attribute

Discussion in 'Package Manager' started by viktorkadza, Dec 21, 2020.

  1. viktorkadza

    viktorkadza

    Joined:
    Sep 4, 2018
    Posts:
    46
    Hi , just tried to install a c# Optional.dll libary and got naming conflict with URP [Optional] attribute.
    Error i got:
    Library\PackageCache\com.unity.render-pipelines.universal@7.3.1\Editor\ShaderGraph\UniversalShaderGraphResources.cs(31,37): error CS0616: 'Optional' is not an attribute class

    Cannot rename , or put to other namespace because its a dll.
    Any solution ides ?
     
  2. Davidtr_Unity

    Davidtr_Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    34
    Hi,

    You could try unchecking the Auto Reference setting in the plugin inspector to restrain the scope of this DLL to a specific assembly definition file. This would allow you to solve the conflict in the URP package by limiting what scripts can access the DLL.