ReflectResource (reflect/resource.rs)

bevy · crates/bevy_ecs/src/reflect/resource.rs · rust · Apache-2.0
dev-tools, tag:knn-classified

Marker struct enabling reflection of Bevy ECS resources, linking to component reflection.

// Source: https://github.com/bevyengine/bevy | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
//! Definitions for [`Resource`] reflection.
//!
//! # Architecture
//!
//! See the module doc for [`reflect::component`](`crate::reflect::component`).

use crate::{reflect::ReflectComponent, resource::Resource};
use bevy_reflect::{CreateTypeData, Reflect, TypePath, TypeRegistration};

/// A struct that marks a reflected [`Resource`] of a type.
///
/// This is struct does not provide any functionality.
/// It implies the existence of a reflected [`Component`](crate::component::Component) of the same type,
/// which is meant to be used instead.
///
/// ```rust,ignore
/// #[derive(Resource, Reflect)]
/// #[reflect(Resource)]
/// struct ResA;
///
/// // is the s

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key