Search Unity

Disable burst

Discussion in 'Burst' started by JooleanLogic, Jan 11, 2019.

  1. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    I get the following error in the console occasionally.
    I can't access the jobs menu cos I'm on linux (known bug).
    Is there some other way I can disable the burst compiler via config file or scripting define symbol?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    I know there is, but I never really had to play with file directly.
    Someone will be better to answer that.
    However, what I would suggest, just create new project, and copy assets folder only to it.
    That would be the cleanest and safest way of doing things.
     
  3. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Thanks for reply Antypodish but I don't understand what you mean about copying the assets folder to a new project? Do you mean without burst installed somehow?
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    I don't really get what he's saying either.

    If you can't access menu you'll probably either need to look at source to see what toggling the menu buttons does and replicate the behaviour another way or just remove the burst tag using search/replace [BurstCompile] with //[BurstCompile] throughout the entire project.
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    I mean, if something is broken in a project files, from what I understand, I would recreate new project, and install relevant packages again, hoping for fix. Then I can physically copy, or import asset folder. If that makes sense.

    Commenting out as per @tertle may be option, assuming this is reason for an issue.
     
  6. Deleted User

    Deleted User

    Guest

    Try to put [BurstDiscard]
     
  7. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Ah ok, thanks Antypodish.
    I'm trying to find out what's causing the exception though than avoid it.

    Thanks Wobes, I've already commented out my own burst jobs (only had two) so I think the exception is occurring within Unity's own burst jobs somewhere but perhaps related to me not cleaning something up.

    Thanks Tertle, that was a great idea. Didn't even occur to me.
    EditorPrefs.SetBool("BurstCompilation", false);
    The errors are random so will have to wait for it to pop up now.
     
    starikcetin and Deleted User like this.
  8. Deleted User

    Deleted User

    Guest

    Can I see the code of the jobs?
     
  9. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    That's brilliant.
     
  10. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    There's nothing out of the ordinary with the jobs worth printing. Just simple
    IJobProcessComponentData ones. E.g.
    Code (CSharp):
    1. [BurstCompile]
    2. struct Job : IJobProcessComponentData<Engine, RigidBody2D>
    3. {
    4.     public void Execute([ReadOnly] ref Engine engine, ref RigidBody2D rigidBody)
    5.     {
    6.         float2 force = engine.fwdVector * engine.thrust();
    7.         RigidBody2D.AddRelativeForce(ref rigidBody, ref force);
    8.     }
    9. }
    It's possible there's something wrong with my code somewhere, maybe the hybrid side of things, but I'm fairly certain it's just more linux gui errors as I get lots of those. This ones just hidden behind the burst compiler so I can't see it.
    I've disabled burst though so I'll find out soon enough.
     
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    I wonder, does burst comply with RigidBodies? Or Game Objects?
     
  12. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    It's RigidBody2D, not Rigidbody2D. ;)
     
  13. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Sorry, but I don't get it?
     
  14. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Sorry Antypodish, my post was too subtle. :)
    I have my own RigidBody2D IComponentData with a captial B for Body which is different to Unity's Rigidbody2D MonoBehaviour which has a lowercase b for body.
     
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Deleted User likes this.
  16. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    "EditorPrefs.SetBool("BurstCompilation", false);"
    This allows me to build via my build system, but why does it work?
     
  17. frozepk

    frozepk

    Joined:
    Mar 29, 2020
    Posts:
    4
    Because then it build your project without compilation,
    in the editor go to project settings->burst aot settings->burst compilation, you can manually disable burst compilation and build your project.

    I had the same problem when i ported my android project to ios,but i can't seem to work with burst compilation enabled ,any help would be appreciated. DelieveryRobo - SampleScene - WebGL - Unity 2021.3.16f1 Personal _DX11_ 18-12-2022 20_40_50.png y help ?
     
    UniqueCode likes this.
  18. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @frozepk what errors do you get when Burst compilation is enabled?
     
  19. frozepk

    frozepk

    Joined:
    Mar 29, 2020
    Posts:
    4
    burst compiler failed runnig.
    but i fixed it,it was my own fault when importing an external sdk.
     
  20. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    302
    Ahh just dropped by, now seeing issues with LTS,

    Trying to look into why with Burst a project build takes 20minuttes, where most of that time is AOT stubs..
    Disable burst and a full build is <10 minuttes. Not happy with the increased build time.
     
  21. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @Vaupell in Burst 1.8, player builds are incremental. So the second and subsequent build (for a given target platform) should be noticeably quicker than the first build. But of course, it's always going to take longer to do Burst compilation than not do Burst compilation. Whether the extra build time is worth the tradeoff for the increased performance you get, is something you need to determine for your project.