| Property | Value |
|---|---|
| Id | UEA0007 |
| Category | Performance |
| Severity | Warning |
| Versions affected | 1.0 - 5.5 |
using UnityEngine;
class ExampleC : MonoBehaviour
{
void Update()
{
var colors = new[] {""red"", ""white"", ""blue""};
var result = string.Empty;
foreach (var color in colors)
{
result += color;
}
}
}using UnityEngine;
class ExampleC : MonoBehaviour
{
void Update()
{
var colors = new[] {""red"", ""white"", ""blue""};
var result = string.Empty;
for (int i = 0; i < colors.length; i++)
{
result += colors[i];
}
}
}https://forum.unity.com/threads/upgraded-c-compiler-on-5-3-5p8.417363/#n21