Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug [Burst] Error CS1056: Unexpected Character'

Discussion in 'Burst' started by Ringo_di, May 1, 2022.

  1. Ringo_di

    Ringo_di

    Joined:
    Sep 1, 2021
    Posts:
    1
    Hi, When I trying to update my old unity project from lower version to the 2021.3.1f1,I encounter this bug. Can some one help me out ?

    I have tried delete all folder except asset, Asset and ProjectSetting and reimport, none of them can solve this.

    Library\PackageCache\com.unity.burst@1.6.5\Runtime\Intrinsics\v128.cs(1,1): error CS1056: Unexpected character '


    This is my manifest file
     
  2. jonathanpecany

    jonathanpecany

    Joined:
    May 9, 2019
    Posts:
    27
    I am having the exact same problem. However, I didn't fix mind. But if I figure out how to fix mind, I'll reply back with a solution.

    Have you fixed yours yet?
     
    gabrieljulian likes this.
  3. MiltonPulgarImova

    MiltonPulgarImova

    Joined:
    Nov 2, 2020
    Posts:
    6
    same problem
     
  4. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Did you delete the Library folder in the project for starters? Just want to rule that out.

    Otherwise I'm wondering if this is some sort of corruption with the global cache (that is shared between projects). You could look in the folder specified here https://docs.unity3d.com/Manual/upm-cache.html, and then remove any cached Burst's in packages\packages.unity.com (the Burst packages would all start with com.unity.burst).
     
  5. Strangair

    Strangair

    Joined:
    Oct 1, 2022
    Posts:
    2
    I just started a new project and I get this every time I create a new one, im new to Unity so seems like @sheredom answer makes sense, as it doesn't happen on the previous projects that I have been working on. Let see if I can get it working, I created a new post as I didnt realise this existed.
     
    juan1632 likes this.
  6. Buruchaga

    Buruchaga

    Joined:
    Mar 11, 2021
    Posts:
    7
    My problem too is similar. I was using Unity 2018.4.36 but wasn't able to use .Net 4.x or equivalent as my scripting runtime version as it was giving me compile error. My Win OS then couldn't install .Net 4.7.1 which was a requirement. So i resorted to .Net 3.5 (deprecated) and things run excellently to completion of my project.

    Due to some reasons, i have to upgrade my Unity Editor to 2022 but doesn't have the scripting runtime .Net 3.5. So i was able to upgrade my OS and install .Net framework 4.7.1 which was a requirement before i could run C Sharp scripts in unity. However, when i loaded my project i did with 2018 successfully, i run into Error CS1056: Unexpected Character' in one of my scripts. I tried removing meta files, Packages folder, Library folder, etc. but still it didn't work.

    I've made a back up of my work and I still have Unity 2018. So i opened it and was working. Then i change the Scripting runtime version to .Net 4x and Error CS1056: Unexpected Character' appeared on the same scripts.

    It's been almost 2weeks and i've not been able to move to my next step. I need help.
     
  7. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Unity 2022.3.7f1 and this still happens :mad:

    Any solution?
     
  8. MarcoPersson

    MarcoPersson

    Unity Technologies

    Joined:
    Jul 21, 2021
    Posts:
    49
    Hi, what version of Burst are you running?
    Have you tried deleting the global package cache: https://docs.unity3d.com/Manual/upm-cache.html?
    If you're still getting the error after deleting the global package cache, can you post the start of the file in the error message?
     
  9. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Yes, deleting the global cache content did fix it. It would be nice if Unity simply detected the cache problem and fixed it automatically.
     
  10. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    This is getting worse by a lot :(. I updated to the latest LTS, 2022.3.8f1, with Burst 1.8.8. I also moved the global cache to a new SSD in case there were bad sectors on the default, but it got worse. This happens randomly on various packages, not just Burst, and I have to delete the cache and library twice a week. This is really not acceptable.
     
    Last edited: Sep 6, 2023
  11. MarcoPersson

    MarcoPersson

    Unity Technologies

    Joined:
    Jul 21, 2021
    Posts:
    49
    Can you file a bug report for the package manager team?
    Hopefully they'll be able to sort it out
     
  12. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Will do... and now this:
     
  13. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Created bug report IN-54031.
     
    MarcoPersson likes this.