Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Now Available - Native Apple Silicon Editor Preview Builds

Discussion in '2021.2 Beta' started by KevinWelton, Jun 8, 2021.

  1. marcostmorais

    marcostmorais

    Joined:
    Jan 18, 2018
    Posts:
    2
    That's awesome!! Thank you for all the effort, Kevin and the team!

    I'm just waiting for the URP fix regarding the lightmapper to make the switch. Does the new Beta from yesterday (build 8) includes it? Thanks!
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Because I feel like I started this a few pages back, what I actually meant by "merged in the regular releases" was when it would be "merged" in the regular releases schedule of the other betas, and released through the hub, as opposed to being released through separate links, and not whether the codebase is different.

    Using the word "merge" was my bad, since it has other more prominent meanings in this context rather than what I meant.
     
  3. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Hey, I did some profiling.
    Looks like Unity's AssemblyBuilder is extremely slow on Apple Silicon.

    For Mirror, we use AssemblyBuilder to test IL weaving:
    Code (CSharp):
    1.  
    2.         public static void Build()
    3.         {
    4.             AssemblyBuilder assemblyBuilder = new AssemblyBuilder(Path.Combine(OutputDirectory, OutputFile), SourceFiles.ToArray())
    5.             {
    6.                 additionalReferences = ReferenceAssemblies.ToArray()
    7.             };
    8.             if (AllowUnsafe)
    9.             {
    10.                 assemblyBuilder.compilerOptions.AllowUnsafeCode = true;
    11.             }
    12.  
    13.             assemblyBuilder.buildFinished += delegate (string assemblyPath, CompilerMessage[] compilerMessages)
    14.             {
    15.                 CompilerMessages.AddRange(compilerMessages);
    16.                 foreach (CompilerMessage cm in compilerMessages)
    17.                 {
    18.                     if (cm.type == CompilerMessageType.Error)
    19.                     {
    20.                         Debug.LogError($"{cm.file}:{cm.line} -- {cm.message}");
    21.                         CompilerErrors = true;
    22.                     }
    23.                 }
    24.             };
    25.  
    26.             // Start build of assembly (25ms)
    27.             Stopwatch watch = new Stopwatch();
    28.             watch.Start();
    29.             if (!assemblyBuilder.Build())
    30.             {
    31.                 Debug.LogError($"Failed to start build of assembly {assemblyBuilder.assemblyPath}");
    32.                 return;
    33.             }
    34.             Debug.LogWarning("AssemblyBuilder.Build(): " + watch.ElapsedMilliseconds + " ms");
    35.  
    36.             // 1314 ms
    37.             watch = new Stopwatch();
    38.             watch.Start();
    39.             while (assemblyBuilder.status != AssemblyBuilderStatus.Finished)
    40.             {
    41.                 Thread.Sleep(10);
    42.             }
    43.             Debug.LogWarning("AssemblyBuilder waiting for BuildStatus: " + watch.ElapsedMilliseconds + " ms");
    44.         }
    The last part where we wait for AssemblyBuilderStatus.Finished:
    • Macbook Pro 2015, Unity 2019: 420ms
    • Macbook Air M1, Unity 2021.2.0b6 Apple Silicon: 1314ms.
    Everything else is 5x or so faster.
    AssemblyBuilder is 3x slower.

    I made a branch for you if you want to test: https://github.com/vis2k/Mirror/tree/weaver_profiling_for_unity
    Simply import the project, open the Test Runner window, run the first test under Weaver->Tests->WeaverClientRpcTests->AbstractClientRpc:
    2021-08-21_14-25-24@2x.png

    The above code is from Tests/Weaver/WeaverAssembler.cs.

    Please let me know if there's anything else I can do to help.
     
    ROBYER1 and AcidArrow like this.
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Can you file a bug report with this information?
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Sure, case #1359764
     
  6. matheus_inmotionvr

    matheus_inmotionvr

    Joined:
    Oct 3, 2018
    Posts:
    58
    Any update on whether the Apple Silicon support will make its way to 2020 LTS?
     
    Kronnect, McGravity, evilock and 2 others like this.
  7. zihyfw15

    zihyfw15

    Joined:
    Jul 21, 2017
    Posts:
    6
    3D9D8512-AC9B-4890-82F2-061A9415F36A.png
    Is this correct? I think it should be Apple. So how to open it natively?
     
  8. jaslan

    jaslan

    Joined:
    Jul 6, 2017
    Posts:
    9
    It's incorrect, probably you have downloaded the version from Unity Hub, that is not the Apple Silicon version.

    If you want the Apple Silicon native version, need to download it directly from Unity Archive.

    Follow the link:

    https://unity3d.com/unity/beta/2021.2.0b8

    Here you will see the Unity Editor for Intel, and the "Unity Editor (Apple silicon, preview)", Install this one.
     
    zihyfw15 likes this.
  9. GKiernozek

    GKiernozek

    Joined:
    Nov 16, 2013
    Posts:
    38
  10. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
    Go into System Preferences, Security and Privacy, General tab, and look near the bottom to allow the app to open.
     
    GKiernozek likes this.
  11. zihyfw15

    zihyfw15

    Joined:
    Jul 21, 2017
    Posts:
    6
    Thank you.
     
  12. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Another way to achieve the same thing on the mac is to right click on the file and select open, and then you get a warning that does have an open button, which you dont get if you just double click on the file.
     
    bryan-levitade likes this.
  13. bryan-levitade

    bryan-levitade

    Joined:
    Feb 17, 2017
    Posts:
    16
    Sadly burst still throwing errors on m1 in 2021.2b9, but otherwise I've had zero problems.
     
  14. sk0g

    sk0g

    Joined:
    Mar 5, 2021
    Posts:
    33
    Weird, I've had _lots_ of problems for the first time, and I've been updating the alpha/ beta versions every 2-3 versions. It mostly just freezes at random points when I mess with inspector attributes, requiring a force quit and a restart. The Burst issue is still there too though.
     
  15. jaslan

    jaslan

    Joined:
    Jul 6, 2017
    Posts:
    9
  16. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    bryan-levitade likes this.
  17. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    So I am trying to install android build support for on top of 2021.2b9. However there is no JDK, SDK, NDK provided. I tried linking them to the 2019.4 paths for JDKs and stuff but the NDK wasn't compatible. Should I download 2021.1 including android build support + SDK,NDK,JDK and try to link to those?
     
  18. bryan-levitade

    bryan-levitade

    Joined:
    Feb 17, 2017
    Posts:
    16
    Cheers that worked. On `1.6.0-pre4` right now and no more errors. I saw the changelog but gave up since the package manager did not show pre3 or higher, only pre2. After your comment I tried installing it through the 'Add package by name' and that worked. Interestingly, the editor crashed when upgrading from `1.6.0-pre3` to `1.6.0-pre4`. Submitted a bug report for that.
     
    elbows likes this.
  19. jaslan

    jaslan

    Joined:
    Jul 6, 2017
    Posts:
    9
  20. bz_apps

    bz_apps

    Joined:
    Aug 19, 2014
    Posts:
    70
    Hi I just went to try this out but have a bunch of errors, mostly related to TextMeshPro. Have I missed a step?

    Im using version: upload_2021-9-8_17-49-11.png

    Here a screenshot of the errors:
    upload_2021-9-8_17-49-47.png

    Thanks
     
  21. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    I would try reinstalling Unity, something must have gone wrong during installation. Make sure to completely delete this editor before installing it again.
     
  22. cpkcpk

    cpkcpk

    Joined:
    Dec 13, 2019
    Posts:
    48
    Hey Kevin,

    Has this change made it in to any of the most recent builds?

    Thanks!
     
  23. bz_apps

    bz_apps

    Joined:
    Aug 19, 2014
    Posts:
    70

    I tried that and now i get a different error:
    upload_2021-9-9_19-55-6.png
     
  24. Phil_Z

    Phil_Z

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    36
    If you update to Burst 1.6.0, it should work in that version.
     
    bryan-levitade likes this.
  25. sk0g

    sk0g

    Joined:
    Mar 5, 2021
    Posts:
    33
    Monterey Beta 6, with beta 9 & 11 I keep getting this:
    Shader compiler initialization error: Protocol error - failed to read magic number
    . Is it just me getting this?

    Had similar-ish issues with JetBrains IDEs (JBR-3715).
     
  26. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    anyone know if this is the right thing to do?
     
  27. DrewFitz

    DrewFitz

    Joined:
    Dec 9, 2016
    Posts:
    30
  28. marwanzaky

    marwanzaky

    Joined:
    Mar 20, 2019
    Posts:
    11
    So far the M1 Unity version has been great for me, I've only had three issues so far which I hope they'll be fixed.

    First, when I build the project for Android devices, the icon displays the Unity logo instead of the one I did. (I tried the iOS and macOS versions with no issues, I believe the issue is only on Android).

    Secondly, I keep seeing this error (Image) when I implemented the Firebase SDK (Database, Auth, etc..) on the play mode.

    Lastly, the iOS build is not opening.
     

    Attached Files:

    Last edited: Sep 10, 2021
  29. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Do you know if the first and the last issues reproduce on the Intel editor?

    As for the second issue, it looks like Firebase SDK doesn't have Apple silicon binaries yet - you'll have to ask them to recompile them to support Apple silicon.
     
  30. bryan-levitade

    bryan-levitade

    Joined:
    Feb 17, 2017
    Posts:
    16
    Using Unity Apple Silicon beta version 2021.2.0b11.3437, an issue that's still occuring the URP throwing errors. URP 12.0 is using Burst 1.5, but I'm guessing the minor upgrade to 1.6 shouldn't break it?

    upload_2021-9-11_23-43-38.png

    Only happens when stopping play mode
     
  31. tab1887

    tab1887

    Joined:
    Mar 5, 2018
    Posts:
    5
    I did report the issue a while ago here:
    https://github.com/firebase/quickstart-unity/issues/1100
    Unfortunately this has not been done yet.

    On the other hand @KevinWelton mentioned a new feature to select the platform in plugin manager here: #62
    I wonder if that is still in progress and if it could be a possible workaround for this issue.

    It would be great to get this working somehow. For me this the only issue that's stopping me from using the much faster M1 version of the editor. Too bad :-(
     
    megavoid-de likes this.
  32. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    That landed to 2021.2.0b13 but I'm not sure how you'd use it to work around this issue.
     
  33. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Hello, is there any ETA on Apple Silicon version of Unity Hub. Right now the only way to install the editor (Apple Silicon) is to directly download it from the Unity website.
     
  34. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    No ETA but we're working on it.
     
  35. Ulnari

    Ulnari

    Joined:
    Feb 9, 2014
    Posts:
    15
    2021.2.0b13 seems to have strange issues with game window, the display area overlaps the menu bar. When run in the editor, the overlapping area is filled with rendering artifacts. Also the rendering seems to freeze for short amounts of time (stuttering).
    I noticed performance issues in 2021.2.0b11 too, but only when maximizing the game window (framerate dropped from 60 to 10-20). Interestingly in 0b13 the framerate is uncapped, whereas in 0b11 it automatically was capped to 60 (I didn't limit it via code).
     
  36. amroc

    amroc

    Joined:
    Apr 8, 2014
    Posts:
    13
    Yes this happens for me too
     
  37. marwanzaky

    marwanzaky

    Joined:
    Mar 20, 2019
    Posts:
    11
    The exact same thing I'm encountering
     
  38. ryanslikesocool

    ryanslikesocool

    Joined:
    Jul 31, 2016
    Posts:
    49
    I'm having the same issue here as well on macOS Monterey Beta 7, as well as some stuttering with the Intel version of the editor on 2021.1.22f1.
     
  39. unity_Z-Th6N6g4Wd3GQ

    unity_Z-Th6N6g4Wd3GQ

    Joined:
    Nov 13, 2020
    Posts:
    1
    Do you know if any other beta/alpha editor version works without the rendering artifacts?
     
  40. Ulnari

    Ulnari

    Joined:
    Feb 9, 2014
    Posts:
    15
    b11 runs fine on my M1 (except the slow down when maximized).
     
  41. JasonDaze

    JasonDaze

    Joined:
    Jun 3, 2018
    Posts:
    6
    New MacBook Air M1, New project. I'm getting maybe 5-10 FPS in the scene view when moving the camera. b13.3550
     
    IndieFist likes this.
  42. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    i was so close to buy a new m1 this week but im scared to get bugs, m1 was released one year ago and still no having a full version without bugs? at least really important bugs?
     
  43. amroc

    amroc

    Joined:
    Apr 8, 2014
    Posts:
    13
    You can just run the intel version through rosetta 2, it works fine. It's just the native m1 version is tons faster. They're getting close, it was useable a couple of beta versions ago before the graphics glitch. I dare say when 2021.2 goes out of beta it will be good enough.
     
    IndieFist likes this.
  44. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    yes, some time ago i was tested the intel version, but it takes to long everytime visual studio need to do a rebuild when you edit a c# file or when enter in play mode etc.. the only that was impressive is the build time with xcode as similar like an i9 9900k desktop version, sorry for the offtopic
     
  45. Ng0ns

    Ng0ns

    Joined:
    Jun 21, 2016
    Posts:
    197
    I'm getting this as well on 2021.2.0b14

    1. Create a new URP 3D project.
    2. Let it idle after the project has opened.
    3. Crash.

    I can create a new 2D project (not urp). It works but the editor window is very choppy. Also, I'm getting flickering whenever I press play ...

     
    rmb303 and thexdd like this.
  46. Yanichkin

    Yanichkin

    Joined:
    Oct 1, 2021
    Posts:
    2
    I have the same problem.
    As well as strong delays when moving in the viewport

    A similar problem in all assemblies:
    2021.2.0b14
    2022.1.0a9

    2020.3.19f intel (the game window is without bugs, but the scene window is slow)

    macOS Big Sur 11.6
     
    Last edited: Oct 1, 2021
  47. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
    Macbook Air M1 (8 Core / 8 Core). Beta 13 crashes on launch with the error "Obtained 0 stack frames."

    beta 9 used to work now it doesn’t? Might be the project I’m opening, but things are pretty bad for apple silicon right now. I’m going back to Rosetta 2 translated Intel builds in order to keep working.
     
  48. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Got a callstack?
     
  49. marwanzaky

    marwanzaky

    Joined:
    Mar 20, 2019
    Posts:
    11
    I really recommend instead downgrading to Unity 2021.2.0b12, I've tested all the M1 native versions and so far the beta 12 works fine, IMO the version that ran through Rosetta is unusable if you are dealing with code most of the time, it just takes too much time for minor edit to the code (6-12 seconds)
     
    Last edited: Oct 2, 2021
    rmb303, ryanmillerca and JasonDaze like this.
  50. Yanichkin

    Yanichkin

    Joined:
    Oct 1, 2021
    Posts:
    2
    I installed 2021.2.0b12 and it works really well! thanks
     
    marwanzaky likes this.