Search Unity

Making .NET 4.x Default.

Discussion in 'Scripting' started by kdubnz, Oct 13, 2019.

  1. kdubnz

    kdubnz

    Joined:
    Apr 19, 2014
    Posts:
    177
    Hi All
    Is there a way to make .NET 4.x Default when starting a new project. ( instead of .net Standard 2.0)

    Regards,
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Just create template.
    I think later Unity version sets it to 4. But to be honest don't remember. I just reuse templates, so I don't need recreate new projects and reimport assets /packages.
     
    MNNoxMortem likes this.
  3. kdubnz

    kdubnz

    Joined:
    Apr 19, 2014
    Posts:
    177
    While I appreciate your comment, it doesn't really answer the question.
    Thanks anyway.

    For your info : Later versions do not set the framework requirements to 4 in the config
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,129
    His answer is correct if not completely explained. You need to either create or modify one of the existing templates found under Editor/Data/Resources/PackageManager/ProjectTemplates. When you make a new project Unity extracts the files from the appropriate template (stored in a gzipped tarball) into the new project folder you specify.

    Create a new project, set up the appropriate project settings, and then copy the project settings files into the templates.

    upload_2019-10-14_10-25-49.png
     
    Last edited: Oct 14, 2019
    kdubnz likes this.
  5. kdubnz

    kdubnz

    Joined:
    Apr 19, 2014
    Posts:
    177
    Thanks Ryiah.
    I didn't make the mental jump from the previous response.
    This gives me enough to achieve my goals.

    Regards,
     
  6. Dameon_

    Dameon_

    Joined:
    Apr 11, 2014
    Posts:
    542
    On the off chance you're doing this because you're confused by the version numbers, for the record, .NET Standard 2.0 is newer than .NET 4.5 by almost 5 years. They're two different frameworks, with different version histories.