Harness the full potential of lists in your Unity projects with these versatile extensions. Effortlessly manipulate, search, and transform your data with ease.


Release v1.0.0

https://github.com/swzwij/Code-Crate/releases/tag/Extensions-Pack-v1.0.0


Installation

Importing a Unity Package:

  1. 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.

  2. Import into Unity: There are two ways to import the package into your Unity project:

  3. 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.

  4. Click Import: Once you're happy with the selection, click Import to begin importing the package files into your project.


Usage

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.