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

Bug Unity 2022.3.8f1 LTS fresh 2D Core Template project has error with 2D Animation 9.0.3 Package

Discussion in 'Editor & General Support' started by FileThirteen, Aug 27, 2023.

  1. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    When I create a new 2D project in Unity 2022 LTS I get this error:
    Library\PackageCache\com.unity.2d.animation@9.0.3\Editor\LayoutOverlay\LayoutOverlay.cs(80,31): error CS0311: The type 'UnityEngine.UIElements.DropdownMenu' cannot be used as type parameter 'T' in the generic type or method 'UQueryExtensions.Q<T>(VisualElement, string, params string[])'. There is no implicit reference conversion from 'UnityEngine.UIElements.DropdownMenu' to 'UnityEngine.UIElements.VisualElement'.

    After googling around a bit I couldn't really find a way to resolve it. I found another thread talking about how DropdownMenus don't derive from VisualElements, but I haven't done anything in this project yet. I tried a previous version of 2022 as well but I've already uninstalled that version and deleted the project so I'm not sure exactly what version it was.

    I haven't found anyone with exactly the same issue from googling and searching the forums. Anyone know how to resolve this issue?
     
  2. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    I have found that I can change the 2D Animation package to version 9.0.2 and it works. Annoyingly I couldn't modify the version in the manifest.json without uninstalling the 2D Feature and then installing the 2D packages manually, then modify the version via manifest.json. So I think there's an issue with the version 9.0.3 2D Animation package and Unity 2022's built in UIElements stuff.
     
  3. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    Updating to say it's still happening in 2022.3.10f1