Search Unity

dynamic type in C# api

Discussion in 'Scripting' started by unity_Jw2aalTMhEAwZQ, Mar 1, 2018.

  1. unity_Jw2aalTMhEAwZQ

    unity_Jw2aalTMhEAwZQ

    Joined:
    Jan 12, 2018
    Posts:
    7
    Is there any plan in unity to support dynamic type in the api? This will make the communication between my python software and unity much easier. anyone knows the new? I mean the dynamic keyword.
     
    Last edited: Mar 1, 2018
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    'dynamic' is a C# 4.0 feature. And was added with .Net 4.0.

    You should be able to use it if you have the more recent versions of unity, go to the Player settings, and you target the experimental .net 4.6:
    Screenshot_9.png
     
    Lahcene likes this.
  3. unity_Jw2aalTMhEAwZQ

    unity_Jw2aalTMhEAwZQ

    Joined:
    Jan 12, 2018
    Posts:
    7
    Thank you so much for the quick response! As what you said, it works now.