Skip to main content

ReticleCircle

Represents the GameObjects and components required to render a dynamic circle crosshair.

info

Unless you want to extend the functionality of the dynamic circle crosshair, you shouldn't need to use this class directly. Instead, to change the look of the crosshair, use the DynamicCircleCrosshair API.

Methods​

Clear​

Destroys all the GameObjects required to render the crosshair.


Initialise​

Creates all the GameObjects required to render the crosshair. This generates four GameObjects, one per side of the crosshair.


IsValid​

Indicates whether the crosshair is setup correctly.

Returns​

TypeDescription
booltrue if the crosshair is setup correctly. Otherwise, returns false.

SetSize​

Sets the two-dimensional size of the circle crosshair.

Parameters​

NameTypeDescription
sizeVector2The two-dimensional size to set the circle crosshair to.

GetGraphic​

Gets the ReticleCircleGraphic component that renders the circle graphic.

Returns​

TypeDescription
ReticleCircleGraphicThe ReticleCircleGraphic component that renders the circle graphic.

GetMaskTexture​

Gets the mask texture that hides the sides of the crosshair that shouldn't be visible.

Returns​

TypeDescription
ImageThe Image component that holds the mask texture.