Skip to content

Hooks.Rendering

Mariusz edited this page Jul 18, 2020 · 3 revisions

Hooks' Rendering nested class contains all utility methods based on rendering and layers.

Public Methods

bool IsFullyVisible(RectTransform)

Returns true if the given RectTransform is fully visible in anchored position bounds.

bool IsVisible(RectTransform)

Returns true if the given RectTransform is visible.

IsVisibleFrom(Renderer, Camera)

Returns true if the Renderer is visible to the Camera.

string[] LayerIdsToNames(int[])

Returns an array of layer string taken from their indexes.

int LayerNameToIndex(string)

Returns the layer index of a named layer.

int MaskGetter(int[])

Returns the layermask of all given layers.

int MaskToLayer(int)

Returns the layermask of a bitmask.

void Shake(MonoBehaviour, Vector3, Vector3, float, float, float, Hooks.Rendering.RotationShakeType)

Shakes a Vector3 and a Quaternion to simulate shaking. Vector3 and Quaternion given must be properties or this method will not work.