Harness the full potential of lists in your Unity projects with these versatile extensions. Effortlessly manipulate, search, and transform your data with ease.
https://github.com/swzwij/Code-Crate/releases/tag/Extensions-Pack-v1.0.0
Importing a Unity Package:
Download the Package: Locate the Unity package you want to import. This could be from the Unity Asset Store or a developer's website. Download the .unitypackage
file.
Import into Unity: There are two ways to import the package into your Unity project:
.unitypackage
file directly from your file explorer and drop it into the Assets folder within the project window..unitypackage
file.Import Options (Optional):
A window will appear showing the contents of the package. By default, all items are selected for import. You can uncheck any files or folders you don't want to import into your project.
Click Import: Once you're happy with the selection, click Import to begin importing the package files into your project.
Method | Description |
---|---|
Shuffle(this List list) |
Randomly reorders the elements within a generic list of any type. This is achieved using a standard Fisher-Yates shuffle algorithm for efficiency and unbiased randomization. |
SortBy<T, TKey>(this List list, Func<T, TKey> keySelector) |
Sorts the elements of a generic list based on a key extracted from each element via the provided keySelector function. It uses the Comparer.Default for comparison, allowing sorting based on common data types. |
CompareList(this List list1, List list2) |
Computes the symmetric difference between two lists. This means it returns a collection containing elements present in only one of the two input lists. |