Does C# in Unity support string interpolation?

i.e. Could you have written: serializedObject.FindProperty($“layerProperties.Array.data[{i}]”); ?

String interpolation is possible yes, especially since Unity has ‘caught up’ with its language runtimes in the last few major releases/versions. Earlier versions (e.g. 4.x and 5.x) either didn’t have it or didn’t use the version of the c# language that had it by default, and you had to go into the project properties in Unity to change it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms