UiTargetCamera doc comment correction (#18216)

# Objective

As pointed out in #18177 this line in the doc comment for
`UiTargetCamera`:

```
/// Optional if there is only one camera in the world. Required otherwise.
```

Is incorrect, `UiTargetCamera` component is only needed when you want to
display UI nodes using a camera other than the default camera.

## Solution

Change it to:
```
/// Root node's without an explicit [`UiTargetCamera`] will be rendered to the default UI camera,
/// which is either a single camera with the [`IsDefaultUiCamera`] marker component or the highest
/// order camera targeting the primary window.
```
This commit is contained in:
ickshonpe 2025-03-09 22:48:52 +00:00 committed by GitHub
parent bb1616a212
commit 8980be997e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2638,7 +2638,9 @@ mod tests {
/// Setting this component on a non-root node will have no effect. It will be overridden
/// by the root node's component.
///
/// Optional if there is only one camera in the world. Required otherwise.
/// Root node's without an explicit [`UiTargetCamera`] will be rendered to the default UI camera,
/// which is either a single camera with the [`IsDefaultUiCamera`] marker component or the highest
/// order camera targeting the primary window.
#[derive(Component, Clone, Debug, Reflect, Eq, PartialEq)]
#[reflect(Component, Debug, PartialEq)]
pub struct UiTargetCamera(pub Entity);