Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Issue with Mono

Discussion in 'Scripting' started by AnastasiiaK, Nov 9, 2017.

  1. AnastasiiaK

    AnastasiiaK

    Joined:
    Nov 9, 2017
    Posts:
    1
    Hi, everybody


    I'm going to develop an asset for Unity. A part of asset's functionality will be a web browser. There is a problem with Mono in Unity. I can't use it because for development I need to use .NET 4.5.2, but the current C# compiler still targets C# 4 and .NET 3.5. Also, we can't use some features, for example, asynchronous programming support for downloading a file.

    How can I implement my asset without using the standalone app? What controls and tools should I use?
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    You can target .NET 4.6 if you go into the player settings and change to the Experimental scripting runtime version. Would that work for you?
     
    TaleOf4Gamers likes this.
  3. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    As @Baste said, .NET 4.6 is available and supports async. I too developed an asset with async in mind but switched to classic Threading instead due to me wanting it to work on older versions. Threading is definitely something to consider IMHO.