Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

String Interpolation [Solved]

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:
    657
    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