Git Product home page Git Product logo

jimmysunityutilities's Introduction

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<T> and TrackedObjectPoolUtility<T> classes for creating object pools

  • ScriptableObjectSingleton<T> class, for creating scriptable object singletons

  • NetworkPinger class for testing connectivity to servers. Documentation here

  • LockedList and LockedHashSet, thread-safe wrappers for List<T> and HashSet<T>

  • 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

jimmysunityutilities's People

Contributors

jimmycushnie avatar pipe01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.