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

Official Burst for standalone players

Discussion in 'Burst' started by xoofx, Jul 10, 2018.

  1. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    132
    Sure..appreciate the prompt response: 1253013

    I am really stumped about this bug—appears so basic. I am puzzled it did not reveal itself so far. Played around with floating point mode and precision: no change. You should see this in the console when you hit play:
    Code (CSharp):
    1. test1: -2688015360
    2. test2: -2692785664
    3. test3: 256
    4. area: 128
    5. area2: 128
    6. And now the result without BURST...
    7. test1: -2688015391.69981
    8. test2: -2692785830.24725
    9. test3: 10.5353393554688
    10. area: 5.26766967773438
    11. area2: 5.26766967773438
     
    Last edited: Jun 4, 2020
    deus0 likes this.
  2. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    Hello,

    So I am doing a bunch of raycasts with RaycastCommand, and then I process them on a Job.

    The problem is that I can't enable burst on that job because the results are of type RaycastHit and unfortunately the only way to know if that hit was successful is to check if the .collider is null

    When i try to check if the collider is null burst complains with this:
    Burst error BC1016: The managed function `UnityEngine.RaycastHit.get_collider(UnityEngine.RaycastHit* this)` is not supported

    Same story if i try to access hitInfo.textureCoord.

    Is there any work-around?, I don't care about the collider at all, I just need to know if the raycast was a hit or not.

    UPDATE: Actually it seems to be a problem with Jobs in general, not just Burst :( without burst the error still happens but is:

    UnityException: FindObjectFromInstanceID can only be called from the main thread.
     
    Last edited: Jun 8, 2020
  3. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    I believe that you can check if the normal != Vector3.zero, as it should be left uninitialized if there was no hit (and I don't think that a normal can be Vector3.zero when there is a valid hit).
     
  4. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    Good tip!, but the problem remains since i also need to access hitInfo.textureCoord.

    For now i'm converting the results to a Job compatible struct, I think it'll be worth it since the job runs on Burst but it's not ideal.
     
    Last edited: Jun 8, 2020
  5. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    So the actual cause of the bug is that mono is upgrading the float multiplies to double - so what effectively happens is that A, B, & C become double2. Burst keeps them as float2 which means the intermediate steps round sufficiently to get the wildly different numbers you see. The numbers that are coming in just so happen to be ones which suffer heavily from catastrophic cancellation meaning a lot of precision is being lost.

    The reason the crash happens is the stack is exhausted, you get a stack overflow and then the OS throws a hardware exception. At present we do not have any protection for this in Burst code - but its something we're working on to help make sure the editor won't crash in scenarios like this, and instead it'll throw a C# exception you'll be able to see in the logs.

    So to workaround your issue - cast them to double2 would be my suggestion. It's what mono is doing behind your back, and the rest of the code in Burst will still be pretty fast anyway.
     
    laurentlavigne likes this.
  6. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    132
    OK, Thanks for the guidance. Still consider this a bug: IMHO BURST should not behave differently than non-BURST in terms of implicit/explicit casting. This is not intuitive and I do expect other will run inadvertently into it.

    As I played around with this casting before submitting, I guess I was on the right track finding a workaround, but was not thinking it through: I tried casting the outcome of the individual multiplication to double, by which time time harm was already done. So in case other here stumble over this, here a quick overview what kind of casting avoids the error, and which one does not:
    Code (CSharp):
    1. public static double PerpendicularDistance(float2 A, float2 B, float2 C)
    2. {    //will lead to catastophic rounding error as BURST does not promote float input to double
    3.     double area = math.abs(.5 * (A.x * B.y + B.x * C.y + C.x * A.y - B.x * A.y - C.x * B.y - A.x * C.y));
    4.     //etc pp...
    5. }
    6.  
    7.  
    8. public static double PerpendicularDistance(float2 A, float2 B, float2 C)
    9. {    //casting of multiplciation results: still catastophic rounding error
    10.     double area = math.abs(0.5d * ((double)(A.x * B.y) + (double)(B.x * C.y) + (double)(C.x * A.y) - (double)(B.x * A.y) - (double)(C.x * B.y) - (double)(A.x * C.y)));
    11.     //etc pp...
    12. }
    13.  
    14. public static double PerpendicularDistance(double2 A, double2 B, double2 C)
    15. {    //works
    16.     double area = math.abs(.5 * (A.x * B.y + B.x * C.y + C.x * A.y - B.x * A.y - C.x * B.y - A.x * C.y));
    17.     //etc pp...
    18. }
    19.  
    20. public static double PerpendicularDistance(float2 A, float2 B, float2 C)
    21. {    //works
    22.     math.abs(.5d * ((double)A.x * (double)B.y + (double)B.x * (double)C.y + (double)C.x * (double)A.y - (double)B.x * (double)A.y - (double)C.x * (double)B.y - (double)A.x * (double)C.y));
    23.     //etc pp...
    24. }
    25. public static double PerpendicularDistance(float2 A, float2 B, float2 C)
    26. {    //works
    27.     double2 Ad = A;
    28.     double2 Bd = B;
    29.     double2 Cd = C;
    30.     double area = math.abs(.5d * (Ad.x * Bd.y + Bd.x * Cd.y + Cd.x * Ad.y - Bd.x * Ad.y - Cd.x * Bd.y - Ad.x * Cd.y));
    31.     //etc pp...
    32. }
     
    Last edited: Jun 10, 2020
  7. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Not sure if this is the right place to ask, but I saw :

    "Note that for performance reasons, the 4 wide types (float4, int4...) should be preferred"

    Can anyone explain the reason behind it? If I am not constrained by memory, is using int4 always better than int2? If so by how much? Is it worth it?
     
  8. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    Hi, currently, I'm not able to build a standalone player on Windows x86_64.
    It keep telling me that link.exe is missing to compile burst.
    Indeed, the file is missing in the folder
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
    It contains only one file (vcmeta.dll)

    Every other folders contains a link.exe
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\\x86_arm

    I have install Visual 2019 Professional, Windows 10 SDK
    And I tried to install Microsoft Visual Studio Tools with C++ components checked. But it doesn't solve the issue.

    Anyone know about this issue ?

    Edit: And when launching in batch mode, when the build failed because of that, it still return like there is no error, so our build machine dont know there is something wrong.
    "Exiting batchmode successfully now!
    Exiting without the bug reporter. Application will terminate with return code 0"
     
    Last edited: Jun 30, 2020
  9. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    Which version of burst are you using? It should have been fixed in 1.3+
     
    sebas77 likes this.
  10. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    Indeed, it fix the issue, I was with 1.1.1 version because it was the one installed by Animation Rigging
    Thank
     
  11. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    I works for PC, but when trying to build for Xbox One I still have the error

    BuildFailedException: Burst compiler (1.3.3) failed running

    stdout:
    Burst requires Visual Studio 2015 along with the Microsoft XDK in order to build a standalone player for XboxOne with X64_SSE4
    Unable to find a valid linker at 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe'
    stderr:
     
  12. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    Can you report the issue via Unity bug report? We are not entitled to discuss about NDA platform on the forum ;)
     
  13. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    Report sent :)
     
  14. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I have two questions.

    1. Does Burst work with Switch now? It has been more than a year since we asked for this, so it would be really nice if we can get some love on that if it isn't working yet.

    2. Does Burst dependent on Unity't script backend? Ie, does it matter if it is using Mono or IL2CPP?
     
  15. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    118
  16. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Hello,
    I was doing some profiling past days. Prepared a development build and noticed that none of my jobs are burst compiled. When profiling in editor though all jobs are marked as using burst.

    We are using Burst 1.3.5 and unity 2018.4.26.
    Project settings do not have a Burst AOT category.

    The job menu in editor looks like this:
    upload_2020-9-4_20-38-34.png

    PS: Also did a cloud development build that reporting as not using burst as well.

    Anything I did wrong, or dev build are supposed to not work with burst. How can we be sure that our production build will use burst?

    Thanks.
     
  17. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    What platform are you building for? Burst compilation can be verified by the presence of the lib_burst_generated module (a .dll on Windows) in your builds and the lib_burst_generated.txt file, which lists all methods that were burst compiled.
     
  18. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    We do cloud building for all platforms, but tests were done on windows (x64)

    Looking into build folder there is lib_burst_generated.dll and in the txt file all methods are listed (target X64_SSE2, X64_SSE4). Still, the question remain, why it's not showing that burst is used when profiling. It's confusing and make me think that burst is not used even if dll is in place.
     
  19. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    We noticed that burst is not used in development builds in 2019.2, so maybe that's also the case in 2018. You could create a small test, by manually measuring the time it takes to execute some large burst function, display the result on the screen and compare between development and production builds.

    You could also look at the source code to try to find where this happens, convert the package to a project package and modify it if you want to force it to use Burst in development.
     
  20. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    Do you know if that's considered a bug? I'm on 2019.4 LTS using BurstCompile on a few methods, and it would be pretty interesting to learn that it's not actually using Burst compilation in builds with BuildOptions.Development turned on.

    *Edit: I've just profiled my build, and according to the Hierarchy view, I do see (Burst) next to each of the jobs being executed. Hopefully that's all it takes to confirm that burst compilation is actually taking place on those jobs.
     
    Last edited: Sep 5, 2020
  21. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    So, I've prepared a small test project and tested if burst is used in dev builds. Here are the screens of the profile in editor and dev build:
    Screenshot_1.png
    Screenshot_2.png

    Burst is indeed showing in dev build. Now, the question is why it doesn't in our main project? Looking into build folder I've noticed that it lacks the lib_burst_generated.pdb file. Could it be the cause?

    Any advice from Unity Team would be much appreciated.
     
  22. hvillacruz

    hvillacruz

    Joined:
    Aug 15, 2018
    Posts:
    8
    I got this issue with mac and busrt, i cant build and run


    /bin/sh: /Users/Random User/Library/PackageCache/com.unity.burst@1.3.6/.Runtime/hostlin/lld: cannot execute binary file
    While compiling job: System.Int32 Unity.Burst.Intrinsics.X86::DoGetCSRTrampoline()
    at <empty>:line 0


    Unexpected exception Burst.Compiler.IL.Aot.AotLinkerException: The native link step failed. Check previous exception in the log - linker command line : "/Users/RandomUser//Library/PackageCache/com.unity.burst@1.3.6/.Runtime/hostlin/lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 -r -dylib -o "/Users/maybankpro2017/PakYouWorld/Suyop/Temp/Burst/burst-aotatgwhhul.o65/f03136341a86c8a1c540d93efe652dc6.bundle" "/Users/maybankpro2017/PakYouWorld/Suyop/Library/PackageCache/com.unity.burst@1.3.6/.Runtime/libs/burstRTL_m64.a" "/Users/maybankpro2017/PakYouWorld/Suyop/Temp/Burst/burst-aotatgwhhul.o65/lib_burst_generated_part_0.o" "/Users/maybankpro2017/PakYouWorld/Suyop/Temp/Burst/burst-aotatgwhhul.o65/lib_burst_generated_part_0_merged.o""
    at Burst.Compiler.IL.Aot.AotNativeLinkBase.RunNativeLinkerTool (System.String command, System.String arguments, System.String errorMessage, System.String commandType, System.String workingDirectory, System.Boolean muteOutputs) [0x000d0] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Aot.AotNativeLinkLLVMMacOS.Link (Burst.Backend.TargetCpu targetCpu, System.Collections.Generic.List`1[T] inputFiles, System.String outputFile, System.Boolean enableDebugInfo) [0x00118] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Aot.AotCompiler.Link (System.Collections.Generic.List`1[T] groups, System.String nameSuffix, Burst.Compiler.IL.Aot.AotCompilerOptions compilerOptions, System.IO.TextWriter consoleOut, System.IO.TextWriter consoleError) [0x001f8] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Jit.Providers.OnDiskJitProvider.BeginCompileModule (Burst.Backend.Module module, Burst.Compiler.IL.NativeCompiler nativeCompiler, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Jit.JitOptions jitOptions, Burst.Compiler.IL.Helpers.Hash128& moduleHash, Burst.Compiler.IL.Jit.JitCacheManager jitCacheManager) [0x00089] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethodInternal (Burst.Compiler.IL.Jit.JitResult result, System.Collections.Generic.List`1[T] methodsToCompile, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0055f] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Mono.Cecil.MethodReference[] methodReferences, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x00271] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001c] in <9b99a8d26a5f43d4ad1097789969a537>:0
    at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x003cb] in <9b99a8d26a5f43d4ad1097789969a537>:0

    While compiling job: System.Int32 Unity.Burst.Intrinsics.X86::DoGetCSRTrampoline()
    at <empty>:line 0
     
  23. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    To enable Burst compilation when building for player (not playmode in the editor), you should tick the corresponding checkbox in Project Settings/Burst AOT Settings. Please check if you have it enabled in your main project.
     
  24. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @hvillacruz your log says `The native link step failed. Check previous exception in the log` - please do check other messages in the console, or ideally check in your editor log.
     
  25. kuwabara_

    kuwabara_

    Joined:
    Mar 2, 2019
    Posts:
    2
    Hello everyone.
    This sentence is automatically translated, so I'm sorry if it's hard to understand.
    The same phenomenon as hvillacruz is occurring in my development environment (Mac).
    I am using Unity 2019.4.10f1.
    I updated my Mac OS to Big Sur Beta. Is this related to this?
    Thank you.
     
  26. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Please see my above post. There is only job menu available, couldn't find any other options in the project. No Project Settings/Burst AOT Settings, either.

    Regards.
     
  27. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Right sorry I missed the fact it's Unity 2018.4.26. It should work.
    Let's take a step back - could you explain once again what you are doing, what you see and what you're expecting?
     
  28. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    So, we have some jobs in the project and they work perfectly. We've added burst attribute to them and we got awesome performance, but only in unity editor.

    If we do a development build for profiling, burst is not used anymore (or at least it does not appear in the profiler). First I thought it might be just a profiler problem, but I've prepared a test project and saw that burst does appear in profiler with dev builds.

    So, the question remains why burst is not used in our project when we make a developments build and it is in unity editor. I've also tried cloud build with burst on and dev build, still no success. Is there a way to check is burst is used in the build?

    I've search everything I could find about burst (docs, forums, etc), but couldn't find a solution or explanation for this behaviour.

    Thanks.
     
  29. hvillacruz

    hvillacruz

    Joined:
    Aug 15, 2018
    Posts:
    8

    what i did is disable everthing here

    Project Settings/Burst AOT Settings.
     
  30. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @Maverick do you see lib_burst_generated.dll in the correct Plugins folder?

    In your editor log, do you see an entry like this after building:

    com.unity.burst\.Runtime\bcl.exe exited after xxx ms

    ?
     
  31. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Here is the content of the plugins folder:
    upload_2020-9-24_15-16-54.png

    There is nothing about bcl.exe in editor console, but there is indeed a record in the log file:
    Code (csharp):
    1.  
    2. ...
    3. D:\Workspace\Prometheus\Library\PackageCache\com.unity.burst@1.3.5\.Runtime\bcl.exe exited after 4335 ms.
    4. stdout:
    5. Compiled 1 library, containing 50 methods, in 4104ms using 8 threads: D:\Workspace\Prometheus\Temp\StagingArea\Data\Plugins\lib_burst_generated.dll,D:\Workspace\Prometheus\Temp\StagingArea\Data\Plugins\lib_burst_generated.pdb
    6. stderr:
    7.  
    8. Unloading 301 Unused Serialized files (Serialized files now loaded: 0)
    9. ...
    10.  
     
  32. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Right, so looks like everything is working as expected. The library is being compiled, it also makes it into the final build. (I guess you're doing a 32-bit build, right?)

    Speaking of the profiler; do you see your bursted job appear in the profiler, but not marked as "Burst"?
     
  33. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    @Yury-Habets ,

    We are building 64 bit only. Yes, in the profiler I do see jobs running, but without any burst mark.

    Here are screenshots from profiling in editor and profiling development build:
    upload_2020-9-24_17-8-27.png

    upload_2020-9-24_17-12-34.png
     
  34. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Can you see ClimatyMapSystem::UpdateCubemapColors job in the burst inspector?
    Can you please check lib_burst_generated.txt in Plugins/x86_64 and see if that job is mentioned in this file?
     
  35. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Yes, I do see the job (and all others) in the burst inspector:
    upload_2020-9-25_8-6-35.png

    It's also is in lib_burst_generated.txt (twice, in --target=X64_SSE2 and --target=X64_SSE4 sections)
    upload_2020-9-25_8-9-7.png

    PS: please note, the project is really old and went through several unity upgrades.
     
  36. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Ok. So I did more tests and searched forums and docs.

    After reading following:
    I did a test, in the test project build, I've added an empty "x86_64" folder to Plugins directory. Like this:
    upload_2020-9-25_13-11-8.png

    The burst was not used anymore!

    So, what we should do, if for any reason that folder is created by 3rd party plugins? Should we create post build processor and just copy all burst files to respective folder, or there is checkbox somewhere in settings/configs?

    @Yury-Habets , any advice?
     
  37. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @Maverick what you are quoting related to the Assets/Plugins folder of the project, but your screenshot is from the builds folder.

    Do I get it correctly then that your test project is built for 32 bit, while the real project for 64?
    Did you clear the output folder of the real project before building?
    It might be that something is messing up with the bitness of the app/plugins. One way to check is Process Explorer; start your game, find the process, check its bitness, then open "DLLs" and check loaded DLLs and their paths.
     
  38. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    So :)

    Test project is 64 bits. Output folder is new, no files. All DLLs are 64 bits, no 32bits at all. We do not build 32bits ever.

    The problem is in DLLs location and if there is a folder x86_64 in Plugins directory.
    Because we have no control where burst puts its DLLs, they end up in Plugins folder.

    Now:
    Case 1: no x86_64 directory present in Plugins folder => BURST working.
    Case 2: x86_64 directory exists in Plugin folder => BURST will not work anymore.

    I hope I've explained it well.

    PS: We managed to make burst working by removing all sub folders from Plugins directory.

    @Yury-Habets
     
  39. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Happy to hear it's working now, and thank you for following up! We'll check if it has to do with the way how Unity loads plugins, or if it is a burst issue.

    UPDATE: created a bug report on our side
     
    Last edited: Sep 28, 2020
    Lee_Hammerton likes this.
  40. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    118
    @Maverick - I've dug into this issue, as it stands on unity versions prior to 2019.3, burst places the plugins in the same location as would be used if you add native plugins into the assets folder (e.g. Assets/Plugins/X64/asimpleplug.dll). It looks like the steamworks.net plugin as you have noticed, uses the behaviour of 2019.3+ editors and copies the dlls into an architecture specific folder. Unfortunately this means that unity expects all plugins to be located in the architecture specific folder. I've logged an issue with them since I think its an issue from their side : https://github.com/rlabrecque/Steamworks.NET/issues/379

    For now, its probably safest to add a post build step to copy the lib_burst_generated.dll into the architecture specific folder.
     
    Last edited: Sep 28, 2020
    Yury-Habets likes this.
  41. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    @Yury-Habets , @Lee_Hammerton , thanks for info.

    Yes, we are taking care now (for our case) that no other folders are created.
    Don't know how burst is working in later unity version, but would be nice to have some control, where burst places its dlls.

    Regards.
     
  42. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    383
    Updated in Package mgr and I get this:
    Library\PackageCache\com.unity.burst@1.3.9\Editor\BurstAotCompiler.cs(499,27): error CS0234: The type or namespace name 'AndroidExternalToolsSettings' does not exist in the namespace 'UnityEditor.Android' (are you missing an assembly reference?)
     
  43. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Did you restart the editor after package updated?
     
  44. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    Hello there, so when importing Burst (1.4.9) to my project i get the following error when building a empty URP project:

    Unable to find player assembly: C:\Unity\New Unity Project\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
    UnityEngine.Debug:LogWarning (object)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.4.9/Editor/BurstAotCompiler.cs:291)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.4.9/Editor/BurstAotCompiler.cs:164)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()


    And when also importing the Jobs (0.8.0) package, now when building the project. These errors are added to the list:

    System.Windows.Forms.dll assembly is referenced by user code, but is not supported on StandaloneWindows platform. Various failures might follow.
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()


    Unable to find player assembly: C:\Unity\New Unity Project\Temp\StagingArea\Data\Managed\Unity.PerformanceTesting.dll
    UnityEngine.Debug:LogWarning (object)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.4.9/Editor/BurstAotCompiler.cs:291)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.4.9/Editor/BurstAotCompiler.cs:164)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()


    Are they ok just to be ignored? Since there are quite a few assets in my real project that uses the Jobs and Burst packages, or maybe better to wait for the official release of Jobs? thanks!
     
  45. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    The errors seem to be related to test automation packages. If you are using them, try upgrading to latest versions. If not, try removing them and see if it works now.
     
  46. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    I don't really know what these test automation packages are actually, so probably i am not using them, but which one is it on a empty project? is it the Test Framework? It shows that Jobs use that as a dependency . Also the windows.forms dll is used these packages as well?
    Sorry about too many questions!
     
  47. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    That's true, Entities and other packages depend on Test Framework so you can't remove it. Did you try updating the package though? (this is related to the first error) If nothing helps, it should be safe to ignore the issue for now until the fix lands.

    On your second error about Windows.Forms - this is definitely unsupported and the error says "is referenced by user code" so you may want to explore your code more and search for assembly references.
     
  48. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    Thanks for the quick reply!
    So I made a few tests here, and am 90% sure that the windows.forms dll error is also from the jobs package, just like the other two. But as you said, this one is a bit more critical.
    Updating the Test Framework had no effect on the warnings unfortunately.

    The steps to recreate are pretty simple, first I made a new URP project and build it right away to check if there are any warnings, nothing so far. Sometimes the Unity Collaborate package throws the windows.forms.dll but not this time. I remove it anyway for precaution. Build again, still no errors.

    Then imported the Jobs Package there is this small warning on import:
    Class HashSetExtensions can not exist in multiple namespaces in the same file, even if one is excluded with preprocessor directives. Please move these to separate files if this is the case.
    I ignore it, because have no idea what it means lol.
    Then I build the project again, and the exact same three errors pop again when building. Removing Jobs and re-building the project, removes the errors, including the Windows Forms one.

    This is the same for my project or an empty project, so not reallly sure why it says, referenced by user code, since i'm pretty sure none of my code use that. But i'm no programmer so can't be 100% sure of what is going on. Also i talked about this with some asset store developers, whose assets depend on Jobs and they said they know this exist for a while but don't don't why and if it has critical consequences.

    Hopefully this helps to reach solution, thanks!
     
    Last edited: Aug 3, 2021
  49. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @homemacai could you submit a bug report and attach the sample project? Please let me know the case id. Thanks!
     
  50. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    Done! the case ID is 1355526
    Thanks for the work Yury!
     
    ScottJak likes this.