Skip to main content

ReticleSideUtility

Provides methods to help you work with dynamic line crosshairs.

Static methods

ForEach

Iterates through each ReticleSide value and processes the passed in action for each side.

Parameters

NameTypeDescription
actionAction<ReticleSide>The action to process for each ReticleSide value.

Example

The following example uses the ForEach method to iterate through each side of the reticle and set its color.

private void ColorCrosshairReticle(ReticleLines reticle, Color color)
{
ReticleSideUtility.ForEach((ReticleSide line) =>
{
reticle[line].GetComponent<Image>().color = color;
});
}