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 Error after adding in Unity Netcode package to Unity 2022.3 LTS

Discussion in 'NetCode for ECS' started by Pilltech101, May 31, 2023.

  1. Pilltech101

    Pilltech101

    Joined:
    Jul 25, 2014
    Posts:
    35
    I got this error both when upgrading my project to 2022.3 LTS and the same after starting a bran new project. As Soon as I import the Netcode Package the project errors out:

    Error :

    Library\PackageCache\com.unity.logging@1.0.10\Runtime\Sinks\UnityEditorConsoleSink.cs(9,30): error CS0234: The type or namespace name 'UTF8StringView' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    I know it has something to do with the logging package but I am not sure on how to fix this.
     
  2. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    774
    yes, is a known issue. please don't update yet to 2022.3.
    A fix is coming out soon to address that issue.

    In case you want to, please internalise the logging package and change the logging.asmdef and logging.tests.asmdef as follow:

    Code (csharp):
    1.  
    2.         {
    3.              "name": "Unity",
    4.             "expression": "2022.3.0a1", <---- previous value
    5.              "expression": "2023.1.0a1", <--- new value
    6.              "define": "UNITY_HAS_UTF8_VIEW"
    7.          }
    8.  
     
    Pilltech101 and Rukhanka like this.
  3. Pilltech101

    Pilltech101

    Joined:
    Jul 25, 2014
    Posts:
    35
    Thank you !!!! I thought I was going crazy
     
  4. Ravoltz

    Ravoltz

    Joined:
    Apr 6, 2022
    Posts:
    1
    Ran into this as well. In the meantime you can apply the following workaround:
    1. Close Unity
    2. Copy the folder <ProjectDir>\Library\PackageCache\com.unity.logging@1.0.10 to <ProjectDir>\Packages\com.unity.logging
    3. Edit <ProjectDir>\Packages\com.unity.logging\Runtime\Unity.Logging.asmdef and on line 23 change "2022.3.0a1" to "2023.2.0a1"
    4. Reopen your Unity project
    Edit: 1 min too late
     
    Pilltech101 likes this.
  5. Pilltech101

    Pilltech101

    Joined:
    Jul 25, 2014
    Posts:
    35
    lol thanks tho
     
  6. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    774
    A new logging package has been released yesterday that should work without modification.

    However, it is necessary to update the dependency via PackageManager and/or modifying your project Packages/Manifest.

    Please update the com.unity,logging package to 1.0.11. A new release of Netcode will be available soon that will have the right dependency setup without need to update that,

    Sorry for the inconvenient issue.
     
  7. khowell1

    khowell1

    Joined:
    Jan 27, 2020
    Posts:
    1
    Thanks. This worked for my project with the same OP issue.
     
    Stolzenberg likes this.
  8. spilat12

    spilat12

    Joined:
    Feb 10, 2015
    Posts:
    33
    Updating 'netcode for entities' package to the latest version solved this for me....