Skip to main content

Dynamic circle crosshair

The dynamic circle crosshair is an alternative dynamic crosshair type in the shape of a hollow circle. It's generated as a custom MaskableGraphic which can be updated every frame with a negligible impact on performance.

Dynamic circle crosshair modification

Create a dynamic circle crosshair

  1. Create a new GameObject.
  2. Attach the SimpleDynamicCircleCrosshair component to the GameObject.
  3. In the Inspector for the SimpleDynamicCircleCrosshair component, click Generate Crosshair GameObject. This generates a crosshair Canvas, if one doesn't already exist, and creates the other GameObjects and components required to render the crosshair.
  4. To change the crosshair's appearance in the Editor, modify property values in the SimpleDynamicCircleCrosshair component. To change the appearance of the crosshair at runtime, use the SimpleDynamicCircleCrosshair component API.
caution

Don't modify the crosshair GameObject that's generated by the SimpleDynamicCircleCrosshair component Inspector. To change crosshair properties, modify the SimpleDynamicCircleCrosshair component values instead.