Working With GC Variables
Sorting by A-Z? No problem.
Prerequisites
Recap
LINQ
using System.Linq;
// Specify the data source.
List<int> numbers = new List<int>() { 0, 1, 2, 3, 4, 5, 6 };
// Define the query expression.
var numQuery =
from num in numbers
where (num % 2) == 0
select num;
// Execute the query.
foreach (int num in numQuery)
{
Debug.Log(num);
}
// Output.
// 0, 2, 4, 6Lambda
Examples
Sorting numbers
Selecting gameobjects with a certain letter in the name
Ordering local variables from gameobjects in list variable
Last updated






