Skip to content

API.Unity.Util Extensions

JuDelCo edited this page Mar 25, 2021 · 28 revisions

Note: Add first using Ju.Extensions; so you can use these extension methods.

LayerMask Extensions

For GameObject, Collision and Collider classes

bool IsInLayerMask(LayerMask layerMask);

Color & Color32

Allows implicit and explicit conversion of Color & Color32 structs to and from the Unity ones.

Observable Extensions

This method will use a BehaviourLinkHandler to subscribe the Behaviour to the Observable.

void Subscribe<T>(Behaviour actor, Action<T> action, bool alwaysActive = false);
Clone this wiki locally