JUtils
A unity utilities library
|
Useful extensions for working with components More...
Static Public Member Functions | |
static Ray | ForwardRay (this Component self) |
Returns a Ray struct with the position and forward of this component's transform More... | |
static bool | HasLayer (this Component comp, int layer) |
Compare if a gameObject has a layer More... | |
static bool | HasComponent< T > (this Component self) |
Check if a component exists on the components game-object More... | |
static bool | HasComponent (this Component self, Type type) |
Check if a component exists using the Type specification More... | |
static bool | TryGetComponentInChildren< T > (this Component self, out T component) |
Try get a component in the children More... | |
static T | GetComponentInDirectChildren< T > (this Component self) |
Get a component in the direct children of the component's transform. Won't look into children of children More... | |
static bool | TryGetComponentInDirectChildren< T > (this Component self, out T component) |
Try get a component in in the direct children of this component More... | |
static T | GetComponentInParentsDirect< T > (this Component self) |
Get a component in the direct parents of this component (Without this my own component) More... | |
static bool | CopyTo< T > (this T self, T target) |
Copy one component to another Source: https://answers.unity.com/questions/530178/how-to-get-a-component-from-an-object-and-add-it-t.html More... | |
Useful extensions for working with components
|
inlinestatic |
Copy one component to another Source: https://answers.unity.com/questions/530178/how-to-get-a-component-from-an-object-and-add-it-t.html
T | : | Component |
|
inlinestatic |
Returns a Ray struct with the position and forward of this component's transform
|
inlinestatic |
Get a component in the direct children of the component's transform. Won't look into children of children
T | : | Component |
|
inlinestatic |
Get a component in the direct parents of this component (Without this my own component)
T | : | Component |
|
inlinestatic |
Check if a component exists using the Type specification
|
inlinestatic |
Check if a component exists on the components game-object
|
inlinestatic |
Compare if a gameObject has a layer
|
inlinestatic |
Try get a component in the children
T | : | Component |
|
inlinestatic |
Try get a component in in the direct children of this component
T | : | Component |