Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JimmyCushnie/JimmysUnityUtilities
A bunch of code I like to have on hand while working in Unity
https://github.com/JimmyCushnie/JimmysUnityUtilities
extension-methods extensions unity unity2d unity3d utilities utilities-library
Last synced: 3 months ago
JSON representation
A bunch of code I like to have on hand while working in Unity
- Host: GitHub
- URL: https://github.com/JimmyCushnie/JimmysUnityUtilities
- Owner: JimmyCushnie
- License: wtfpl
- Created: 2019-10-09T21:01:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-02T21:07:34.000Z (3 months ago)
- Last Synced: 2024-08-02T23:30:59.784Z (3 months ago)
- Topics: extension-methods, extensions, unity, unity2d, unity3d, utilities, utilities-library
- Language: C#
- Homepage:
- Size: 354 KB
- Stars: 132
- Watchers: 5
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jimmy's Unity Utilities
This repository contains a bunch of code that I like to have on hand when working in Unity, although large chunks of the code aren't Unity-specific and can be used in any .NET application.I've released everything in here as public domain, so feel free to rip out anything you find useful and use it in your own projects.
## Installation
You can install JUU using the Unity Package Manager. In the top left of the UPM window, hit the "plus" button and click "add package from git URL". Then, enter `https://github.com/JimmyCushnie/JimmysUnityUtilities.git`.
You can also just download/clone the repo and stick it in your project's `Assets` or `Packages` folder.
Note: I update JUU frequently and I'm not shy about breaking APIs, so if you want a stable version you should probably fork it.
## What's included?
By the time you're reading this list, it's probably outdated, but here's what's in JUU at time of writing:
* Hundreds of helpful extension methods for both Unity types and .NET types
* `Color24` struct, which is like Unity's `Color32` but without a transparency byte
* `ObjectPoolUtility` and `TrackedObjectPoolUtility` classes for creating object pools
* `ScriptableObjectSingleton` class, for creating scriptable object singletons
* `NetworkPinger` class for testing connectivity to servers. [Documentation here](https://github.com/JimmyCushnie/JimmysUnityUtilities/wiki/NetworkPinger)
* `LockedList` and `LockedHashSet`, thread-safe wrappers for `List` and `HashSet`
* `AudioLoadingUtilities` for streaming or loading audio files on disk
* `ImageUtility` class for saving and loading images on disk
* `FileUtilities` class with various helpful functions for working with the file system
* `CoroutineUtility` class for running coroutines from places they're usually not allowed: disabled gameobjects, static methods, code not on the main thread
* `CryptographyUtility` for hashing strings
* `SceneUtilities` class for working with multi-scene projects
* `WaitForSecondsPrecise`, a version of Unity's `WaitForSeconds` that doesn't lose accuracy with repeated usage
* `ClipboardAccess` class which allows you to set the contents of the system clipboard
* `SimpleRotation` component for rotating a `GameObject` at a constant speed
* `CryptographyUtility` class for hashing strings
* `CustomFixedUpdate` -- like Unity's FixedUpdate, but you can have many of them, and they can all have different tickrates independant from the physics simulation
* `Dispatcher` for calling code on the main Unity thread from code on other threads
* `JRandom` class; like `System.Random` but with many more methods for getting random values
* `NetworkUtilities` class; can be used to get an available network port, and to parse IP endpoints provided by users in string form
* `TerrainTextureDetector` component for detecting the dominant texture at a position on a Unity Terrain object
* `VisibilityDetector` component for detecting when an object is in view of a Camera
* `PhysicsUtilities` class to get collision mask of a physics layer
* `ResourceUtilities` class to a text asset in `Resources` as a string