Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

String Interpolation

Discussion in 'Scripting' started by kdub, Jul 14, 2018.

  1. kdub

    kdub

    Joined:
    Apr 19, 2014
    Posts:
    158
    In 1018.2

    Is there a way to use String Interpolation in the VS IDE?

    Regards,
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    632
    Sure. You just need to choose .NET 4.x instead of 3.5 in Player Settings. My code is full of stuff like this:

    Code (CSharp):
    1. var s  = $"There have been {counter} things so far";
     
  3. kdub

    kdub

    Joined:
    Apr 19, 2014
    Posts:
    158
    Thanks dgoyette,

    For others that is Edit -> Project Settings -> Player .... Other Settings - Configuration - Scripting Runtime Version

    upload_2018-7-14_20-49-53.png