-
Notifications
You must be signed in to change notification settings - Fork 0
Utilities ‐ Extension Methods
A small collection of helper methods to solve common problems in Unity's native classes and objects.
Unlike other plugins, this one has no namespace by design, since they are expected to extend common classes all around the codebase.
Easily validates an empty serialized field of type Object and issues a basic warning. Use this function during OnValidate().
Simple object validation and file checking functions.
Returns true when an object is not null or named "null". As, there are situations where a property or parameter may be filled with a "null" default object.
Simply the inverse of IsValid.
Check if the object is an existing file in the project.
Check if the object is an existing folder in the project.
Check if the object represents any file or folder in the project.
Check if the object is a prefab file in the project.
Useful detection and conversion methods for float based Vector2 and Vector3 classes.
Converts the individual axis values of any vector to a simple 1, 0 or -1. The result is NOT normalized.
Use the optional epsilon parameter to control how precise the function will evaluate small numbers. The default is absolute precision.
Return true when a vector value represents one of the cardinal direction constants, except for zero and one.
Returns the closest cardinal direction constant of the supplied vector.