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

Bug C#9 Function Pointers crash unity on compilation.

Discussion in '2021.2 Beta' started by broots, May 6, 2021.

  1. broots

    broots

    Joined:
    Dec 20, 2019
    Posts:
    54
    (Case 1334152)

    Heya, there's a pretty major bug with C#9 function pointers right now. Unity immediately crashes and will crash-on-boot until the offending class is deleted. It's simple to reproduce:


    Code (CSharp):
    1.         public class CrashyMcCrasherson
    2.         {
    3.             private unsafe delegate*<int> mooses;
    4.         }
    Unsure if these are even supposed to be supported or not, but the compiler very much does not like the use of them right now.

    Cheers.
     
  2. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
  3. broots

    broots

    Joined:
    Dec 20, 2019
    Posts:
    54
  4. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    I am SOOOO excited about that !