Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Additional information: Failed to resolve type reference

Discussion in 'Scripting' started by eric_funktroniclabs, Aug 9, 2019.

  1. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    I have a generic static class that has a method with an `in` parameter. It compiles in mono, but not il2cpp.

    Method in question:

    Code (CSharp):
    1. public static void Send<T> ( in T message = default ( T ) ) where T : struct
    2. {
    3.             ...;
    4. }
    Are these code features supported in IL2CPP? Is there a workaround?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  3. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19