diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index b84e871f042d8..9f71c50af9e7b 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -178,8 +178,8 @@ pub struct AnimationPlayer { } impl AnimationPlayer { - /// Start playing an animation, resetting state of the player - /// This will use a linear blending between the previous and the new animation to make a smooth transition + /// Start playing an animation, resetting state of the player. + /// This will use a linear blending between the previous and the new animation to make a smooth transition. pub fn start(&mut self, handle: Handle) -> &mut Self { self.animation = PlayingAnimation { animation_clip: handle, @@ -193,8 +193,8 @@ impl AnimationPlayer { self } - /// Start playing an animation, resetting state of the player - /// This will use a linear blending between the previous and the new animation to make a smooth transition + /// Start playing an animation, resetting state of the player. + /// This will use a linear blending between the previous and the new animation to make a smooth transition. pub fn start_with_transition( &mut self, handle: Handle, diff --git a/crates/bevy_asset/src/assets.rs b/crates/bevy_asset/src/assets.rs index 8a91fd701ad8b..b586acaeb56ff 100644 --- a/crates/bevy_asset/src/assets.rs +++ b/crates/bevy_asset/src/assets.rs @@ -146,7 +146,7 @@ impl Assets { /// Get mutable access to the asset for the given handle. /// /// This is the main method for mutably accessing asset data from an [Assets] collection. If you - /// do not need mutable access to the asset, you may also use [get](Assets::get). + /// do not need mutable access to the asset, you may also use [`get`](Assets::get). pub fn get_mut(&mut self, handle: &Handle) -> Option<&mut T> { let id: HandleId = handle.into(); self.events.send(AssetEvent::Modified { diff --git a/crates/bevy_audio/src/audio.rs b/crates/bevy_audio/src/audio.rs index 546e158e3f906..c7d8cd6b82acb 100644 --- a/crates/bevy_audio/src/audio.rs +++ b/crates/bevy_audio/src/audio.rs @@ -53,7 +53,7 @@ impl VolumeLevel { } } -/// How should Bevy manage the sound playback? +/// The way Bevy manages the sound playback. #[derive(Debug, Clone, Copy)] pub enum PlaybackMode { /// Play the sound once. Do nothing when it ends. diff --git a/crates/bevy_audio/src/audio_source.rs b/crates/bevy_audio/src/audio_source.rs index 93b951e9f7b5e..367e36ecc2d73 100644 --- a/crates/bevy_audio/src/audio_source.rs +++ b/crates/bevy_audio/src/audio_source.rs @@ -68,7 +68,7 @@ impl AssetLoader for AudioLoader { /// in order to be registered. /// Types that implement this trait usually contain raw sound data that can be converted into an iterator of samples. /// This trait is implemented for [`AudioSource`]. -/// Check the example `audio/decodable` for how to implement this trait on a custom type. +/// Check the example [`decodable`](https://github.com/bevyengine/bevy/blob/latest/examples/audio/decodable.rs) for how to implement this trait on a custom type. pub trait Decodable: Send + Sync + 'static { /// The type of the audio samples. /// Usually a [`u16`], [`i16`] or [`f32`], as those implement [`rodio::Sample`]. diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs index 27bf3400c1d89..abd1ab5d65440 100644 --- a/crates/bevy_transform/src/commands.rs +++ b/crates/bevy_transform/src/commands.rs @@ -1,12 +1,9 @@ -//! Extension to [`EntityCommands`] to modify [`bevy_hierarchy`] hierarchies +//! Extension to [`EntityCommands`] to modify `bevy_hierarchy` hierarchies //! while preserving [`GlobalTransform`]. use bevy_ecs::{prelude::Entity, system::Command, system::EntityCommands, world::World}; use bevy_hierarchy::{AddChild, RemoveParent}; -#[cfg(doc)] -use bevy_hierarchy::BuildChildren; - use crate::{GlobalTransform, Transform}; /// Command similar to [`AddChild`], but updating the child transform to keep @@ -63,13 +60,13 @@ impl Command for RemoveParentInPlace { update_transform(); } } -/// Collection of methods similar to [`BuildChildren`], but preserving each +/// Collection of methods similar to [`BuildChildren`](bevy_hierarchy::BuildChildren), but preserving each /// entity's [`GlobalTransform`]. pub trait BuildChildrenTransformExt { /// Change this entity's parent while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`]. /// - /// See [`BuildChildren::set_parent`] for a method that doesn't update the + /// See [`BuildChildren::set_parent`](bevy_hierarchy::BuildChildren::set_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute @@ -80,7 +77,7 @@ pub trait BuildChildrenTransformExt { /// Make this entity parentless while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`] to be equal to its current [`GlobalTransform`]. /// - /// See [`BuildChildren::remove_parent`] for a method that doesn't update the + /// See [`BuildChildren::remove_parent`](bevy_hierarchy::BuildChildren::remove_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 8c79494dec350..8b923506766ab 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -63,10 +63,10 @@ use crate::web_resize::{CanvasParentResizeEventChannel, CanvasParentResizePlugin #[cfg(target_os = "android")] pub static ANDROID_APP: std::sync::OnceLock = std::sync::OnceLock::new(); -/// A [`Plugin`] that uses [`winit`] to create and manage windows, and receive window and input +/// A [`Plugin`] that uses `winit` to create and manage windows, and receive window and input /// events. /// -/// This plugin will add systems and resources that sync with the [`winit`] backend and also +/// This plugin will add systems and resources that sync with the `winit` backend and also /// replace the exising [`App`] runner with one that constructs an [event loop](EventLoop) to /// receive window and input events from the OS. #[derive(Default)] diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index 4c7f30df6fa82..a2d5b22c2c034 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -21,7 +21,7 @@ use crate::{ converters::{convert_enabled_buttons, convert_window_level, convert_window_theme}, }; -/// A resource mapping window entities to their [`winit`]-backend [`Window`](winit::window::Window) +/// A resource mapping window entities to their `winit`-backend [`Window`](winit::window::Window) /// states. #[derive(Debug, Default)] pub struct WinitWindows {