Package: com.psigenvision.utilities.native
Version: 0.9.0
Namespace: PsigenVision.Utilities
Welcome to PsigenVision's Unity Native C# Utilities, a growing suite of utility libraries designed to boost productivity and facilitate common tasks in Unity (and beyond). Whether you're shuffling lists, generating random values, or working with Unity's Bounds, these extensions are here to simplify your workflow.
Disclaimer:
The code within this library spans quite a bit of time and evolved with my own skill level. As such, many scripts will most certainly have potential for improvement. I truly welcome advice and collaboration—it's how I learn! So, feel free to reach out! :)
Check Out the Documentation!
I won't elaborate too much on the contents of this package within this README—rather, I recommend checking out the various files under Documentation, which detail each part of the package according to its use case and features!
Here’s a peek into what this library offers:
- Unified interfaces for
Guidand ID-based unique identifiers. - Handy methods for working with strings, vectors, and collections.
- Retrieve random elements from collections or Unity's
Bounds. - Shuffle lists using the Fisher-Yates algorithm (
DurstenShuffle). - Generate random long and double values within custom ranges.
- Extensions for
SortedList<TKey, List<TValue>>for streamlined removal, cleanup, and operations.
- Tools to smoothly normalize and map values for animations.
- Integrate
AnimationCurvefor non-linear interpolation. - Debug and validate animated values at runtime.
- Normalize angles to
-180°to180°or Euler rotations for consistent rotational logic. - Simplify handling of animation curves (e.g., inversion, linear detection).
-
Functions for smooth animations and transitions.
- DecayTowards: Smoothly decay any value toward a target.
- Easing Functions: Built-in easing styles like Quad, Cubic, Sine, Bounce, and Back.
Disclaimer: Easing functions have not yet been tested! This section is still under active development.
-
Advanced operations for collection comparisons and processing.
- PrepareForUniqueComparison: Merge collections into unique combined arrays.
- PrepareForUniqueComparisonBetween: Split collections into unique and shared subsets.
- MakeUnique: Remove duplicates from lists or arrays.
- ProcessUniquePairsRoutine: Coroutine for iterating unique pairs within a collection.
- ProcessBipartiteSlice: Coroutine for handling pairs across two collections.
- Essential components for Unity's player loop and custom processing pipelines.
Inspired by git-amend's own Player Loop tutorial! Check it out!
- Simple file and directory solutions for Unity and general-purpose IO tasks.
Disclaimer: This section was written early in my experience and is in need of refactoring. Updates in progress!
- Focused on materials and renderers.
Disclaimer: Still very early in development!
- Debug utilities for validating early logic and concepts during development.
Disclaimer: Absolutely still in the early stages! This is a pretty bare bones (but still useful) utility. It complements, but does not replace, unit testing!
To use the utilities in your Unity project:
- Install "com.psigenvision.utilities.native" as a dependency via Git URL or a local Unity folder.
- Start using the utilities by including the required namespaces in your scripts. For example:
using PsigenVision.Utilities.Randomization;
Contributions are welcome! If you'd like to improve or expand this library:
- Fork the repository.
- Create a new branch.
- Submit a pull request with detailed information about your changes.
If you encounter any bugs or have suggestions for improvements, please open an issue. I'd love your feedback!
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for checking out PsigenVision Utilities!
This library is a culmination of features and functions that grew with me on my learning journey. Hopefully, it will help with yours and make development in Unity easier and more fun. 🚀