/The-Usual-Suspects

A collection of useful Unity tools, features and extensions that I seemed to have to recreate for every project. Well... Not anymore!

Primary LanguageC#MIT LicenseMIT


Ninito's The Usual Suspects

GitHub tag (latest SemVer) GitHub repo size GitHub Repo stars

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact
  5. Acknowledgements

About The Project

This repo is a collection of the tools, features and extensions I seem to write or rewrite for every project. Until now, that is. It contains a wide range of things - anywhere from pooling frameworks to standart damage and health systems, property drawers for interface fields, editor-serializable dictionaries, etc.

Here are the premises:

  • The tools, extensions and features should have minimal interdependency. You should be able to pick and choose which ones you want, and discard the rest.
  • The tools should be reusable, flexible and powerful. I made them precisely so I don't have to start from scratch every time, In fact, the goal is to use them with minimal modification.
  • Easy to use. A hammer is only as good as its handle. Likewise, the tools should be easy to learn and use. Visit the wiki, which is continually being written, and check for documentation on whichever tool you're trying to learn/use.

Included Tools

Here are the tools included in the project:

  • PropertyDrawer and field attribute to support interfaces in the inspector.
  • A read-only inspector field attribute
  • A field attribute, that glows red in the inspector if its dependency is not fulfilled.
  • A field attribute, that only displays a field if a separate bool field is true.
  • Base classes for easy grid-related functionality.
  • An improved grid layout class with superior customizability, called a Flexible Grid Layout.
  • A prepackaged, flexible framework for Parallax effects.
  • A serialized, inspector-viewable Dictionary class.
  • A template, inherit-and-forget singleton class.
  • A ScritptableObject-based state machine implementation.
  • A very simple trigger class that keeps track of colliders inside it.
  • A small set of extensions for ScriptableObject that reduce boilerplate code.
  • A small utility class for Camera-related functions.
  • A simple framework for randomly drawing objects from a pool using weights.
  • A reusable and highly flexible framework for handling health and damage, inspired by Unreal Engine's damage framework.
  • A framework for handling simple player interaction with objects.
  • A feature-rich and highly extensible framework for pooling objects.
  • An extensible and flexible framework for saving data.
  • An easy-to-work-with framework that helps manage UI Windows.

Getting Started

Download the latest UnityPackage and visit the wiki. Pick and choose which tools are useful to you, and then simply use them in your project. You'll need to add a reference to the Ninito.UsualSuspects assembly.

Prerequisites

The tools were tested in Unity 2019 LTS, 2020 LTS and 2021.1. Newer versions should work, but compatibility is not guaranteed.

Installation

  1. Open the package manager.
  2. Click on the plus icon on the top left corner, and select 'Add package from git URL'.
  3. Paste in 'https://github.com/ninito-ph/The-Usual-Suspects.git'.
  4. Import it into your project!

Usage

Head over to the wiki. Mind you, its currently under construction.

Contact

Paulo Oliveira - paulo at ninito dot me

Project Link: https://github.com/ninito-ph/The-Usual-Suspects