Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stable reflect type name #5805

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
c9ad9a5
add `TypeName` and `ReflectTypeName`
tguichaoua Aug 26, 2022
bab4ae5
replace `Reflect::type_name` by `ReflectTypeName::type_name`
tguichaoua Aug 26, 2022
06e9258
fix tuple TypeName
tguichaoua Aug 26, 2022
312659a
impl_reflect_value use modul less name
tguichaoua Aug 26, 2022
6982351
update tests
tguichaoua Aug 26, 2022
317372f
update `Reflect::represents`
tguichaoua Aug 26, 2022
30a663f
fix ci
tguichaoua Aug 26, 2022
3a8958a
fix examples/3d/skybox
tguichaoua Aug 26, 2022
a710c17
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 27, 2022
006c8e8
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 27, 2022
a7e8dd6
fix the requirement of importing `ReflectTypeName`
tguichaoua Aug 27, 2022
8eeb06d
Merge branch 'reflect/type_name' of https://github.com/tguichaoua/bev…
tguichaoua Aug 27, 2022
140e009
drop Cow in TypeName
tguichaoua Aug 27, 2022
6fba583
remove majority of `any::type_name`
tguichaoua Aug 27, 2022
4f17b0c
fix ci + doc
tguichaoua Aug 27, 2022
c135dae
remove `ReflectTypeName`
tguichaoua Aug 27, 2022
11889a1
allow custom type name for impl_reflect_value
tguichaoua Aug 27, 2022
fe2ff0b
glam type name
tguichaoua Aug 27, 2022
e7fc222
fix glam tests
tguichaoua Aug 27, 2022
ca5e875
fix GenericDataCell soft lock
tguichaoua Aug 27, 2022
0563cf9
Update crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs
tguichaoua Aug 28, 2022
be2b3d5
Update crates/bevy_reflect/bevy_reflect_derive/src/reflect_value.rs
tguichaoua Aug 28, 2022
8cd535a
Update crates/bevy_reflect/src/impls/std.rs
tguichaoua Aug 28, 2022
8af97fc
Update crates/bevy_reflect/src/type_info.rs
tguichaoua Aug 28, 2022
eb1e2f6
Update crates/bevy_reflect/src/utility.rs
tguichaoua Aug 28, 2022
80b22d8
Update crates/bevy_reflect/src/utility.rs
tguichaoua Aug 28, 2022
9682cec
remove unnecessary `as_ref()`
tguichaoua Aug 28, 2022
d9d3afa
rm last usage of `ReflectTypeName`
tguichaoua Aug 28, 2022
329f248
rm old comment
tguichaoua Aug 28, 2022
e6a3ce8
refactor(reflect_derive): if-else into match
tguichaoua Aug 28, 2022
4722a19
Update crates/bevy_reflect/bevy_reflect_derive/src/impls/type_name.rs
tguichaoua Aug 28, 2022
aecba77
Update crates/bevy_reflect/bevy_reflect_derive/src/impls/type_name.rs
tguichaoua Aug 28, 2022
4fd9a53
Merge branch 'reflect/type_name' of https://github.com/tguichaoua/bev…
tguichaoua Aug 28, 2022
b2be7e9
reflect_derive: cleanup impl_type_name
tguichaoua Aug 28, 2022
9ea7f9a
reflect_derive: impl_type_name accept ReflectMeta as argument
tguichaoua Aug 28, 2022
b697bc3
NamedReflectValueDef::get_reflected_type_name
tguichaoua Aug 28, 2022
a6654c1
reflect_derive: refactoring
tguichaoua Aug 28, 2022
34f57b7
avoid usage of `stringify!`
tguichaoua Aug 28, 2022
26460dd
fix fmt in doc code
tguichaoua Aug 28, 2022
f4a6655
fix utility doc
tguichaoua Aug 28, 2022
45eca48
rm useless `as_ref()`
tguichaoua Aug 28, 2022
e2e3a02
example: add comment
tguichaoua Aug 28, 2022
3f2ee5d
reflect_derive: cleanup get_type_name_attribute
tguichaoua Aug 28, 2022
ba4da30
doc: impl_type_name
tguichaoua Aug 28, 2022
d8987f4
doc: derive_type_name
tguichaoua Aug 28, 2022
d155529
TypeName is 'static
tguichaoua Aug 28, 2022
0c25180
doc: TypeName
tguichaoua Aug 28, 2022
b0a6604
doc: GenericTypeNameCell
tguichaoua Aug 28, 2022
9ef1454
impl TypeName on `dyn Reflect`
tguichaoua Aug 28, 2022
83e3500
fix docs
tguichaoua Aug 28, 2022
b1411ab
fix test
tguichaoua Aug 28, 2022
86ab916
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
5e87d13
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
7295583
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
85739b8
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 29, 2022
c9ec3e8
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 29, 2022
ef4986e
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 29, 2022
4feef51
Update crates/bevy_reflect/src/utility.rs
tguichaoua Aug 29, 2022
6f750c6
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
563cb75
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
9c3a034
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
dbd4bde
Update crates/bevy_reflect/bevy_reflect_derive/src/lib.rs
tguichaoua Aug 29, 2022
f67f1af
Update crates/bevy_reflect/src/type_name.rs
tguichaoua Aug 29, 2022
3aa805a
reflect_derive: update derive_type_name doc
tguichaoua Aug 29, 2022
188b2f3
update TypeName doc
tguichaoua Aug 29, 2022
08e2c8f
fix example comment
tguichaoua Aug 29, 2022
a7aa4de
impl TypeName on Dynamic* structs
tguichaoua Aug 29, 2022
184d335
register_type_data : use TypeName
tguichaoua Aug 30, 2022
fa9bdb4
update some doc links
tguichaoua Aug 30, 2022
9dda494
TypeUuidDynamic : use TypeName
tguichaoua Aug 30, 2022
3668407
relive last std::any::type_name
tguichaoua Aug 30, 2022
b449fbe
update std types TypeName
tguichaoua Aug 30, 2022
4d42f12
Merge branch 'main' into reflect/type_name
tguichaoua Aug 30, 2022
a4c93cf
remove extra spaces
tguichaoua Aug 30, 2022
2afbd85
Merge branch 'main' into reflect/type_name
tguichaoua Aug 31, 2022
fab49b1
Merge branch 'main' into reflect/type_name
tguichaoua Sep 5, 2022
c914af0
rename `TypeName` into `TypePath`
tguichaoua Sep 5, 2022
86e12d2
rename `GenericTypeNameCell` into `GenericTypePathCell`
tguichaoua Sep 5, 2022
cb84e1e
add other methods on `TypePath`
tguichaoua Sep 5, 2022
60ff2b7
fix type path generation
tguichaoua Sep 5, 2022
e4efa1b
fix ci & doc
tguichaoua Sep 5, 2022
02aabfa
refix ci & doc
tguichaoua Sep 5, 2022
afda7b3
fix doc
tguichaoua Sep 5, 2022
aaef516
Merge branch 'main' into reflect/type_name
tguichaoua Sep 14, 2022
ddf4726
refactor: TypePathOptions::parse_meta_list
tguichaoua Sep 14, 2022
0b0cf93
fix tuple impl
tguichaoua Sep 14, 2022
88d2082
fix ci
tguichaoua Sep 14, 2022
4f9d953
minor doc fix
tguichaoua Sep 15, 2022
c28c3b4
remove empty space
tguichaoua Sep 15, 2022
a46a028
Merge branch 'main' into reflect/type_name
tguichaoua Sep 20, 2022
5303da3
fix merge
tguichaoua Sep 20, 2022
5a70e6f
Merge branch 'main' into reflect/type_name
tguichaoua Sep 21, 2022
de07bd5
fix merge error
tguichaoua Sep 21, 2022
858a6c2
fix ser/de for option
tguichaoua Sep 21, 2022
504495b
Merge branch 'main' into reflect/type_name
tguichaoua Oct 16, 2022
226dad2
fix CI
tguichaoua Oct 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use bevy_ecs::{
};
use bevy_hierarchy::Children;
use bevy_math::{Quat, Vec3};
use bevy_reflect::{Reflect, TypeUuid};
use bevy_reflect::{Reflect, TypePath, TypeUuid};
use bevy_time::Time;
use bevy_transform::{prelude::Transform, TransformSystem};
use bevy_utils::{tracing::warn, HashMap};
Expand Down Expand Up @@ -60,7 +60,7 @@ pub struct EntityPath {
}

/// A list of [`VariableCurve`], and the [`EntityPath`] to which they apply.
#[derive(Clone, TypeUuid, Debug, Default)]
#[derive(Clone, TypeUuid, Debug, Default, TypePath)]
#[uuid = "d81b7179-0448-4eb0-89fe-c067222725bf"]
pub struct AnimationClip {
curves: HashMap<EntityPath, Vec<VariableCurve>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,8 @@ impl App {
/// See [`bevy_reflect::TypeRegistry::register_type_data`].
#[cfg(feature = "bevy_reflect")]
pub fn register_type_data<
T: bevy_reflect::Reflect + 'static,
D: bevy_reflect::TypeData + bevy_reflect::FromType<T>,
T: bevy_reflect::Reflect + bevy_reflect::TypePath + 'static,
D: bevy_reflect::TypeData + bevy_reflect::TypePath + bevy_reflect::FromType<T>,
>(
&mut self,
) -> &mut Self {
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_asset/src/asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub struct AssetServerInternal {
/// use bevy_asset::{AssetServer, Handle};
/// use bevy_ecs::prelude::{Commands, Res};
///
/// # #[derive(Debug, bevy_reflect::TypeUuid)]
/// # #[derive(Debug, bevy_reflect::TypeUuid, bevy_reflect::TypePath)]
/// # #[uuid = "00000000-0000-0000-0000-000000000000"]
/// # struct Image;
///
Expand Down Expand Up @@ -577,7 +577,7 @@ impl AssetServer {
"Failed to find AssetLifecycle for label '{:?}', which has an asset type {} (UUID {:?}). \
Are you sure this asset type has been added to your app builder?",
label,
asset_value.type_name(),
asset_value.type_path(),
asset_value.type_uuid(),
);
}
Expand Down Expand Up @@ -649,10 +649,10 @@ mod test {
use crate::{loader::LoadedAsset, update_asset_storage_system};
use bevy_app::App;
use bevy_ecs::prelude::*;
use bevy_reflect::TypeUuid;
use bevy_reflect::{TypePath, TypeUuid};
use bevy_utils::BoxedFuture;

#[derive(Debug, TypeUuid)]
#[derive(Debug, TypeUuid, TypePath)]
#[uuid = "a5189b72-0572-4290-a2e0-96f73a491c44"]
struct PngAsset;

Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_asset/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,13 @@ macro_rules! load_internal_asset {
#[cfg(test)]
mod tests {
use bevy_app::App;
use bevy_reflect::TypePath;

use crate::{AddAsset, Assets};

#[test]
fn asset_overwriting() {
#[derive(bevy_reflect::TypeUuid)]
#[derive(bevy_reflect::TypeUuid, TypePath)]
#[uuid = "44115972-f31b-46e5-be5c-2b9aece6a52f"]
struct MyAsset;
let mut app = App::new();
Expand Down
5 changes: 3 additions & 2 deletions crates/bevy_asset/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
use anyhow::Error;
use anyhow::Result;
use bevy_ecs::system::{Res, ResMut};
use bevy_reflect::TypePath;
use bevy_reflect::{TypeUuid, TypeUuidDynamic};
use bevy_utils::{BoxedFuture, HashMap};
use crossbeam_channel::{Receiver, Sender};
Expand Down Expand Up @@ -47,13 +48,13 @@ pub trait AssetLoader: Send + Sync + 'static {
///
/// In order to load assets into your game you must either add them manually to an asset storage
/// with [`Assets::add`] or load them from the filesystem with [`AssetServer::load`].
pub trait Asset: TypeUuid + AssetDynamic {}
pub trait Asset: TypeUuid + AssetDynamic + TypePath {}

/// An untyped version of the [`Asset`] trait.
pub trait AssetDynamic: Downcast + TypeUuidDynamic + Send + Sync + 'static {}
impl_downcast!(AssetDynamic);

impl<T> Asset for T where T: TypeUuid + AssetDynamic + TypeUuidDynamic {}
impl<T> Asset for T where T: TypeUuid + AssetDynamic + TypeUuidDynamic + TypePath {}

impl<T> AssetDynamic for T where T: Send + Sync + 'static + TypeUuidDynamic {}

Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_audio/src/audio_output.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{Audio, AudioSource, Decodable};
use bevy_asset::{Asset, Assets};
use bevy_ecs::system::{NonSend, Res, ResMut};
use bevy_reflect::TypeUuid;
use bevy_reflect::{TypePath, TypeUuid};
use bevy_utils::tracing::warn;
use rodio::{OutputStream, OutputStreamHandle, Sink, Source};
use std::marker::PhantomData;
Expand Down Expand Up @@ -116,7 +116,7 @@ pub fn play_queued_audio_system<Source: Asset + Decodable>(
/// }
/// ```
///
#[derive(TypeUuid)]
#[derive(TypeUuid, TypePath)]
#[uuid = "8BEE570C-57C2-4FC0-8CFB-983A22F7D981"]
pub struct AudioSink {
// This field is an Option in order to allow us to have a safe drop that will detach the sink.
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_audio/src/audio_source.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use anyhow::Result;
use bevy_asset::{AssetLoader, LoadContext, LoadedAsset};
use bevy_reflect::TypeUuid;
use bevy_reflect::{TypePath, TypeUuid};
use bevy_utils::BoxedFuture;
use std::{io::Cursor, sync::Arc};

/// A source of audio data
#[derive(Debug, Clone, TypeUuid)]
#[derive(Debug, Clone, TypeUuid, TypePath)]
#[uuid = "7a14806a-672b-443b-8d16-4f18afefa463"]
pub struct AudioSource {
/// Raw data of the audio source
Expand Down
10 changes: 5 additions & 5 deletions crates/bevy_gltf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_app::prelude::*;
use bevy_asset::{AddAsset, Handle};
use bevy_ecs::{prelude::Component, reflect::ReflectComponent};
use bevy_pbr::StandardMaterial;
use bevy_reflect::{Reflect, TypeUuid};
use bevy_reflect::{Reflect, TypePath, TypeUuid};
use bevy_render::mesh::Mesh;
use bevy_scene::Scene;

Expand All @@ -29,7 +29,7 @@ impl Plugin for GltfPlugin {
}

/// Representation of a loaded glTF file.
#[derive(Debug, TypeUuid)]
#[derive(Debug, TypeUuid, TypePath)]
#[uuid = "5c7d5f8a-f7b0-4e45-a09e-406c0372fea2"]
pub struct Gltf {
pub scenes: Vec<Handle<Scene>>,
Expand All @@ -49,7 +49,7 @@ pub struct Gltf {

/// A glTF node with all of its child nodes, its [`GltfMesh`] and
/// [`Transform`](bevy_transform::prelude::Transform).
#[derive(Debug, Clone, TypeUuid)]
#[derive(Debug, Clone, TypeUuid, TypePath)]
#[uuid = "dad74750-1fd6-460f-ac51-0a7937563865"]
pub struct GltfNode {
pub children: Vec<GltfNode>,
Expand All @@ -58,14 +58,14 @@ pub struct GltfNode {
}

/// A glTF mesh, which may consist of multiple [`GltfPrimitives`](GltfPrimitive).
#[derive(Debug, Clone, TypeUuid)]
#[derive(Debug, Clone, TypeUuid, TypePath)]
#[uuid = "8ceaec9a-926a-4f29-8ee3-578a69f42315"]
pub struct GltfMesh {
pub primitives: Vec<GltfPrimitive>,
}

/// Part of a [`GltfMesh`] that consists of a [`Mesh`] and an optional [`StandardMaterial`].
#[derive(Debug, Clone, TypeUuid)]
#[derive(Debug, Clone, TypeUuid, TypePath)]
#[uuid = "cbfca302-82fd-41cb-af77-cab6b3d50af1"]
pub struct GltfPrimitive {
pub mesh: Handle<Mesh>,
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_input/src/gamepad.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{Axis, Input};
use bevy_ecs::event::{EventReader, EventWriter};
use bevy_ecs::system::{Res, ResMut, Resource};
use bevy_reflect::TypePath;
use bevy_utils::{tracing::info, HashMap, HashSet};

/// A gamepad with an associated `ID`.
Expand Down Expand Up @@ -291,7 +292,7 @@ pub enum GamepadButtonType {
/// ## Updating
///
/// The resources are updated inside of the [`gamepad_event_system`].
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, TypePath)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub struct GamepadButton {
/// The gamepad on which the button is located on.
Expand Down
12 changes: 7 additions & 5 deletions crates/bevy_input/src/input.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy_ecs::system::Resource;
use bevy_reflect::Reflect;
use bevy_reflect::{Reflect, TypePath};
use bevy_utils::HashSet;
use std::hash::Hash;

Expand Down Expand Up @@ -36,7 +36,7 @@ use bevy_ecs::schedule::State;
/// * Call the [`Input::clear`] method at each frame start, before processing events.
#[derive(Debug, Clone, Resource, Reflect)]
#[reflect_value]
pub struct Input<T: Copy + Eq + Hash + Send + Sync + 'static> {
pub struct Input<T: Copy + Eq + Hash + Send + Sync + TypePath + 'static> {
/// A collection of every button that is currently being pressed.
pressed: HashSet<T>,
/// A collection of every button that has just been pressed.
Expand All @@ -45,7 +45,7 @@ pub struct Input<T: Copy + Eq + Hash + Send + Sync + 'static> {
just_released: HashSet<T>,
}

impl<T: Copy + Eq + Hash + Send + Sync + 'static> Default for Input<T> {
impl<T: Copy + Eq + Hash + Send + Sync + TypePath + 'static> Default for Input<T> {
fn default() -> Self {
Self {
pressed: Default::default(),
Expand All @@ -57,7 +57,7 @@ impl<T: Copy + Eq + Hash + Send + Sync + 'static> Default for Input<T> {

impl<T> Input<T>
where
T: Copy + Eq + Hash + Send + Sync + 'static,
T: Copy + Eq + Hash + Send + Sync + TypePath + 'static,
{
/// Registers a press for the given `input`.
pub fn press(&mut self, input: T) {
Expand Down Expand Up @@ -167,10 +167,12 @@ where

#[cfg(test)]
mod test {
use bevy_reflect::TypePath;

use crate::Input;

/// Used for testing the functionality of [`Input`].
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, TypePath)]
enum DummyInput {
Input1,
Input2,
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_input/src/mouse.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{ButtonState, Input};
use bevy_ecs::{event::EventReader, system::ResMut};
use bevy_math::Vec2;
use bevy_reflect::TypePath;

/// A mouse button input event.
///
Expand Down Expand Up @@ -29,7 +30,7 @@ pub struct MouseButtonInput {
/// ## Updating
///
/// The resource is updated inside of the [`mouse_button_input_system`](crate::mouse::mouse_button_input_system).
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy, TypePath)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub enum MouseButton {
/// The left mouse button.
Expand Down
10 changes: 6 additions & 4 deletions crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use bevy_ecs::{
},
world::FromWorld,
};
use bevy_reflect::TypeUuid;
use bevy_reflect::{TypePath, TypeUuid};
use bevy_render::{
extract_component::ExtractComponentPlugin,
mesh::{Mesh, MeshVertexBufferLayout},
Expand Down Expand Up @@ -57,11 +57,11 @@ use std::marker::PhantomData;
/// ```
/// # use bevy_pbr::{Material, MaterialMeshBundle};
/// # use bevy_ecs::prelude::*;
/// # use bevy_reflect::TypeUuid;
/// # use bevy_reflect::{TypeUuid, TypePath};
/// # use bevy_render::{render_resource::{AsBindGroup, ShaderRef}, texture::Image, color::Color};
/// # use bevy_asset::{Handle, AssetServer, Assets};
///
/// #[derive(AsBindGroup, TypeUuid, Debug, Clone)]
/// #[derive(AsBindGroup, TypeUuid, TypePath, Debug, Clone)]
/// #[uuid = "f690fdae-d598-45ab-8225-97e2a3f056e0"]
/// pub struct CustomMaterial {
/// // Uniform bindings must implement `ShaderType`, which will be used to convert the value to
Expand Down Expand Up @@ -108,7 +108,9 @@ use std::marker::PhantomData;
/// @group(1) @binding(2)
/// var color_sampler: sampler;
/// ```
pub trait Material: AsBindGroup + Send + Sync + Clone + TypeUuid + Sized + 'static {
pub trait Material:
AsBindGroup + Send + Sync + Clone + TypeUuid + TypePath + Sized + 'static
{
/// Returns this material's vertex shader. If [`ShaderRef::Default`] is returned, the default mesh vertex shader
/// will be used.
fn vertex_shader() -> ShaderRef {
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/pbr_material.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{AlphaMode, Material, MaterialPipeline, MaterialPipelineKey, PBR_SHADER_HANDLE};
use bevy_asset::Handle;
use bevy_math::Vec4;
use bevy_reflect::TypeUuid;
use bevy_reflect::{TypePath, TypeUuid};
use bevy_render::{
color::Color, mesh::MeshVertexBufferLayout, render_asset::RenderAssets, render_resource::*,
texture::Image,
Expand All @@ -12,7 +12,7 @@ use bevy_render::{
/// <https://google.github.io/filament/Material%20Properties.pdf>.
///
/// May be created directly from a [`Color`] or an [`Image`].
#[derive(AsBindGroup, Debug, Clone, TypeUuid)]
#[derive(AsBindGroup, Debug, Clone, TypeUuid, TypePath)]
#[uuid = "7494888b-c082-457b-aacf-517228cc0c22"]
#[bind_group_data(StandardMaterialKey)]
#[uniform(0, StandardMaterialUniform)]
Expand Down
Loading