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.
Create a dynamic circle crosshair
- Create a new GameObject.
- Attach the SimpleDynamicCircleCrosshair component to the GameObject.
- 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. - 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.