Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Scripting define symbol for Scripting Runtime Version?

Discussion in 'Scripting' started by Senshi, Jan 12, 2019.

  1. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    534
    Hi all,

    My asset depends on Linq's Zip method, which is not yet available in .NET 3.5. to acomodate these users I included a replacement extension method. I was initially doing a conditional compilation based on
    Code (csharp):
    1.  NET_2_0 || NET_2_0_SUBSET || NET_STANDARD_2_0
    but it seems this only refers to the API level, which can also use the 4.x runtime version on later versions of Unity.

    Is there any way to (not) compile this method based on the selected runtime version?

    Thanks,
    Patrick
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,154
  3. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    534
unityunity