A Unity package that implements various common game development functionality such as:
- Game Files: for reading and writing persistent data to the disk
- Object Pools: for reusing frequently created/destroyed objects such as projectiles
- UGUI Components: for creating tab groups, panel groups, and confirmation winds
- Misc. Extension Methods: for implementing shorthand functions for common behavior
- Lookup Table: for finding assets/objects through a string key lookup
- Time Manager: for pausing functionality that maintains a non-one timescale override
- Clamped Data Types: for defining a numeric value that is always constrained between a min and max value
- A Unity project of 2021.2 or later
- Earlier unity releases are not officially supported by this package
- Install the package via Git in the Package Manager
- Ensure you have Git installed and your Unity Version supports Git package manager imports (2019+)
- In Unity go to
Window -> Package Manager - Press the + icon at the top left of the Package Manager window
- Choose "Add package from Git URL"
- Enter the following into the field and press enter:
- Tip: You can append a version to the end of the Git URL to lock it to a specific version such as
https://github.com/Orange-Panda/Unity-Utilities.git#v1.8.0
- Tip: You can append a version to the end of the Git URL to lock it to a specific version such as
https://github.com/Orange-Panda/Unity-Utilities.git
List.InBoundsandArray.InBoundsto check for valid indecies.- Color:
MoveTowardsandMoveTowardsAlphafor moving values of a color by a distance delta - Color:
SetRGB,SetAfor copying specific values from one color to another int.LayerMaskContainsto check if a mask contains a particular layerVector2.Rotatefor rotating a vector about the Z axis
Reuse frequently instantiated and destroyed objects
- Attach a
Poolablecomponent to a prefab - Use
ObjectPool.Instantiateto instantiate a pooled object - Use
Poolable.Returnin place ofDestroyto disable a object for recycling in a future instantiation - Implement
Poolable.OnReturnorPoolable.OnRetrieveto reset variables when recycling- Optional: Add
PoolableReturnAfterDelayto automatically return objects after some amount of time
- Optional: Add
- Action Emitter: Handle functional UI actions such as
Press Y to reset settingsorPress X to inspect item - Aspect Ratio Calculator: Automatically update
AspectRatioFittervalues. - Auto Scroll: Automatically update a scroll rect when a new object is selected.
- Confirmation Windows: Prompt user to accept/decline an action
- Overlays: Handle full screen ui elements that the user is expected to input for
- UI Groups: Control a mutually exclusive list of ui elements such as:
- Tab UI Groups: Ordered list of ui elements to cycle through via previous and next inputs
- Panel UI Groups: Hierarchy list of ui elements that can be traversed upwards to parent panels
- Use the Issues or Discussions of this GitHub repository for support.
This package is developed by Luke Mirman.